LIEF parses, inspects, modifies, and rebuilds ELF, PE, Mach-O, and related binaries from C++, Python, or Rust. It also supports Android OAT/DEX and disassembly extensions.
Overview
LIEF unifies work with executable formats behind one API. You can load binaries from disk or memory, walk sections and symbols, change metadata, and write valid output files again.
Core parsing covers ELF, PE, Mach-O, COFF, and Android formats such as DEX and OAT. Extended builds add DWARF and PDB awareness, disassemblers for several architectures, assemblers for selected ISAs, and plugins for Ghidra and Binary Ninja workflows.
Packages ship for Python pip installs, C++ linking, and Rust crates, with documentation and tutorials for common manipulation tasks. The project has years of steady development and widespread package manager installs.
Key features
- Multi-format binary parsing
- Binary modification and rebuild
- Cross-language APIs
- Android DEX and OAT support
- Disassembler and assembler extensions
- DWARF and PDB inspection
Use cases
- Malware and binary analysis
- ELF and PE introspection
- Android package inspection
- Binary patching research
- Security tool integrations