New LIEF 1.0.0 is available

Parse, inspect, modify, and build ELF, PE, Mach-O, and more through one consistent C++, Python, or Rust API.

Apache-2.0 Cross-platform

ELF PE Mach-O DWARF PDB Disassembler Assembler
Battle-tested binary infrastructure
10+years of continuous development
1,000,000+installs every month
Built for binary workflows

One Library. Every Layer.

Move from raw executable file formats to a high-level representation, make precise changes, then write a valid binary back to disk.

Explore the architecture
01 / ABSTRACT

Unified abstraction

Work with symbols, sections, relocations, and entry points through shared concepts across executable formats.

02 / INSPECT

Parse and inspect

Open binaries from files or memory and explore their structure without booting a heavyweight reverse-engineering stack.

03 / REWRITE

Modify and rebuild

Add sections, change symbols, patch metadata, and serialize the result with format-aware builders.

A comprehensive API

Binary insight in a few lines.

The same concepts stay recognizable whether you work in Python, C++, or Rust.

01

Cross-format

Start with a generic binary.

02

Typed and discoverable

Use a structured object model.

03

Ready to rewrite

Turn inspection code into transformation code without changing tools.

01import lief
02
03# Parse ELF, PE, or Mach-O with one entry point
04binary = lief.parse("/usr/bin/ssh")
05
06print(binary.format)
07print(hex(binary.entrypoint))
08
09for section in binary.sections:
10    print(section.name, section.size)
11
12# Modify and write a new binary
13binary.header.entrypoint = 0x401000
14binary.write("ssh.patched")
Live binary transformation

Watch one executable move through LIEF.

Follow a documented x86-64 ELF workflow from parsing and format analysis to an assembled patch and a rebuilt binary.

Explore the Python API
instrument.py
01 / LOADLIEF Core
import lief

elf = lief.ELF.parse("demo.elf")
assert elf is not None
Parsed executableELF64 · x86-64entry 0x401070
Pipeline Python · x86-64 ELF

API noteDisassembly and assembly are LIEF Extended capabilities. The mutation and rebuild stages use the open-source core API.

LIEF Extended

Go beyond file formats

Advanced assembly, disassembly, DWARF and PDB tooling build on the same familiar LIEF model for deeper binary reverse engineering workflows.

Assembler

Assemble x86-64, ARM64, RISC-V instructions directly from the API.

Disassembler

Decode machine code and connect instructions to executable metadata.

DWARF editor

Inspect and transform rich debug information with structured APIs.

PDB support

Work with Microsoft program databases alongside the binary they describe.

Project updates

From the LIEF blog.

Release notes, format deep dives, and engineering stories from the project.

View all posts
Romain Thomas

LIEF v1.0.0

LIEF 1.0.0: a new cross-platform Runtime API, faster Rust bindings, stable-ABI and free-threaded Python wheels

Read article
Romain Thomas

LIEF v0.17.0

This blog post highlights the different changes introduced in LIEF 0.17.0

Read article