Dekompilieren Sie alle Dinge!
IDA Batch Decompile ist ein Plugin für IDA Pro von Hex-Ray, das die Möglichkeit zur Batch-Dekompilierung mehrerer Dateien und ihrer Importe mit zusätzlichen Anmerkungen (XRef, Stack-Variablengröße) zur Pseudocode-.c-Datei hinzufügt
Pssst! - ida-batch_decompile ist auch Teil von project:unbox – ein unkompliziertes Befehlszeilentool zum Entpacken und Dekompilieren aller möglichen Dinge.
Öffnen Sie das Ziel und warten Sie, bis die Analyse abgeschlossen ist
IDA Pro -> File/Script file... -> <this_python_script>
IDA Pro -> File/Produce file-> IdaDecompileBatch ...
Aktivieren Sie Annotate StackVarSize
, Annotate Func XRefs
Klicken Sie zum Dekompilieren auf OK
.
Hinweis: Die Datei wird im Zielordner als <target_image_name.c>
gespeichert
<path_to_ida>/ida(w|w64)(.exe) -B -M -S"<path_to_this_script> "--option1" "--option2"" "<target>"
Beachten Sie, dass Optionen in Anführungszeichen gesetzt werden müssen mit "
Verfügbare Optionen, siehe --help
--output ... output file path --annotate-stackvar-size ... annotate function stack variable sizes --annotate-xrefs ... annotate function xrefs --imports ... process imports --recursive ... recursive batch decompile --experimental-decompile-cgraph ... experimental: manually decompile function call graph
Befolgen Sie die IDA Pro-Dokumentation zum Hinzufügen von Python-Plugins.
IDA Pro -> File/Produce file -> IdaDecompileBatch ...
[__main__/36908][DEBUG ] [idabatchdecompile.PLUGIN_ENTRY ] [+] Initialisierung von IdaDecompileBatchPlugin[__main__/36908][DEBUG ] [idabatchdecompile.__init__ ] [+] is_windows: True[__main__/36908][DEBUG ] [idabatchdecompile.__init__] [+] is_ida64: False[__main__/36908][DEBUG] [idabatchdecompile.wait_for_analysis_to_finish] [+] wartet auf den Abschluss der Analyse ... [__main__/36908][DEBUG] [idabatchdecompile.wait_for_analysis_to_finish] [+] Analyse abgeschlossen. [__main__/36908][DEBUG ] [idabatchdecompile.load_plugin_decompiler] [+] versucht, Decompiler-Plugins zu laden.[__main__/36908][DEBUG ] [idabatchdecompile.load_plugin_decompiler] [+] Decompiler-Plugins wurden geladen. [__main__/36908][DEBUG ] [idabatchdecompile.PLUGIN_ENTRY ] [+] Modus: Befehlszeile ohne Argumente[__main__/36908][DEBUG ] [idabatchdecompile.set_ctrl ] [+] IdaDecompileBatchPlugin.set_ctrl(<__main__.IdaDecompileBatchController-Objekt bei 0x056FCF90>) [__main__/36908][DEBUG] [idabatchdecompile.init] [+] IdaDecompileBatchPlugin.init() [__main__/36908][DEBUG ] [idabatchdecompile.init ] [+] Menüs einrichten[__main__/36908][INFO ] [idabatchdecompile.PLUGIN_ENTRY ] [i] IdaDecompileBatch geladen, siehe Menü: ('Datei/Datei erstellen/', 'IdaDecompileBatch ...') ... Die Anwendung wurde vollständig dekompiliert. [__main__/36908][DEBUG] [idabatchdecompile.decompile_all] [+] Dekompilierung von „dbghelp.dll“ als „dbghelp.c“ abgeschlossen
//----- (03052800) ---------------------------------------- ----------------// **** Variablen ****// * Stapelgröße: 20// {"diff_size": 4, "offset_text": "[bp +0h]", "size": 4, "name": " s", "offset": 0}// {"diff_size": 4, "offset_text": "[bp+4h]", "size": 4, "name": " r", "offset": 4}// {"diff_size": 4, "offset_text": "[bp+8h]", " size": 4, "name": "arg_0", "offset": 8}// {"diff_size": 4, "offset_text": "[bp+Ch]", "size": 4, „name“: „dwBytes“, „offset“: 12}// {“diff_size“: 4, „offset_text“: „[bp+10h]“, „size“: 4, „name“: „arg_8“ , "offset": 16}// *********************// ***** XREFS *****// * # 1// sub_30733D0+ 30// *******************int __stdcall sub_3052800(int a1, SIZE_T dwBytes, int a3) {int result; // eax@17 GRIFF v4; // eax@21...
//github.com/tintinweb