SOAdvancedDissector

SOAdvancedDissector Git Source Tree

Root/README.md

1SOAdvancedDissector
2-------------------
3
4SOAdvancedDissector is a Python(3) script that rely on _GNU readelf_, _c++filt_ and _vtable-dumper_ to extract symbols from Linux shared libraries (.so file).
5
6Thanks to these symbols, the full class hierarchy is built allowing to link your code with the target library.
7
8Nevertheless, extracted information is only the start of work. It needs to be reworked to find function type returns, attributes types, filter public/private functions/attributes/methods, add some class attributes and clean some unneeded symbols.
9
10**Important** vtable-dumper has been forked, the original tool must not be used because it doesn't (for now) implements all needed features. Please use the one from https://github.com/soutade/vtable-dumper
11
12
13Details
14=======
15
16A first pass is done thanks to _readelf_ + binary analysis to extract static information, it's mandatory. It scans _typeinfo_ and _vtable_ entries.
17
18A second optional pass use _vtable-dumper_ which load the shared library allowing to read runtime vtable (which can be cleared in static file compiled with -fPIC) and find class hierarchy. This can be done apart, especially if shared library has been compiled for another platform (ARM).
19
20
21Improvments
22===========
23
24This tool has been designed to do reverse engineering of a specific library (_librmsdk.so_ from Adobe) and even if I tried to do my best, it may doesn't cover all your cases. I won't do a long term support on it but feel free to send patches.
25
26
27Usage
28-----
29
30 SOAdvancedDissector.py [-h] -f TARGET -s SECTION_FILE -S SYMBOL_FILE [-V VTABLE_FILE] [-o OUTPUT_DIR] [-c] [-r]
31
32 -h, --help show this help message and exit
33 -f TARGET, --file TARGET
34 Target file
35 -s SECTION_FILE, --section-file SECTION_FILE
36 Section file (result from 'readelf --sections|c++filt')
37 -S SYMBOL_FILE, --symbol-file SYMBOL_FILE
38 Symbol file (result from 'readelf -sW|c++filt')
39 -V VTABLE_FILE, --vtable-file VTABLE_FILE
40 Dynamic vtable file (result from 'vtable-dumper --demangle|c++filt')
41 -o OUTPUT_DIR, --output-dir OUTPUT_DIR
42 output directory (default ./output)
43 -c, --clean-output-dir
44 Clean output directory before computing (instead update it)
45 -r, --print-raw-virtual-table
46 Print raw virtual table (debug purpose)
47
48
49It's recommended to use _SOAdvancedDissector.sh_ script that do all tools extraction stuff.
50
51
52Sources
53-------
54
55Sources can be found @ http://indefero.soutade.fr/p/soadvanceddissector
56
57
58Copyright
59---------
60
61Grégory Soutadé
62
63
64Licence
65-------
66
67GNU GPLv3

Archive Download this file

Branches