r2diaphora is a port of Diaphora to radare2 and MariaDB. It also uses r2ghidra as decompiler by default, with support for other decompilers such as pdc
.
Quoting from the original repository:
Diaphora (διαφορά, Greek for 'difference') version 2.0 is the most advanced program diffing tool, working as an IDA plugin, available as of today (2019). It was released first during SyScan 2015 and is actively maintained.
- r2diaphora requires radare2 to be installed in the local machine and a valid connection to a MariaDB server. If you don't have either of those refer to the respective software manual on how to install them.
- Install it with
pip install r2diaphora
- Run
r2diaphora-db config -u <user> -p <password> -hs <host>
to fill database credentials - (Optional) Install r2ghidra with
r2pm -ci r2ghidra
. Optionally you can usepdc
(-d pdc
) or no decompiler at all (-nd
)
usage: r2diaphora [-h] [-f] [-nbbs NBBS] [-o O] [-d {pdc,ghidra}] [-nd] [-a] file1 [file2]
positional arguments:
file1 File to analyze
file2 (Optional) File to diff against
optional arguments:
-h, --help show this help message and exit
-f Force DB override
-nbbs NBBS Functions with a number of basic blocks below this number are excluded from analysis
-o O Diff output file (HTML) - Default value: <db1name>_vs_<db2name>.html
-d {pdc,ghidra}, --decompiler {pdc,ghidra}
Which decompiler to use
-nd, --no-decompiler Do not use the decompiler
-a Analyze ALL functions (by default library functions are skipped)
usage: r2diaphora-db [-h] {clean,config} ...
positional arguments:
{clean,config}
clean delete analysis databases
config configure credentials for the MariaDB server
optional arguments:
-h, --help show this help message and exit
usage: r2diaphora-bulk [-h] [-f] [-a] files [files ...]
positional arguments:
files Files to analyze
optional arguments:
-h, --help show this help message and exit
-f Force DB override
-a Analyze ALL functions (by default library functions are skipped)