{"id":13387798,"url":"https://github.com/lief-project/lief","last_synced_at":"2026-02-21T11:05:29.488Z","repository":{"id":37580285,"uuid":"85205851","full_name":"lief-project/LIEF","owner":"lief-project","description":"LIEF - Library to Instrument Executable Formats (C++, Python, Rust)","archived":false,"fork":false,"pushed_at":"2025-05-06T05:34:08.000Z","size":92930,"stargazers_count":4790,"open_issues_count":49,"forks_count":653,"subscribers_count":130,"default_branch":"main","last_synced_at":"2025-05-06T16:13:13.363Z","etag":null,"topics":["android","art","binary-analysis","dex","elf","executable-formats","lief","macho","malware-analysis","modification","oat","parser","parsing","pe","python","reverse-engineering","rust","sdk","vdex"],"latest_commit_sha":null,"homepage":"https://lief.re","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lief-project.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["lief-project"]}},"created_at":"2017-03-16T14:34:53.000Z","updated_at":"2025-05-06T05:34:13.000Z","dependencies_parsed_at":"2023-09-22T02:16:41.550Z","dependency_job_id":"eaeb8dc1-a97d-4389-bf71-ad7bdf2fcbcd","html_url":"https://github.com/lief-project/LIEF","commit_stats":{"total_commits":1477,"total_committers":110,"mean_commits":"13.427272727272728","dds":0.6201760324983074,"last_synced_commit":"284001d4c12563fe6133cfa01e03fdca59afd22f"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lief-project%2FLIEF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lief-project%2FLIEF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lief-project%2FLIEF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lief-project%2FLIEF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lief-project","download_url":"https://codeload.github.com/lief-project/LIEF/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253990456,"owners_count":21995773,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","art","binary-analysis","dex","elf","executable-formats","lief","macho","malware-analysis","modification","oat","parser","parsing","pe","python","reverse-engineering","rust","sdk","vdex"],"created_at":"2024-07-30T12:01:31.724Z","updated_at":"2026-02-21T11:05:29.483Z","avatar_url":"https://github.com/lief-project.png","language":"C++","readme":"\u003cp align=\"center\" \u003e\n\u003cimg width=\"90%\" src=\"https://github.com/lief-project/LIEF/blob/main/.github/images/architecture.png\"/\u003e\u003cbr /\u003e\n\u003c/p\u003e\n\u003cbr /\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://lief.re/blog/\"\u003e\u003cb\u003eBlog\u003c/b\u003e\u003c/a\u003e •\n  \u003ca href=\"https://lief.re/doc/latest/index.html\"\u003e\u003cb\u003eDocumentation\u003c/b\u003e\u003c/a\u003e •\n  \u003ca href=\"#user-content-about-1\"\u003e\u003cb\u003eAbout\u003c/b\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cbr /\u003e\n\n# About\n\nThe purpose of this project is to provide a cross-platform library to parse,\nmodify and abstract ELF, PE and MachO formats.\n\n**Main features**:\n\n  * **Parsing**: LIEF can parse [ELF](https://lief.re/doc/latest/formats/elf/index.html), [PE](https://lief.re/doc/latest/formats/pe/index.html), [MachO](https://lief.re/doc/latest/formats/macho/index.html), [COFF](https://lief.re/doc/latest/formats/coff/index.html), OAT, DEX, VDEX, ART and provides an user-friendly API to access to internals.\n  * **Modify**: LIEF can use to modify some parts of these formats (adding a section, changing a symbol's name, ...)\n  * **Abstract**: Three formats have common features like sections, symbols, entry point... LIEF factors them.\n  * **API**: LIEF can be used in [C++](https://lief.re/doc/latest/doxygen/), Python, [Rust](https://lief-rs.s3.fr-par.scw.cloud/doc/latest/lief/index.html), C and\n    [Node.js](https://github.com/Piebald-AI/node-lief) (unofficial, AI-generated)\n\n**Extended features**:\n\n  * [**DWARF/PDB** Support](https://lief.re/doc/latest/extended/debug_info/index.html)\n  * [**Objective-C** Metadata](https://lief.re/doc/latest/extended/objc/index.html)\n  * [**Dyld Shared Cache**](https://lief.re/doc/latest/extended/dsc/index.html) with support for extracting Dylib\n  * [**Disassembler**](https://lief.re/doc/latest/extended/disassembler/index.html): AArch64, x86/x86-64, ARM, RISC-V, Mips, PowerPC, eBPF\n  * [**Assembler**](https://lief.re/doc/latest/extended/assembler/index.html): AArch64, x86/x86-64\n\n**Plugins**:\n\n  * [**Ghidra**](https://lief.re/doc/latest/plugins/ghidra/index.html)\n  * [**BinaryNinja**](https://lief.re/doc/latest/plugins/binaryninja/index.html)\n\n# Sponsors\n\n\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://quansight.com/\" target=\"_blank\"\u003e\n\u003cimg width=\"300px\" src=\"https://lief.re/quansight_logo.jpg\"/\u003e\u003cbr /\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n# Content\n\n- [About](#about)\n- [Download / Install](#downloads--install)\n- [Getting started](#getting-started)\n- [Blog](https://lief.re/blog/)\n- [Documentation](#documentation)\n  - [Rust](https://lief.re/doc/stable/rust/lief/)\n  - [Sphinx](https://lief.re/doc/latest/index.html)\n  - [Doxygen](https://lief.re/doc/latest/doxygen/index.html)\n  - Tutorials:\n    - [Parse and manipulate formats](https://lief.re/doc/latest/tutorials/01_play_with_formats.html)\n    - [Play with ELF symbols](https://lief.re/doc/latest/tutorials/03_elf_change_symbols.html)\n    - [PE Resources](https://lief.re/doc/latest/tutorials/07_pe_resource.html)\n    - [Transforming an ELF executable into a library](https://lief.re/doc/latest/tutorials/08_elf_bin2lib.html)\n    - [How to use frida on a non-rooted device](https://lief.re/doc/latest/tutorials/09_frida_lief.html)\n    - [Android formats](https://lief.re/doc/latest/tutorials/10_android_formats.html)\n    - [Mach-O modification](https://lief.re/doc/latest/tutorials/11_macho_modification.html)\n    - [ELF Coredump](https://lief.re/doc/latest/tutorials/12_elf_coredump.html)\n    - [PE Authenticode](https://lief.re/doc/latest/tutorials/13_pe_authenticode.html)\n- [Contact](#contact)\n- [About](#about)\n  - [Authors](#authors)\n  - [License](#license)\n  - [Bibtex](#bibtex)\n\n## Downloads / Install\n\n## C++\n\n```cmake\nfind_package(LIEF REQUIRED)\ntarget_link_libraries(my-project LIEF::LIEF)\n```\n\n## Rust\n\n```toml\n[package]\nname    = \"my-awesome-project\"\nversion = \"0.0.1\"\nedition = \"2021\"\n\n[dependencies]\nlief = \"0.17.4\"\n```\n\n## Python\n\nTo install the latest **version** (release):\n\n```console\npip install lief\n```\n\nTo install nightly build:\n\n```console\npip install [--user] --force-reinstall --index-url https://lief.s3-website.fr-par.scw.cloud/latest lief==1.0.0.dev0\n```\n\n### Packages\n\n- LIEF Extended: https://extended.lief.re (GitHub OAuth)\n- **Nightly**:\n  * SDK: https://lief.s3-website.fr-par.scw.cloud/latest/sdk\n  * Python Wheels: https://lief.s3-website.fr-par.scw.cloud/latest/lief\n- **v0.17.4**: https://github.com/lief-project/LIEF/releases/tag/0.17.4\n\nHere are guides to install or integrate LIEF:\n\n  * [Python](https://lief.re/doc/latest/installation.html#python)\n  * [Visual Studio](https://lief.re/doc/latest/installation.html#visual-studio-integration)\n  * [XCode](https://lief.re/doc/latest/installation.html#xcode-integration)\n  * [CMake](https://lief.re/doc/latest/installation.html#cmake-integration)\n\n## Getting started\n\n### Python\n\n```python\nimport lief\n\n# ELF\nbinary = lief.parse(\"/usr/bin/ls\")\nfor section in binary.sections:\n    print(section.name, section.virtual_address)\n\n# PE\nbinary = lief.parse(\"C:\\\\Windows\\\\explorer.exe\")\n\nif rheader := pe.rich_header:\n    print(rheader.key)\n\n# Mach-O\nbinary = lief.parse(\"/usr/bin/ls\")\nfor fixup in binary.dyld_chained_fixups:\n    print(fixup)\n```\n\n### Rust\n\n```rust\nuse lief::Binary;\nuse lief::pe::debug::Entries::CodeViewPDB;\n\nif let Some(Binary::PE(pe)) = Binary::parse(path.as_str()) {\n    for entry in pe.debug() {\n        if let CodeViewPDB(pdb_view) = entry {\n            println!(\"{}\", pdb_view.filename());\n        }\n    }\n}\n```\n\n### C++\n\n```cpp\n#include \u003cLIEF/LIEF.hpp\u003e\n\nint main(int argc, char** argv) {\n  // ELF\n  if (std::unique_ptr\u003cconst LIEF::ELF::Binary\u003e elf = LIEF::ELF::Parser::parse(\"/bin/ls\")) {\n    for (const LIEF::ELF::Section\u0026 section : elf-\u003esections()) {\n      std::cout \u003c\u003c section-\u003ename() \u003c\u003c ' ' \u003c\u003c section-\u003evirtual_address() \u003c\u003c '\\n';\n    }\n  }\n\n  // PE\n  if (std::unique_ptr\u003cconst LIEF::PE::Binary\u003e pe = LIEF::PE::Parser::parse(\"C:\\\\Windows\\\\explorer.exe\")) {\n    if (const LIEF::PE::RichHeader* rheader : pe-\u003erich_header()) {\n      std::cout \u003c\u003c rheader-\u003ekey() \u003c\u003c '\\n';\n    }\n  }\n\n  // Mach-O\n  if (std::unique_ptr\u003cLIEF::MachO::FatBinary\u003e macho = LIEF::MachO::Parser::parse(\"/bin/ls\")) {\n    for (const LIEF::MachO::DyldChainedFixups\u0026 fixup : macho-\u003edyld_chained_fixups()) {\n      std::cout \u003c\u003c fixup \u003c\u003c '\\n';\n    }\n  }\n\n  return 0;\n}\n\n```\n\n### C (Limited API)\n\n```cpp\n#include \u003cLIEF/LIEF.h\u003e\n\nint main(int argc, char** argv) {\n  Elf_Binary_t* elf = elf_parse(\"/usr/bin/ls\");\n\n  Elf_Section_t** sections = elf-\u003esections;\n\n  for (size_t i = 0; sections[i] != NULL; ++i) {\n    printf(\"%s\\n\", sections[i]-\u003ename);\n  }\n\n  elf_binary_destroy(elf);\n  return 0;\n}\n```\n\n## Documentation\n\n* [Main documentation](https://lief.re/doc/latest/index.html)\n* [Doxygen](https://lief.re/doc/latest/doxygen/index.html)\n* [Rust](https://lief.re/doc/stable/rust/lief/)\n\n## Contact\n\n* **Mail**: contact at lief re\n* **Discord**: [LIEF](https://discord.gg/7hRFGWYedu)\n\n## About\n\n### Authors\n\nRomain Thomas ([@rh0main](https://www.romainthomas.fr/)) - Formerly at [Quarkslab](https://www.quarkslab.com)\n\n### License\n\nLIEF is provided under the [Apache 2.0 license](https://github.com/lief-project/LIEF/blob/0.17.4/LICENSE).\n\n### Bibtex\n\n```bibtex\n@MISC {LIEF,\n  author       = \"Romain Thomas\",\n  title        = \"LIEF - Library to Instrument Executable Formats\",\n  howpublished = \"https://lief.quarkslab.com/\",\n  month        = \"apr\",\n  year         = \"2017\"\n}\n```\n\n\n","funding_links":["https://github.com/sponsors/lief-project"],"categories":["\u003ca id=\"1d9dec1320a5d774dc8e0e7604edfcd3\"\u003e\u003c/a\u003e工具-新添加的"],"sub_categories":["\u003ca id=\"8f1b9c5c2737493524809684b934d49a\"\u003e\u003c/a\u003e文章\u0026\u0026视频"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flief-project%2Flief","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flief-project%2Flief","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flief-project%2Flief/lists"}