Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
L

LIEF

> 数据库
Open source

LIEF - Library to Instrument Executable Formats (C++, Python, Rust)

5.5K stars0 likes2 views
WebsiteGitHub

About

LIEF - Library to Instrument Executable Formats (C++, Python, Rust)



Blog • Documentation • About


About

The purpose of this project is to provide a cross-platform library to parse, modify and abstract ELF, PE and MachO formats.

Main features:

  • Parsing: LIEF can parse ELF, PE, MachO, COFF, OAT, DEX, VDEX, ART and provides a user-friendly API to access their internals.
  • Modify: LIEF can be used to modify some parts of these formats (adding a section, changing a symbol's name, ...)
  • Abstract: Three formats have common features like sections, symbols, entry point... LIEF factors them.
  • API: You can use LIEF via C++, Python, Rust, and Node.js (unofficial, AI-generated)

Extended features:

  • Runtime
  • DWARF/PDB Support
  • Objective-C Metadata
  • Dyld Shared Cache with support for extracting Dylib
  • Disassembler: AArch64, x86/x86-64, ARM, RISC-V, Mips, PowerPC, eBPF
  • Assembler: AArch64, x86/x86-64, RISC-V

Plugins:

  • Ghidra
  • BinaryNinja

Sponsors



Content

  • About
  • Downloads / Install
  • Getting started
  • Blog
  • Documentation
    • Rust
    • Sphinx
    • Doxygen
    • Tutorials:
      • Parse and manipulate formats
      • Play with ELF symbols
      • PE Resources
      • Transforming an ELF executable into a library
      • How to use frida on a non-rooted device
      • Android formats
      • Mach-O modification
      • ELF Coredump
      • PE Authenticode
  • Contact
  • About
    • Authors
    • License
    • BibTeX

Downloads / Install

C++

cmake
find_package(LIEF REQUIRED)
target_link_libraries(my-project LIEF::LIEF)

Rust

toml
[package]
name    = "my-awesome-project"
version = "0.0.1"
edition = "2024"

[dependencies]
lief = "1.0.0"

Homebrew

bash
brew install lief

Python

To install the latest version (release):

bash
pip install lief

To install nightly build:

bash
pip install [--user] --force-reinstall --index-url https://lief.s3-website.fr-par.scw.cloud/latest lief==2.0.0.dev0

Packages

  • LIEF Extended: https://extended.lief.re (GitHub OAuth)
  • Nightly:
    • SDK: https://lief.s3-website.fr-par.scw.cloud/latest/sdk
    • Python Wheels: https://lief.s3-website.fr-par.scw.cloud/latest/lief
  • v1.0.0: https://github.com/lief-project/LIEF/releases/tag/1.0.0

Here are guides to install or integrate LIEF:

  • Python
  • Visual Studio
  • Xcode
  • CMake

Getting started

Python

python
import lief

# ELF
binary = lief.parse("/usr/bin/ls")
for section in binary.sections:
    print(section.name, section.virtual_address)

# PE
binary = lief.parse(r"C:\Windows\explorer.exe")
if (rheader := binary.rich_header) is not None:
    print(rheader.key)

# Mach-O
binary = lief.parse("/usr/bin/ls")
if (fixups := binary.dyld_chained_fixups) is not None:
    print(fixups)

Rust

rust
use lief::Binary;
use lief::pe::debug::Entries::CodeViewPDB;

if let Some(Binary::PE(pe)) = Binary::parse(path.as_str()) {
    for entry in pe.debug() {
        if let CodeViewPDB(pdb_view) = entry {
            println!("{}", pdb_view.filename());
        }
    }
}

C++

…

Documentation

  • Main documentation
  • Doxygen
  • Rust

Contact

  • Mail: contact at lief re
  • Discord: LIEF

About

Authors

Romain Thomas (@rh0main) - Formerly at Quarkslab

License

Apache 2.0.

BibTeX

bibtex
@MISC {LIEF,
  author       = "Romain Thomas",
  title        = "LIEF - Library to Instrument Executable Formats",
  howpublished = "https://lief.quarkslab.com/",
  month        = "apr",
  year         = "2017"
}

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C++androidartbinary-analysisdex

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库