
Static binary instrumentation tool that dumps COFF object files from executables, enabling code/data insertion at any location for black-box fuzzing and binary patching via IDA Pro.
IDA2Obj is a tool to implement SBI (Static Binary Instrumentation).
The working flow is simple:
Prepare the enviroment:
AUTOIMPORT_COMPAT_IDA695 = YES in the idapython.cfg to support the API with old IDA 6.x style.pip install coughCreate a folder as the workspace.
Copy the target binary which you want to fuzz into the workspace.
Load the binary into IDA Pro, choose Load resources and manually load to load all the segments from the binary.
Wait for the auto-analysis done.
Dump object files by running the script MagicIDA/main.py.
${workspace}/${module}/objs/afl.TRACE_MODE inside the workspace, then the output object files will be inside ${workspace}/${module}/objs/trace.${workspace}/${module} :
Generate lib files by running the script utils/LibImports.py.
${workspace}/${module}/libs, used for linking later.Open a terminal and change the directory to the workspace.
Link all the object files and lib files by using utils/link.bat.
utils/link.bat GdiPlus dll afl /RELEASE${workspace}/${module}.Patch the new built binary by using utils/PatchPEHeader.py.
utils/PatchPEHeader.py GdiPlus/GdiPlus.afl.dllutils/register_msdia_run_as_administrator.bat as administrator.Run & Fuzz.
HITB Slides : https://github.com/jhftss/jhftss.github.io/blob/main/res/slides/HITB2021SIN%20-%20IDA2Obj%20-%20Mickey%20Jin.pdf
Demo : https://drive.google.com/file/d/1N3DXJCts5jG0Y5B92CrJOTIHedWyEQKr/view?usp=sharing