Loading...
Loading...
Expert-level reverse engineering and binary debugging skill. Use this skill whenever the user wants to analyze, decompile, disassemble, or debug binaries, executables, APKs, iOS apps, firmware, or obfuscated code. Triggers for: static analysis, dynamic analysis, malware analysis, exploit development, CTF challenges, binary patching, anti-debug bypass, protocol reversing, memory forensics, hooking, frida scripting, GDB/LLDB debugging, radare2, Ghidra, jadx, apktool, strings analysis, symbol resolution, or any request involving "reverse engineer", "RE", "decompile", "disassemble", "patch binary", "debug crash", "analyze malware", "bypass protection", "hook function", "intercept traffic", "find vulnerability", or examining unknown file formats. Always load this skill for CTF pwn/rev challenges, app security assessments, and firmware analysis.
npx skill4agent add r00tedbrain-backup/skills reverse-engineering| Task | Reference File |
|---|---|
| Static analysis, disassembly, Ghidra, radare2, objdump, patching | |
| GDB (+ pwndbg/gef/peda), LLDB, strace/ltrace, crash analysis | |
| Android APK, DEX, smali, ADB, Frida on Android, repackaging | |
| iOS IPA, Mach-O, class-dump, Frida ObjC/Swift, Keychain | |
| macOS XPC, launchd, kext, SIP, Linux kernel modules | |
| Windows PE, WinDbg, x64dbg, .NET/dnSpy, kernel drivers | |
| Frida scripting, hooking Java/Native/ObjC, SSL unpin, gadget | |
| .NET IL, dnSpy, de4dot, Java/JVM, Kotlin, Unity/IL2CPP, Mono | |
| Malware, obfuscation, packer analysis, IOC extraction, Volatility | |
| CTF pwn/rev, BOF, ROP, heap exploitation, pwntools, angr/Z3 | |
| Network protocol RE, Wireshark, mitmproxy, Protobuf, gRPC, Lua dissectors, Boofuzz | |
| Firmware, binwalk, QEMU emulation, JTAG/UART, U-Boot, IoT | |
| EAC, BattlEye, Vanguard, FACEIT, VAC, kernel AC analysis | |
| Ghidra Python/Java scripts, headless, vulnerability finding, custom analyzers | |
| IDAPython / IDALib scripts, Hex-Rays API, batch decompile, OLLVM helpers | |
| Unicorn engine emulation, function-level emulation, JNI stubbing, syscall sim | |
| Stripped symbol recovery, magic numbers, paired calls, xref analysis | |
| C/C++ structure recovery, vtables, std::string/vector/map, field type inference | |
tools/| Tool | Purpose |
|---|---|
| IDA Pro plugin (Ctrl-Shift-E) — exports the IDB into a |
| Frida agent — dumps DEX from a running Android process via memory scan + ClassLoader traversal |
| Setup notes and config snippets for connecting agents to upstream MCP servers ( |
tools/README.mdtools/mcp/file <binary> # file type, arch, bits, stripped?
xxd <binary> | head -4 # magic bytes
strings -a <binary> | head -60
checksec --file=<binary> # NX, PIE, RELRO, stack canary, ASLRreferences/static-analysis.mdreferences/dynamic-debugging.mdreferences/windows-re.mdreferences/static-analysis.mdreferences/managed-code-re.mdreferences/macos-kernel-re.mdreferences/ios-re.mdreferences/android-re.mdreferences/managed-code-re.mdreferences/windows-re.mdreferences/anticheat-re.mdreferences/managed-code-re.mdreferences/firmware-embedded.mdreferences/symbol-recovery.mdreferences/struct-recovery.mdreferences/unicorn-emulation.mdreferences/idapython.mdreferences/ghidra-scripting.mdStatic only → No execution risk, slower understanding
Dynamic only → Fast but misses dead code
Static + Dynamic (recommended) → Static for map, dynamic for runtime truth| Tool | Best For |
|---|---|
| Full decompilation, scripting, free |
| CLI powerhouse, scripting, embedded |
| API-first, fast, commercial |
| Industry standard, best signatures |
| Quick disassembly, no install |
| ELF symbol/section inspection |
| Android DEX → Java, GUI |
| APK unpack / repack / smali |
| Tool | Best For |
|---|---|
| Linux ELF debugging |
| macOS/iOS/Swift debugging |
| Cross-platform hooking, no source |
| Syscall / library call tracing |
| Memory errors, Helgrind |
| Windows kernel + user mode |
| Windows GUI debugger |
| Tool | Best For |
|---|---|
| Packet capture + dissection |
| HTTP/S MITM |
| In-process SSL unpin |
| Headless capture |
1. file + strings + checksec → quick triage
2. Entropy analysis → packed/encrypted?
3. Import table / symbol table → understand capabilities
4. Load in decompiler → rename, retype, annotate
5. Identify key functions → main(), crypto, network, anti-debug
6. Trace data flow → user input → sink
7. Document findings → comment inline1. Set up isolated environment → VM / container / device
2. Run with strace/ltrace first → understand syscall footprint
3. Attach debugger → set breakpoints at key functions
4. Observe runtime behavior → memory, registers, branches taken
5. Correlate with static → validate decompiler output
6. Patch / hook as needed → bypass checks, log values1. Attack surface mapping → inputs: file, network, env vars, args
2. Dangerous function search → strcpy, gets, sprintf, memcpy, system
3. Integer overflow candidates → size calculations, loops
4. Format string candidates → printf(user_input)
5. UAF / double-free candidates → heap allocation patterns
6. Trigger + confirm → crash → controlled → exploitable# Check if binary detects debugger
strings <bin> | grep -iE "ptrace|debugger|isDebuggerPresent|TracerPid"
# Linux: ptrace self-detection
# Bypass: preload hook or patch the ptrace call| Protection | Detection | Bypass |
|---|---|---|
| | Patch JNZ→JMP or LD_PRELOAD fake ptrace |
| Timing checks | | Patch comparison or NOP |
| Checksum/integrity | Hash of own .text section | Patch after decryption, before check |
| Packer (UPX etc.) | High entropy + small imports | |
| Obfuscated strings | No readable strings | Run + extract from memory / Frida hook |
| SSL pinning (mobile) | Network fail in app | Frida ssl-unpin / see |
## Binary: <name>
- **Format**: ELF64 / PE32+ / DEX / Mach-O
- **Arch**: x86_64 / ARM64 / ARMv7 / MIPS
- **Stripped**: Yes/No | **PIE**: Yes/No | **NX**: Yes/No
## Key Findings
1. <function name @ offset> — <what it does>
2. ...
## Vulnerability / Behavior
- <description with evidence>
- Offset: 0x<addr>
- Triggerable via: <input vector>
## Recommended Next Steps
- [ ] <action>Functions: verb_noun_context → decrypt_config_xor, check_license_hwid
Variables: type_purpose → buf_user_input, sz_packet, ptr_heap_chunk
Structs: ST_<name> → ST_PacketHeader, ST_LicenseData
Labels: loc_<purpose> → loc_anti_debug_fail, loc_successreferences/frida.md# In GDB: source this file
import gdb
class LogArgs(gdb.Breakpoint):
def stop(self):
frame = gdb.selected_frame()
print(f"[*] {frame.name()} rdi={gdb.parse_and_eval('$rdi')} rsi={gdb.parse_and_eval('$rsi')}")
return False # don't stop, just log
LogArgs("target_function")r2 -A -q -c "afl~suspicious; pdf @ sym.check_license" <binary>$GHIDRA_HOME/support/analyzeHeadless /tmp/proj MyProject \
-import <binary> -postScript PrintAST.java -scriptPath ~/ghidra_scripts