No description
Find a file
Yan cd8e13da13 CFG: Scan only the Mach-O sections that hold instructions
_executable_memory_regions took every section of an executable Mach-O segment
without asking anything about the section, unlike the ELF, PE/COFF and XBE
branches beside it. The whole of __TEXT is r-x, so the regions to analyze
covered the constant pools, string literals, unwind tables and Objective-C and
Swift metadata sitting beside the code: 73,172 bytes over eleven regions on
tests/aarch64/ReverseOneSignal.app/Frameworks/OneSignalCore.framework/OneSignalCore
against the 55,984 bytes in four that the file states hold instructions, and
2,195,844 against 1,699,668 on a larger dylib.

Requires the cle change that makes MachOSection.is_executable answer from the
section's own S_ATTR_*INSTRUCTIONS bits; against a cle without it this filter
is a no-op, because every section of an r-x segment still reports as executable.

Over every Mach-O in binaries the regions shrink to exactly the sections that
state instructions, and the blocks that go with them are 33 that began in
__unwind_info, __cstring, __objc_methname and __objc_classname, plus one on
armhf/FileProtection-05.armv7.macho that began in the last word of __stub_helper
and ran 194 bytes into __objc_methname. Eight fixtures gain a four-byte block at
the last word of __objc_stubs, a brk #1 the merged region caused the scan to
step over. No block that begins inside a section stating instructions is lost.
2026-08-17 05:22:59 +00:00
.github ci: bump taiki-e/install-action from 2.85.2 to 2.85.5 (#6753) 2026-08-03 09:37:54 -07:00
angr CFG: Scan only the Mach-O sections that hold instructions 2026-08-17 05:22:59 +00:00
corpus_tests [pre-commit.ci] pre-commit autoupdate (#6721) 2026-07-29 13:46:11 -07:00
docs docs: Fix dangling links (#6533) 2026-07-23 17:31:25 -07:00
native CFGFast: Make the smart scan nodecode ratio O(log n) (#6767) 2026-08-05 01:42:45 -07:00
tests CFG: Scan only the Mach-O sections that hold instructions 2026-08-17 05:22:59 +00:00
.dockerignore Oxidizer: Rust pseudocode generation (#6283) 2026-05-19 07:15:07 -07:00
.git-blame-ignore-revs .git-blame-ignore-revs: Fix reference 2025-11-26 17:44:09 -07:00
.gitignore DecompilationCache: Serialization support. (#6624) 2026-07-22 03:03:40 -07:00
.pre-commit-config.yaml [pre-commit.ci] pre-commit autoupdate (#6754) 2026-08-03 11:15:42 -07:00
.readthedocs.yml docs: Use integrated RTD rust support (#6382) 2026-05-01 23:08:38 -07:00
Cargo.lock rust: bump regex from 1.12.2 to 1.13.1 (#6640) 2026-07-20 10:08:14 -07:00
Cargo.toml Update to Rust 1.88 (#5561) 2025-06-26 21:00:49 -07:00
COPYRIGHT Update LICENSE and COPYRIGHT. (#5376) 2025-03-27 23:58:21 -07:00
LICENSE Update LICENSE and COPYRIGHT. (#5376) 2025-03-27 23:58:21 -07:00
MANIFEST.in DecompilationCache: Serialization support. (#6624) 2026-07-22 03:03:40 -07:00
pyproject.toml Update version to 9.3.3.dev0 [ci skip] 2026-08-05 09:02:54 +00:00
README.md [pre-commit.ci] pre-commit autoupdate (#6721) 2026-07-29 13:46:11 -07:00
rust-toolchain.toml Upgrade rust toolchain to 1.96 (#6552) 2026-06-29 17:13:42 -07:00
SECURITY.md Draft security and reporting advisory (#3072) 2022-01-09 19:49:40 -07:00
setup.py DecompilationCache: Serialization support. (#6624) 2026-07-22 03:03:40 -07:00

angr

Latest Release Python Version PyPI Statistics License

angr is a platform-agnostic binary analysis framework. It is brought to you by the Computer Security Lab at UC Santa Barbara, SEFCOM at Arizona State University, their associated CTF team, Shellphish, the open source community, and @rhelmot.

Homepage: https://angr.io

Project repository: https://github.com/angr/angr

Documentation: https://docs.angr.io

API Documentation: https://docs.angr.io/en/latest/api.html

What is angr?

angr is a suite of Python 3 libraries that let you load a binary and do a lot of cool things to it:

  • Disassembly and intermediate-representation lifting
  • Program instrumentation
  • Symbolic execution
  • Control-flow analysis
  • Data-dependency analysis
  • Value-set analysis (VSA)
  • Decompilation

The most common angr operation is loading a binary: p = angr.Project('/bin/bash') If you do this in an enhanced REPL like IPython, you can use tab-autocomplete to browse the top-level-accessible methods and their docstrings.

The short version of "how to install angr" is mkvirtualenv --python=$(which python3) angr && python -m pip install angr.

Example

angr does a lot of binary analysis stuff. To get you started, here's a simple example of using symbolic execution to get a flag in a CTF challenge.

import angr

project = angr.Project("angr-doc/examples/defcamp_r100/r100", auto_load_libs=False)


@project.hook(0x400844)
def print_flag(state):
    print("FLAG SHOULD BE:", state.posix.dumps(0))
    project.terminate_execution()


project.execute()

Quick Start