You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an Arm64-based simulate execution framework designed to remove OLLVM's flattening obfuscation. By identifying specific patterns, it can reconstruct the complete set of if-else branches.
How to Use
1. Get the CFG info from the IDA python script
editida_get_cfg.pydefmain():
# choose your function addressfunc_addr=0x181c6c# replace with your function address# edit your output fileoutput_file="C:/Users/PC5000/PycharmProjects/py_ida/cfg_output_"+hex(func_addr) +".json"# run the script1.opentheIDA2.File->Scriptfile->choosetheida_get_cfg.py3.checktheoutputfile
2. Run AntiOllvm
./AntiOllvm.exe -s cfg_output_xxxx.json
if you see '[INFO] Program: FixJson OutPath is E:\RiderDemo\AntiOllvm\AntiOllvm\bin\Release\net8.0\fix.json' in the console, it means the fix.json is generated successfully.
3. Run gen_machine_code.py
warning! thisispythonscriptwithkeystone-engine, youneedtoinstallkeystone-enginefirst.
pipinstallkeystone# edit fix.json path in gen_machine_code.py json_file_path="fix.json"# replace with your fix.json path# now run gen_machine_code.pypythongen_machine_code.py
4. Rebuild cfg in IDA
# run the script1.opentheIDA2.File->Scriptfile->choosetheida_rebuild_cfg.py3.choosegen_machine_code.pyoutputfix.jsonfile4.Enjoy!
How To Build
git clone https://github.com/IIIImmmyyy/AntiOllvm.git
Use Rider or Visual Studio to open the project and build it.