gavmor/x86-cpp-reversing-skill

Claude Code skill for reverse-engineering 32-bit little-endian x86 C++ binaries (vtables, RTTI, inheritance recovery)

0

stars

49

commits

Python

primary language

Sep 13, 2026

updated

README

x86-cpp-reversing

A Claude Code skill for reverse-engineering 32-bit little-endian x86 (IA-32) binaries and disassembly compiled from C++. Recovers class layouts, vtables, virtual dispatch, and RTTI/inheritance hierarchies from ELF or PE binaries, and covers the workflows that come up once you have that structure: recovering a custom file format, mapping a data file's indexed entries back to the code/entity that uses them, and recognizing obfuscation or anti-debugging tricks along the way.

Built for agent use: SKILL.md is the entry point an agent reads, written so that mechanical, well-specified work (ABI struct layouts, relocation resolution, symbol demangling) is front-loaded into structured JSON via scripts/recon.py rather than spent as reasoning effort on raw disassembly. Everything degrades gracefully to manual objdump/readelf/nm/GDB recipes if the fancier tooling (radare2, LIEF, Triton) isn't available.

What it covers

AreaAutomated?Where
ELF/Itanium ABI (GCC/Clang, _Z-mangled): vtables, RTTI, multiple/virtual inheritanceYes -- scripts/recon.pyreferences/itanium-abi.md
PE/MSVC ABI (?-mangled): __thiscall, vftable, Complete Object Locator, vbtable, stripped .rdata scanningManual / Scriptedreferences/msvc-abi.md
Automated C++ class recovery via OOAnalyzer (Pharos / SWI-Prolog)Yes -- CLI / JSONreferences/tool-recipes.md §12
Data-table field attribution and struct recovery (stride analysis, displacement envelopes, type inference)Manual recipe (REWARDS/TIE)references/tool-recipes.md §13
Programmatic binary analysis (immediate xref sweepers, recursive disassembly, boundary detection)Scriptable (Python + Capstone + LIEF)references/tool-recipes.md §14
Custom binary file-format loaders (no C++ classes involved)Manual recipereferences/tool-recipes.md §9
Resource-binding recovery: mapping a data file's indexed entries to the code/owner that uses themManual recipe + scripts/backward_slice.py (Triton-based backward slicing)references/tool-recipes.md §10
WinDbg/DbgEng dynamic analysis (native Windows PE binaries GDB can't attach to)Manual recipereferences/tool-recipes.md §11
Recognizing obfuscation (junk code, opaque predicates, xref-evasion tricks)Manual recipereferences/obfuscation.md
Recognizing anti-debugging techniquesManual recipereferences/anti-debugging.md

Requirements

  • Always available: objdump, readelf, nm, c++filt, gdb (standard binutils/GDB, present on almost any Linux box).
  • Recommended, not required: radare2 + r2pipe, and pip install lief capstone pwntools -- unlocks the automated/structured recipes; without them, references/tool-recipes.md has manual fallbacks for everything.
  • Optional, for scripts/backward_slice.py only: triton-library (the JonathanSalwan/Triton binary-analysis project) in a dedicated virtualenv -- do not pip install triton-library into your regular environment if you have any ML tooling installed (PyTorch, vLLM, etc.), since OpenAI's unrelated GPU-kernel-compiler package is also importable as triton and the two collide. See AGENTS.md and the script's own docstring.

Installing as a Claude Code skill

git clone git@github.com:gavmor/x86-cpp-reversing-skill.git ~/.agents/skills/x86-cpp-reversing
ln -s ~/.agents/skills/x86-cpp-reversing ~/.claude/skills/x86-cpp-reversing

Claude Code will pick it up automatically for prompts like "what does this .exe do," "recover the class hierarchy from this binary," or "why does this crash inside a virtual call" -- see SKILL.md's description for the full trigger conditions.

Repo layout

SKILL.md                    entry point: workflow, triage steps, anti-rationalization table, exit criteria
AGENTS.md                   instructions for agents editing this repo's own content
scripts/recon.py            LIEF-based static triage + Itanium ABI vtable/RTTI recovery
scripts/backward_slice.py   Triton-based backward slicing (needs its own venv, see above)
references/itanium-abi.md   ELF/Itanium ABI details
references/msvc-abi.md      PE/MSVC ABI details
references/tool-recipes.md  concrete commands, by task (triage through §14)
references/obfuscation.md   recognizing deliberate obfuscation
references/anti-debugging.md recognizing anti-debugging techniques

Contributing

If you're extending this skill's own content (not just using it against a target binary), read AGENTS.md first -- in particular, its norm on verifying external tool/library/paper citations against the primary source before they land in references/*.md.

Contributors

gavmor

49 commits

gavmor/x86-cpp-reversing-skill

Claude Code skill for reverse-engineering 32-bit little-endian x86 C++ binaries (vtables, RTTI, inheritance recovery)

0

stars

49

commits

Python

primary language

Sep 13, 2026

updated

README

x86-cpp-reversing

A Claude Code skill for reverse-engineering 32-bit little-endian x86 (IA-32) binaries and disassembly compiled from C++. Recovers class layouts, vtables, virtual dispatch, and RTTI/inheritance hierarchies from ELF or PE binaries, and covers the workflows that come up once you have that structure: recovering a custom file format, mapping a data file's indexed entries back to the code/entity that uses them, and recognizing obfuscation or anti-debugging tricks along the way.

Built for agent use: SKILL.md is the entry point an agent reads, written so that mechanical, well-specified work (ABI struct layouts, relocation resolution, symbol demangling) is front-loaded into structured JSON via scripts/recon.py rather than spent as reasoning effort on raw disassembly. Everything degrades gracefully to manual objdump/readelf/nm/GDB recipes if the fancier tooling (radare2, LIEF, Triton) isn't available.

What it covers

AreaAutomated?Where
ELF/Itanium ABI (GCC/Clang, _Z-mangled): vtables, RTTI, multiple/virtual inheritanceYes -- scripts/recon.pyreferences/itanium-abi.md
PE/MSVC ABI (?-mangled): __thiscall, vftable, Complete Object Locator, vbtable, stripped .rdata scanningManual / Scriptedreferences/msvc-abi.md
Automated C++ class recovery via OOAnalyzer (Pharos / SWI-Prolog)Yes -- CLI / JSONreferences/tool-recipes.md §12
Data-table field attribution and struct recovery (stride analysis, displacement envelopes, type inference)Manual recipe (REWARDS/TIE)references/tool-recipes.md §13
Programmatic binary analysis (immediate xref sweepers, recursive disassembly, boundary detection)Scriptable (Python + Capstone + LIEF)references/tool-recipes.md §14
Custom binary file-format loaders (no C++ classes involved)Manual recipereferences/tool-recipes.md §9
Resource-binding recovery: mapping a data file's indexed entries to the code/owner that uses themManual recipe + scripts/backward_slice.py (Triton-based backward slicing)references/tool-recipes.md §10
WinDbg/DbgEng dynamic analysis (native Windows PE binaries GDB can't attach to)Manual recipereferences/tool-recipes.md §11
Recognizing obfuscation (junk code, opaque predicates, xref-evasion tricks)Manual recipereferences/obfuscation.md
Recognizing anti-debugging techniquesManual recipereferences/anti-debugging.md

Requirements

  • Always available: objdump, readelf, nm, c++filt, gdb (standard binutils/GDB, present on almost any Linux box).
  • Recommended, not required: radare2 + r2pipe, and pip install lief capstone pwntools -- unlocks the automated/structured recipes; without them, references/tool-recipes.md has manual fallbacks for everything.
  • Optional, for scripts/backward_slice.py only: triton-library (the JonathanSalwan/Triton binary-analysis project) in a dedicated virtualenv -- do not pip install triton-library into your regular environment if you have any ML tooling installed (PyTorch, vLLM, etc.), since OpenAI's unrelated GPU-kernel-compiler package is also importable as triton and the two collide. See AGENTS.md and the script's own docstring.

Installing as a Claude Code skill

git clone git@github.com:gavmor/x86-cpp-reversing-skill.git ~/.agents/skills/x86-cpp-reversing
ln -s ~/.agents/skills/x86-cpp-reversing ~/.claude/skills/x86-cpp-reversing

Claude Code will pick it up automatically for prompts like "what does this .exe do," "recover the class hierarchy from this binary," or "why does this crash inside a virtual call" -- see SKILL.md's description for the full trigger conditions.

Repo layout

SKILL.md                    entry point: workflow, triage steps, anti-rationalization table, exit criteria
AGENTS.md                   instructions for agents editing this repo's own content
scripts/recon.py            LIEF-based static triage + Itanium ABI vtable/RTTI recovery
scripts/backward_slice.py   Triton-based backward slicing (needs its own venv, see above)
references/itanium-abi.md   ELF/Itanium ABI details
references/msvc-abi.md      PE/MSVC ABI details
references/tool-recipes.md  concrete commands, by task (triage through §14)
references/obfuscation.md   recognizing deliberate obfuscation
references/anti-debugging.md recognizing anti-debugging techniques

Contributing

If you're extending this skill's own content (not just using it against a target binary), read AGENTS.md first -- in particular, its norm on verifying external tool/library/paper citations against the primary source before they land in references/*.md.

Contributors

gavmor

49 commits

Languages

Python

100.0%