Learning Linux Binary Analysis
Rate it:
Open Preview
Read between April 19 - May 2, 2016
12%
Flag icon
The text segment (also known as the code segment)
14%
Flag icon
The text segment is READ+EXECUTE and the data segment is READ+WRITE, and
14%
Flag icon
A section is not a segment.
14%
Flag icon
every ELF object has sections, but not all ELF objects have section headers,
15%
Flag icon
The .text section is a code section that contains program code instructions.
15%
Flag icon
The rodata section contains read-only data such as strings from a line of C code, such as the following
15%
Flag icon
.rodata within the range of the text segment (not the data segment).
15%
Flag icon
it contains code necessary for the dynamic linker to call functions that are imported from shared libraries.
15%
Flag icon
The bss section contains uninitialized global data as part of the data segment and therefore takes up no space on disk other than 4 bytes, which represents the section itself.
15%
Flag icon
The dynsym section contains dynamic symbol information imported from shared libraries.
15%
Flag icon
The dynstr section contains the string table for dynamic symbols that has the name of each symbol in a series of null terminated strings.
15%
Flag icon
The hash section, sometimes called .gnu.hash, contains a hash table for symbol lookup.
18%
Flag icon
So .symtab contains all of the symbols, whereas .dynsym contains just the dynamic/global symbols.
19%
Flag icon
dynamically linked executable will always retain .dynsym but will discard .symtab if it is stripped, so only the imported library symbols will show up.
20%
Flag icon
Relocation is the process of connecting symbolic references with symbolic definitions.
21%
Flag icon
The relocation records for 32-bit ELF files are the same as for 64-bit, but
21%
Flag icon
.text: 00000000 <func>
23%
Flag icon
The ldd command will show you the shared library dependencies of a given executable.
23%
Flag icon
PLT (procedure linkage table) and GOT (Global offset table)
45%
Flag icon
__libc_dlopen_mode() to load your shared library into the process,
45%
Flag icon
The __libc_dlsym() function can then be used to resolve symbols within your shared library.
48%
Flag icon
The stub is generally compiled without any libc linkings
69%
Flag icon
The function for loading shared objects is named dlopen, and the function for resolving symbols is named dlsym.
84%
Flag icon
core files are not expected to have section headers but ECFS files do have section headers,
90%
Flag icon
A directory listing in Linux (such as with ps or ls) uses the sys_getdents64 system call and the filldir64 kernel function.