Remix.run Logo
hadlock 4 days ago

Giving the llm access to Ghidra so it can directly read and iterate through the Sudoku puzzle that is decompile binaries seems like a good one. Ghidra has a cli mode and various bindings so you can automate decompiling various binaries. For example right now if you want to isolate the physics step of Microsoft flight simulator 3.0 codex will hold your hand and walk you through (over the course of 3-4 hours, using the gui) finding the main loop and making educated guesses about which decompiled c functions in there are likely physics related, but it would be a lot easier to just give it the "Ghidra" skill and say, "isolate the physics engine and export it as a portable cargo package in rust". If you're an NSA analyst you can probably use it to disassemble and isolate interesting behavior of various binaries from state actors a lot faster.

noname120 4 days ago | parent [-]

Do you have experience using Ghidra in such a way? I’m curious how well it actually performs on that use case.

hadlock 3 days ago | parent [-]

Yes I extracted the physics engine from Ms flight simulator 3.0 (C) and ported it into my own project (rust) in Ghidra as a complete novice from having never opened the app to working code in rust in just over three hours. It helped a lot that I have previous experience with writing my own similar software so I knew what to start looking for, and also Ms fs 3.0 is only about 9500 loc, much of it is graphics.

But yeah codex will totally hold your hand and teach you Ghidra if you have a few hours to spare and the barest grasp of assembly