--format liefREA vs Quarkslab LIEF• AI Reverse Engineering Guide
Quarkslab's library to parse, modify, and instrument ELF, PE, and Mach-O executable formats.
In AI-assisted reverse engineering with REA (rea-agents), Quarkslab LIEF is bridged via --format lief to allow Claude Code, Cursor, and Windsurf to extract symbol graphs, trace control flow, and decompile binaries headlessly via Model Context Protocol.
How REA Enhances Quarkslab LIEF with Autonomous AI Agents
Traditional reverse engineering in Quarkslab LIEF requires manual CFG graph navigation, manual symbol naming, and isolated local scripts without LLM code intelligence.
AI coding agents (Claude Code, Cursor) invoke Quarkslab LIEF headlessly via REA's Model Context Protocol (MCP), generating clean-room specifications and reconstructive code in seconds.
Multi-Platform Installation Recipes
pip install liefbrew install liefconda install -c conda-forge liefrea doctor --format liefSupported Platforms & Targets
Tool Overview & Role
LIEF (Library to Instrument Executable Formats) by Quarkslab is the industry-standard low-level binary parser, modifier, and re-builder for ELF, PE, and Mach-O files. LIEF operates directly on file structures without recompilation: adding new executable sections, injecting dynamic dependencies (DT_NEEDED in ELF, LC_LOAD_DYLIB in Mach-O), patching Import Address Tables (IAT), and stripping code signatures. REA couples LIEF with AI agents to verify file integrity, patch binary mitigations, and prepare instrumented binaries for dynamic telemetry.
REA Bridge Mechanism
Key Capabilities
CLI Usage Examples
Execute direct terminal analysis with --format lief:
lief-inspect ./binary.elf --sections
python3 -c 'import lief; b = lief.parse("./target"); b.add_library("libhook.so"); b.write("./patched");'