AI TOOLS FOR RE
| Tool | Type | Model | Capability | Accuracy | Cost |
| BinGPT | IDA Pro plugin | GPT-4 / Claude | Function renaming, pseudo-code generation, logic explanation | 85-95% | OpenAI API cost |
| GhidraNNScript | Ghidra script | Local BERT model | Type reconstruction, variable naming | 70-80% | Free (local) |
| Decomp2Code | Standalone | Fine-tuned CodeLlama | Converts decompiled C to readable C with variable names | 75-85% | Free (local) |
| PatchAssist | Standalone | GPT-4 | Generates patches from description: "NOP the license check" | 90% | OpenAI API cost |
| SigFinder AI | x64dbg plugin | CNN classifier | Identifies cryptographic functions from byte patterns | 92% | Free (local) |
| AutoUnpack ML | Standalone | Random Forest | Predicts packer type and OEP location | 88% | Free |
USING GPT-4/CLAUDE FOR RE
Code:
Prompt engineering for binary analysis:
1. Function analysis (copy from IDA):
"Analyze this decompiled function. Rename it and explain what it does:
[paste decompiled C code]
Identify: purpose, parameters, return value, key operations"
2. Algorithm identification:
"Identify the encryption algorithm from this implementation:
[paste code with constants]
Look for: S-box patterns, round constants, key schedule structure"
3. Patch generation:
"For this license check function, generate a patch that:
- Always returns valid (true)
- Is minimal (1-2 byte change)
- Does not affect other functionality
Code:
[paste function]
Output: offset, original bytes, patch bytes, explanation"
4. Obfuscated code analysis:
"This code is obfuscated with control flow flattening:
[paste flattened code]
Identify: the original control flow, state variable, dispatcher
Can you reconstruct the original switch statement?"
5. Protocol reverse engineering:
"Analyze this network packet handler:
[paste handler code]
Identify: packet structure, field offsets, magic bytes, checksum algorithm"
Pro tips:
- Include context: function names it calls, strings it references, XREFs
- Show the IDA graph view (visual helps LLMs understand flow)
- For large functions, break into chunks (200-300 lines max)
- Use system prompt: "You are an expert reverse engineer..."
- Cross-reference with Ghidra output (two tools, two perspectives)
CASE STUDY: REVERSING CUSTOM VM WITH AI
Code:
Challenge: A CrackMe with custom VM bytecode interpreter
Goal: Understand the VM and generate keygen
Step 1: Feed the VM dispatcher to GPT-4
"This is the dispatch loop of a custom VM:
[paste dispatcher code]
Identify: opcodes, operand types, register model, memory model"
Step 2: AI analysis result:
"This is a stack-based VM with 4 registers (R0-R3):
- Opcode 0x10: PUSH immediate (2-byte operand)
- Opcode 0x11: PUSH register (1-byte operand)
- Opcode 0x20: POP to register
- Opcode 0x30: ADD (pop two, push result)
- Opcode 0x31: SUB
- Opcode 0x32: XOR
- Opcode 0x40: CMP (pop two, set flags)
- Opcode 0x50: JMP (2-byte offset)
- Opcode 0x51: JZ (jump if zero)
- Opcode 0x60: READ_INPUT (pop address, read char input)
- Opcode 0x70: OUTPUT (pop value, print as char)
- Opcode 0xFF: HALT"
Step 3: Feed the bytecode:
"This is the bytecode for the VM. Decompile it to pseudo-code:
[paste hex dump]
Step 4: AI produces:
"Decompiled VM bytecode:
R0 = 0
loop:
R1 = get_input_byte(R0)
if R1 == 0: goto success
R2 = R1 XOR 0xAB
R3 = R0 XOR 0xCD
R2 = R2 + R3
check_byte(R0) == R2
if not equal: goto fail
R0 = R0 + 1
goto loop
success: print 'Valid key'
fail: print 'Invalid key'"
Step 5: Write keygen:
def generate_key(length):
key = []
for i in range(length):
c = (check_bytes[i] ^ 0xAB) - (i ^ 0xCD)
key.append(c & 0xFF)
return bytes(key)
Time with AI: 45 minutes
Time without AI (estimated): 8-12 hours
TOOLS DOWNLOAD
Code:
AI-RE toolkit: [URL="https://mega.nz/file/BlackSec_AI_RE_Tools_2026"]File on MEGA[/URL]
Size: 850 MB | Password: AIRE2026
Includes: All plugins + scripts + local models + prompt templates + tutorials