raptor README

项目的 README,来自 github.com/gadievron/raptor。合并为一个 markdown 文件:README.md。

╔═══════════════════════════════════════════════════════════════════════════╗
║                                                                           ║
║             ██████╗  █████╗ ██████╗ ████████╗ ██████╗ ██████╗             ║
║             ██╔══██╗██╔══██╗██╔══██╗╚══██╔══╝██╔═══██╗██╔══██╗            ║
║             ██████╔╝███████║██████╔╝   ██║   ██║   ██║██████╔╝            ║
║             ██╔══██╗██╔══██║██╔═══╝    ██║   ██║   ██║██╔══██╗            ║
║             ██║  ██║██║  ██║██║        ██║   ╚██████╔╝██║  ██║            ║
║             ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝        ╚═╝    ╚═════╝ ╚═╝  ╚═╝            ║
║                                                                           ║
║             Autonomous Offensive/Defensive Research Framework             ║
║             Based on Claude Code (v3.1.0)                                 ║
║                                                                           ║
║             Gadi Evron, Daniel Cuthbert, Thomas Dullien (Halvar Flake)    ║
║             Michael Bargury, John Cartwright                              ║
║                                                                           ║
╚═══════════════════════════════════════════════════════════════════════════╝

⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣤⣤⣀⣀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⣿⣿⠿⠿⠟
⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⣀⣀⣀⣤⣴⣶⣶⣶⣤⣿⡿⠁⠀⠀⠀
⣀⠤⠴⠒⠒⠛⠛⠛⠛⠛⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠁⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⣿⣿⣿⡟⠻⢿⡀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⢿⣿⠟⠀⠸⣊⡽⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡇⣿⡁⠀⠀⠀⠉⠁⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⠿⣿⣧⠀ Get them bugs.....⠀⠀⠀⠀⠀

Authors: Gadi Evron, Daniel Cuthbert, Thomas Dullien (Halvar Flake), Michael Bargury, John Cartwright (@gadievron, @danielcuthbert, @thomasdullien, @mbrg, @grokjc)

Licence: MIT, see LICENSE. CodeQL and other third-party components have their own licence terms; see third-party notices and dependencies.

Repository: https://github.com/gadievron/raptor


What is RAPTOR?

Built by hackers, for hackers.

RAPTOR is an autonomous security research framework built on top of Claude Code (but not tied to it -- you can plug in your own analysis layer too). It chains together static analysis, binary analysis, LLM-powered vulnerability validation, exploit generation, and patch writing into a single workflow you can run against a codebase or binary.

It is not polished software. It was built in free time, held together with enthusiasm and duct tape, and it works well enough that we can't stop using it. If you want to make it better, open a PR.

RAPTOR supports security research and human review; its reports do not certify that a codebase is secure.

RAPTOR stands for Recursive Autonomous Penetration Testing and Observation Robot. We really wanted to call it RAPTOR.

How it's built

RAPTOR is mostly AI-generated code. The humans set direction, review output, and make design decisions; the AI writes the implementation. Mechanical verification (tests, static analysis, corpus calibration) keeps the quality bar where it needs to be regardless of who — or what — wrote the code.

Start here: Capabilities · Quick start · First run · Security · Documentation

What RAPTOR can do

Maturity varies by workflow. The complete catalogue lists commands and their status; the workflow index helps you choose a starting point.

Why RAPTOR?

Security model

The repository being analysed can attack the analyst: through malicious code, repo-controlled configuration, prompt injection, or content rendered in a report. RAPTOR addresses those surfaces with several boundaries:

Prompt injection remains possible. Guarantees differ between untrusted execution, trusted-tool entry points, platforms, and operator-selected profiles; these controls are not a claim that all agent actions are isolated. Containers add a deployment boundary. See sandbox guarantees and limitations, agent security, the threat model, and WSL requirements for the exact contracts and residual risks.

Prerequisites

See installation and dependencies for platform requirements and optional tools.

Accounts and costs

The shell's Claude Code login is independent of the credentials used for finding analysis, which can use Claude Code, another provider, or a local model.

Subscription-backed Claude Code analysis has no separate API bill; API-backed Claude Code and external providers follow their backend's billing. The source-review examples below each set a $5 main-run ceiling (/agentic defaults to $10). Optional helpers have separate ceilings, so this is not an end-to-end cap across all processes. See model setup and billing for details. Offline operation requires prepared tools/data and appropriate egress controls.

Quick Start

RAPTOR runs from your checkout. The Docker image supplies its tools and dependencies. Use the stable RAPTOR release (v3.1.0) for normal use. Contributors should follow the developer setup.

Run these commands in your terminal to mount the release checkout in the tools container. The image digest pins the tools environment separately from RAPTOR:

git clone --branch v3.1.0 https://github.com/gadievron/raptor.git
cd raptor
docker pull docker.io/danielcuthbert/raptor:latest@sha256:7fac1dc8ba3ad8dbcd714ebab33dd3a243ae790e9541ec9842ccbcc9f9c02ef3
docker run -it \
  -v "$PWD:/workspaces/raptor" \
  -v "/path/to/target-folder:/workspaces/target" \
  docker.io/danielcuthbert/raptor:latest@sha256:7fac1dc8ba3ad8dbcd714ebab33dd3a243ae790e9541ec9842ccbcc9f9c02ef3

Replace the target path with your own, or omit that mount. For an existing checkout, switch to v3.1.0 first. Inside the container, run raptor.

For setup without Docker, see manual installation. Local builds, VS Code devcontainers and debugger requirements are covered in container installation.

What to expect on a first run

Use slash commands inside a RAPTOR session; run Python commands in your terminal from the checkout with its environment activated.

Source code

/agentic /path/to/code --max-cost-usd 5

Read agentic-report.md and the generated PoCs and patches in the run directory. Patches are not applied to the target. Expect minutes to tens of minutes, depending on the target and model. See workflow and outputs. For a mechanical scan without LLM analysis, use /scan /path/to/code.

Optional: standalone audit

/audit /path/to/code --budget 50 --max-cost 5

For a dedicated systematic review, examine up to 50 functions, with tool evidence and coverage recorded alongside findings. See the audit output-file reference for the files written by a run.

Dependencies without an LLM or Claude Code

python3 raptor.py sca --repo /path/to/project --no-llm

The SCA scan writes findings, a report, an SBOM, and SARIF.

Binary investigation

/binary investigate /path/to/binary

The default investigation maps the artefact and ranks leads without executing or fuzzing it. See binary analysis for outputs and the explicit steps that add runtime evidence.

What a finding tells you

Corpus illustration: a condensed walkthrough of a labelled WebGoat regression case:

Candidate: SQL injection in SqlInjectionLesson13.java
Evidence:  The request value is bound with PreparedStatement.setString
           before the prepared query is executed.
Verdict:   False positive for SQL injection on this path (corpus label).
Limit:     This does not establish that other paths or the application are safe.

Compare the candidate and code evidence with the label and rationale.

How RAPTOR checks itself

RAPTOR dogfoods a fair bit of its own security tooling. Some controls block PRs, some run on a schedule, and others measure whether results are drifting:

CI controls documents the exact triggers, evidence, limitations, and reproduction commands.

Documentation

Next step Guide
Install or configure tools Installation
Choose a workflow or look up a command Guides and command catalogue
Diagnose a failed or stalled run Troubleshooting
Understand isolation and trust boundaries Security and sandbox
Contribute to RAPTOR Contributing and developer guide

Contributing

RAPTOR is open source; contributions are welcome. See contributor guidance for opportunities and development conventions.

Submit pull requests. Chat with us on the #raptor channel in the Prompt||GTFO Slack: https://join.slack.com/t/promptgtfo/shared_invite/zt-3v2b4sll3-SfyzFRw2lykx_XQX7F3uNQ

Licence

MIT -- Copyright (c) 2025-2026 Gadi Evron, Daniel Cuthbert, Thomas Dullien (Halvar Flake), Michael Bargury, John Cartwright.

See LICENSE for the full text. Third-party components retain their own terms; see third-party notices, dependencies, and the CodeQL licence terms.

Issues: https://github.com/gadievron/raptor/issues

raptor (gadievron/raptor)

正在搜索数据库…

这是什么?RAPTOR 把 Claude Code 会话变成一个攻防两用的安全代理:通过 Claude.md 规则、子代理和技能来编排 radare2、Frida、Z3、CodeQL 等工具,用于二进制逆向工程、漏洞利用可行性研究和软件供应链(SCA)分析。
这是独立工具,还是对 Claude Code 的扩展?它不是独立应用。它是一组 Claude.md 规则、子代理定义和技能,用来配置正在运行的 Claude Code 会话,通过 /binary investigate、/binary harness、/sca 等斜杠命令驱动。
怎么把它跑起来?克隆仓库,把它的 Claude.md 规则、子代理和技能加载到 Claude Code 会话;之后用 /binary investigate、/binary trace-parser 和 /binary harness 驱动二进制逆向工程,用 /sca 进行依赖扫描。
运行它需要 Anthropic API 密钥或 Claude Code 吗?需要,RAPTOR 运行在 Claude Code 里,所以需要有 API 访问权限的 Claude Code;radare2、Frida 和 CodeQL 支撑二进制分析部分,Z3 SMT 求解器是用于可行性检查的可选组件。
它真的能证明漏洞可被利用吗?不能,它刻意保持保守:导入、选择器和调用边始终只是未证实的候选,直到有 Frida 跟踪、模糊测试崩溃、Z3 检查或二进制 diff 之类的机械化证据证明更多,而不是直接断言“可利用”。
它能在物理隔离(air-gapped)环境里运行吗?可以,engine/semgrep/rules/ 下的自定义 Semgrep 规则完全在本地运行,无需联网;只有可选的仓库规则包需要网络连接。
/sca 命令具体检查什么?它会发现依赖清单、锁定文件、内联安装命令和容器基础镜像,然后用 OSV 安全公告、CISA KEV、EPSS、CISA Vulnrichment/SSVC、可达性和许可证策略检查来丰富结果,输出 findings.json、report.md、CycloneDX SBOM 和供 CI 使用的 SARIF 文件。
什么额外证据能强化二进制发现?Frida 运行时观察、模糊测试崩溃证据、显式的 Z3 可满足性检查和二进制 diff,都可以叠加在静态调用图分析之上,把候选入口点升级为更强的发现。
Z3 怎么辅助漏洞利用研究?Z3 预先筛查 CodeQL 数据流路径的可满足性,在调用任何 LLM 之前就剔除不可达路径;它还根据寄存器/内存约束相对崩溃状态是否真的可满足,对 one-gadget 候选进行排序。
它能专门解析 macOS 和 Windows 的二进制吗?可以,对 Mach-O 应用会提取 slice 清单、bundle 元数据和 Objective-C/Swift 选择器;对 PE 文件会从 COFF 头读取架构,并分析 DLL 导出表和 Windows 驱动分发例程。
作者
gadievron
大小
112.1 MB
星标
4K
时长
1年
提交 · 90 天