MicrosoftWindows96/vrp-hunt
GitHub: MicrosoftWindows96/vrp-hunt
VRP Hunt 是一个专为授权漏洞赏金研究设计的 Python 工具包,解决安全研究工作流中的合规性和自动化问题。
Stars: 1 | Forks: 0
# VRP 搜索
VRP Hunt 是一个面向 Google 和 Alphabet VRP 范围的授权漏洞研究工作流程的 Python 工具包。它专注于防护栏、侦察资产建模、分类、证据处理和报告准备。项目设计为失败关闭模式:不安全的范围、模糊的目标、缺失的自有账户确认、第三方数据暴露以及未经批准的高风险操作将在执行前被阻止。
本仓库不包含漏洞利用自动化工具、账户创建工具或进行实际网络请求的测试。
## 包含内容
- `vrp_hunt.guardrails`:范围规范化、策略检查、审计数据和保守的速率限制合约。
- `vrp_hunt.programs`:漏洞赏金计划注册表加载、范围匹配、奖励元数据、安全港摘要、排除项和速率限制记录。
- `vrp_hunt.recon`:共享的侦察模型、资产清单存储、适配器、调度、被动源就绪性检查以及用于 HTTPX 和 nuclei 命令创建的安全包装接口。
- `vrp_hunt.web_recon`:被动网络侦察解析、受保护主机过滤、礼貌探测、JavaScript URL 提取、端点提取、技术说明和已编辑的潜在密钥说明。
- `vrp_hunt.mobile_recon`:Android/iOS 产物建模、jadx/Frida/objection 和模拟器命令构建器、清单解析、端点提取、深度链接提取和已编辑的潜在密钥说明。
- `vrp_hunt.triage`:奖励估算以及基于侦察资产和漏洞假设的确定性预期价值队列。
- `vrp_hunt.playbooks`:手动测试手册以及用于验证自有账户和无第三方数据的发现产物。
- `vrp_hunt.reporting`:证据、PoC 元数据、报告草稿、Markdown 渲染以及针对提交就绪产物的质量检查。
- `vrp_hunt.tracking`:提交生命周期日志、奖励对账、排行榜说明和上诉窗口草稿。
- `vrp_hunt.agent`:受限的自主规划与执行,具有试运行默认设置、操作预算、审批关卡、可插拔模型提供者、已批准的实时工具运行器和已编辑的工作流产物。
## 仓库布局
```
src/vrp_hunt/ Python package
tests/ Unit and property tests
config/ Shared rule data and local policy example
docs/ Safety and agent workflow documentation
google-alphabet-vrp-rules.md
Local digest of the external Google/Alphabet VRP rules
pyproject.toml Package metadata and tool configuration
uv.lock Locked development environment
```
生成的规划笔记、运行产物、虚拟环境、缓存、本地操作员策略和密钥被 Git 故意忽略。
## 要求
- Python 3.11 或更新版本
- `uv`
- 可选的实时侦察工具(仅在明确使用时):`subfinder`、ProjectDiscovery 的 `httpx` 和 `jadx`
## 设置
```
uv sync
```
仅用于实时侦察时,请从提交的示例创建本地操作员策略,并将实际文件排除在版本控制之外:
```
cp config/operator_policy.example.yaml config/operator_policy.yaml
```
编辑 `config/operator_policy.yaml` 使 `authorized_operator_id` 和 `authorized_local_user` 匹配法律上负责的本地操作员。除非传递了 `--operator-policy`,否则 CLI 默认对 `live-recon` 使用此文件。
## 质量检查
```
uv run pytest
uv run ruff check .
uv run mypy
```
测试套件设计为离线运行。它不应进行实际网络请求或启动侦察工具。
## CLI 快速入门
构建离线计划:
```
uv run vrp-hunt agent-plan \
--asset url:https://accounts.google.com/profile \
--mode offline
```
根据配置的程序注册表检查目标:
```
uv run vrp-hunt program-match \
--target https://accounts.google.com/
```
比较两个程序注册表快照并显示新的奖励资格范围:
```
uv run vrp-hunt program-diff \
--old-registry old-program-registry.yaml \
--new-registry config/program_registry.yaml \
--fresh-only
```
将本地平台范围导出转换为注册表架构:
```
uv run vrp-hunt program-ingest \
--source hackerone \
--input exports/google-hackerone-scope.json \
--captured-date 2026-05-16 \
--output artifacts/programs/google-registry.json
```
在手动提交前,根据质量检查和本地程序注册表验证已保存的报告草稿:
```
uv run vrp-hunt submission-checklist \
--report artifacts/finding-1-report.json \
--output artifacts/finding-1-submission-checklist.json \
--markdown-output artifacts/finding-1-report.md
```
运行声明性侦察工作流:
```
uv run vrp-hunt recon-workflow \
--workflow workflows/google-recon.yaml \
--operator-id "$VRP_HUNT_OPERATOR_ID" \
--accept-legal-liability
```
在不打印密钥值的情况下检查被动侦察源就绪性:
```
uv run vrp-hunt passive-sources
uv run vrp-hunt passive-sources-env-template --output .env.passive.example
```
根据置信度、新鲜度、被动源归属和优先级对现有侦察资产评分:
```
uv run vrp-hunt asset-score \
--asset-file artifacts/recon-depth/assets.jsonl \
--output artifacts/recon-depth/asset-scores.json
```
使用预解析的不存在主机探测消除已保存的通配符 DNS 噪音:
```
uv run vrp-hunt wildcard-dns-filter \
--asset-file artifacts/dns/assets.jsonl \
--probe "probe-one.google.com=203.0.113.10" \
--probe "probe-two.google.com=203.0.113.10" \
--assets-output artifacts/dns/filtered-assets.jsonl
```
构建 DNS 收集命令并导入已保存的 `dig +short` 输出,用于 CNAME、MX、TXT、NS、CAA、SPF 和 DMARC 记录:
```
uv run vrp-hunt dns-record-plan \
--domain google.com \
--output artifacts/dns/dns-plan.json
uv run vrp-hunt dns-record-import \
--domain google.com \
--record "google.com:MX=artifacts/dns/google-mx.txt" \
--record "google.com:TXT=artifacts/dns/google-txt.txt" \
--record "_dmarc.google.com:TXT=artifacts/dns/google-dmarc.txt" \
--output artifacts/dns/dns-records.json
```
根据已保存的 HTTP 和 DNS 元数据识别 CDN/WAF 提供商:
```
uv run vrp-hunt cdn-waf-fingerprint \
--asset-file artifacts/recon-depth/assets.jsonl \
--dns-records artifacts/dns/dns-records.json \
--output artifacts/recon-depth/cdn-waf-fingerprints.json \
--assets-output artifacts/recon-depth/cdn-waf-assets.jsonl
```
规范化 ASN 和自有网段记录,而不展开单个 IP:
```
uv run vrp-hunt asn-netblock-import \
--record "AS15169:Google LLC=8.8.8.0/24" \
--record "AS15169:Google LLC=2001:4860::/32" \
--output artifacts/netblocks/asn-netblocks.json \
--assets-output artifacts/netblocks/asn-netblock-assets.jsonl
```
将已保存的反向 IP 和证书透明度导出导入范围主机资产:
```
uv run vrp-hunt reverse-ct-import \
--reverse-ip artifacts/passive/reverse-ip.json \
--ct artifacts/passive/ct.json \
--scope-domain google.com \
--output artifacts/passive/reverse-ct-report.json \
--assets-output artifacts/passive/reverse-ct-assets.jsonl
```
生成有上限的子域排列候选项,而不解析它们:
```
uv run vrp-hunt subdomain-permute \
--seed accounts.google.com \
--scope-domain google.com \
--word admin \
--word login \
--max-candidates 50 \
--assets-output artifacts/passive/permutation-assets.jsonl
```
从已保存的主机资产规划有上限的递归被动子域发现:
```
uv run vrp-hunt recursive-passive-plan \
--asset-file artifacts/passive/reverse-ct-assets.jsonl \
--seed-domain google.com \
--min-hosts-per-zone 2 \
--output artifacts/passive/recursive-passive-plan.json
```
从 Wayback、urlscan 和 Common Crawl 导入已保存的历史 URL,并编辑查询值:
```
uv run vrp-hunt historical-url-import \
--wayback artifacts/history/wayback-cdx.json \
--urlscan artifacts/history/urlscan.json \
--common-crawl artifacts/history/common-crawl.jsonl \
--scope-domain google.com \
--output artifacts/history/historical-url-report.json \
--assets-output artifacts/history/historical-url-assets.jsonl
```
将已保存的 `robots.txt` 文件解析为范围端点、站点地图、主机和抓取延迟资产:
```
uv run vrp-hunt robots-import \
--robots "https://www.google.com/robots.txt=artifacts/pages/google-robots.txt" \
--scope-domain google.com \
--output artifacts/passive/robots-report.json \
--assets-output artifacts/passive/robots-assets.jsonl
```
将已保存的 `sitemap.xml` 文件解析为范围 URL 和端点资产:
```
uv run vrp-hunt sitemap-import \
--sitemap "https://www.google.com/sitemap.xml=artifacts/pages/google-sitemap.xml" \
--scope-domain google.com \
--output artifacts/passive/sitemap-report.json \
--assets-output artifacts/passive/sitemap-assets.jsonl
```
将已保存的 `security.txt` 文件解析为已编辑的联系人说明和范围策略链接:
```
uv run vrp-hunt security-txt-import \
--security-txt "https://www.google.com/.well-known/security.txt=artifacts/pages/google-security.txt" \
--scope-domain google.com \
--output artifacts/passive/security-txt-report.json \
--assets-output artifacts/passive/security-txt-assets.jsonl
```
从已保存的 CSP 标头、原始策略或 HTML meta 标签中提取范围端点:
```
uv run vrp-hunt csp-extract \
--document "https://www.google.com/=artifacts/pages/www-google-csp.txt" \
--scope-domain google.com \
--output artifacts/endpoint-mine/csp-report.json \
--assets-output artifacts/endpoint-mine/csp-assets.jsonl
```
将已保存的 OpenAPI、Swagger 或 Postman 文件导入范围端点和参数资产:
```
uv run vrp-hunt api-spec-import \
--spec "https://www.google.com/openapi.json=artifacts/specs/google-openapi.json" \
--scope-domain google.com \
--output artifacts/endpoint-mine/api-spec-report.json \
--assets-output artifacts/endpoint-mine/api-spec-assets.jsonl
```
从已保存的内容中发现 GraphQL 端点,并发出需要批准的 introspection 检查计划,而不发送流量:
```
uv run vrp-hunt graphql-discover \
--document "https://www.google.com/app.js=artifacts/pages/www-google-app.js" \
--scope-domain google.com \
--output artifacts/endpoint-mine/graphql-report.json \
--assets-output artifacts/endpoint-mine/graphql-assets.jsonl
```
从已保存的 HTML 或 JavaScript 内容中挖掘已编辑的范围端点资产:
```
uv run vrp-hunt endpoint-mine \
--document "https://www.google.com/=artifacts/pages/www-google.html" \
--scope-domain google.com \
--assets-output artifacts/endpoint-mine/assets.jsonl
```
从已保存的自有账户页面快照构建安全验证操作:
```
uv run vrp-hunt owned-crawl-plan \
--page "owned-a=https://docs.google.com/document/d/owned/edit=artifacts/owned/pages/doc.html" \
--scope-domain google.com \
--plan-output artifacts/owned/validation-plan.json
```
执行安全的非流量处理程序:
```
uv run vrp-hunt agent-run \
--asset url:https://accounts.google.com/profile \
--mode offline \
--execute-safe
```
构建测试模式计划,同时保持高风险验证操作被阻止,除非明确批准:
```
uv run vrp-hunt agent-run \
--asset url:https://accounts.google.com/profile \
--mode testing \
--execute-safe \
--max-live-requests 3
```
按索引或操作 ID 批准特定的高风险操作:
```
uv run vrp-hunt agent-run \
--asset url:https://accounts.google.com/profile \
--mode testing \
--execute-safe \
--approval-mode explicit \
--approve-action 1 \
--max-live-requests 3
```
对于低摩擦的自有账户自动化,`--yolo` 可用作批准快捷方式。它会批准该运行中需要批准的操作,但不会禁用防护栏、预算、本地操作员策略、自有对象 URL 检查、法律确认要求或第三方数据停止点。
运行安全自动化循环并写入已编辑的产物:
```
uv run vrp-hunt agent-auto \
--asset url:https://accounts.google.com/profile \
--approval-mode explicit \
--approve-action 1 \
--researcher-account owned-a \
--researcher-account owned-b \
--artifact-output-dir artifacts/accounts-profile
```
在 `artifacts/` 下写入的产物被 Git 忽略。
从隔离的浏览器配置文件检查一个经过身份验证的自有对象 URL:
```
uv run vrp-hunt owned-browser-check \
--account-id owned-b \
--profile-dir "$HOME/.vrp-hunt/browser-profiles/owned-b" \
--url "https://drive.google.com/file/d/OWNED_TEST_OBJECT_ID/view" \
--confirm-owned-object
```
此命令拒绝广泛的账户页面,仅写入已编辑的访问状态分类。它不会导出 cookie、密码、页面文本或屏幕截图。
如果必须保持本地 Chrome 会话打开,请使用 `--remote-debugging-port` 启动它,并传递 `--cdp-url http://127.0.0.1:` 而不是 `--profile-dir`。
运行可重复的自有对象访问矩阵:
```
scenario_id: docs-private-derived-deny
researcher_owned: true
accounts:
- account_id: owned-b
cdp_url: http://127.0.0.1:9223
steps:
- name: private-doc-denied-to-owned-b
account_id: owned-b
url: https://docs.google.com/document/d/OWNED_TEST_OBJECT_ID/edit
expected_state: access_denied
```
```
uv run vrp-hunt owned-browser-scenario \
--scenario scenarios/docs-private-derived-deny.yaml \
--expand-derived \
--output-dir artifacts/owned-scenarios/docs-private-derived-deny
```
`owned-browser-scenario` 在已通过身份验证的测试账户配置文件或本地 CDP 会话上运行精确的自有对象断言。使用 `--expand-derived` 时,它会检查同一自有对象的保守查看/编辑/预览变体,并仅记录已编辑的 URL 哈希、访问状态分类和不匹配摘要。
传递 `--yolo` 以继续处理不匹配项并收集完整矩阵;在浏览器打开任何 URL 之前仍会运行安全验证。
从自有对象目录生成场景文件:
```
catalog_id: docs-baseline
researcher_owned: true
accounts:
- account_id: owned-a
cdp_url: http://127.0.0.1:9222
- account_id: owned-b
cdp_url: http://127.0.0.1:9223
cookie_env: OWNED_B_COOKIE
objects:
- object_id: owned-a-private-doc
product: docs
owner_account_id: owned-a
url: https://docs.google.com/document/d/OWNED_TEST_OBJECT_ID/edit
expected_states:
owned-a: access_granted
owned-b: access_denied
```
```
uv run vrp-hunt scenario-generate \
--object-catalog catalogs/docs-baseline.yaml \
--output-dir scenarios/generated/docs-baseline
```
生成器为每个自有对象编写一个场景以及 `scenario-index.json`。它是离线的,除非目录确认研究者所有权、使用精确的自有对象 URL、命名已知的自有账户,并将每个对象标记为非敏感且不包含第三方数据,否则将失败关闭。
将高信号场景不匹配项转换为草稿报告产物:
```
uv run vrp-hunt scenario-artifacts \
--scenario scenarios/generated/docs-baseline/docs-baseline-owned-a-private-doc.yaml \
--scenario-result artifacts/scenarios/docs-baseline/scenario-result.json \
--researcher-account owned-a \
--researcher-account owned-b \
--component "Docs private object" \
--output-dir artifacts/findings/docs-baseline
```
`scenario-artifacts` 仅在预期的 `access_denied` 状态被观察为 `access_granted` 且无第三方数据时创建 `FindingArtifact` 和 `ReportDraft` 记录。匹配结果、需要登录的状态、超时和其他低信号不匹配项将被跳过,并附有明确原因。
运行派生 HTTP 资源的仅元数据检查:
```
OWNED_B_COOKIE='SID=...; HSID=...' uv run vrp-hunt derived-http-check \
--account-id owned-b \
--url "https://docs.google.com/document/d/OWNED_TEST_OBJECT_ID/edit" \
--cookie-env OWNED_B_COOKIE \
--expected-state access_denied \
--confirm-owned-object \
--output-dir artifacts/derived/docs-private-owned-b
```
`derived-http-check` 为同一精确的自有对象派生导出/下载/缩略图样式的端点,并仅存储元数据:状态码、最终主机、路径哈希、重定向计数、选定的已编辑标头和访问状态分类。它不存储响应体、cookie 值、下载的文件或原始重定向 URL。跨站重定向被分类但不跟踪。
将高信号派生 HTTP 元数据不匹配项转换为草稿报告:
```
uv run vrp-hunt derived-http-artifacts \
--derived-http-result artifacts/derived/docs-private-owned-b/derived-http-result.json \
--researcher-account owned-a \
--researcher-account owned-b \
--component "Docs export endpoint" \
--output-dir artifacts/findings/derived-docs
```
`derived-http-artifacts` 仅在预期 `access_denied` 结果观察到 `access_granted_metadata` 时起草发现,同时不存储响应体且读取零响应体字节。
从一个目录运行完整的自有对象工作流:
```
OWNED_B_COOKIE='SID=...; HSID=...' uv run vrp-hunt owned-object-pipeline \
--object-catalog catalogs/docs-baseline.yaml \
--output-dir artifacts/pipeline/docs-baseline \
--researcher-account owned-a \
--researcher-account owned-b \
--component "Docs private object" \
--yolo
```
`owned-object-pipeline` 生成场景、运行浏览器访问检查、起草场景发现、为带有 `cookie_env` 的被拒绝账户运行仅元数据的派生 HTTP 检查、起草派生发现,并写入 `pipeline-summary.json`。它将原始 cookie 保留在输出之外,并使用本地忽略的产物目录存放真实对象 URL。
对被动侦察输出进行排序并生成下一个明确的实时批准队列:
```
uv run vrp-hunt recon-iterate \
--run-json artifacts/live-subfinder-google/run.json \
--httpx-dir artifacts/live-httpx-curated \
--limit 10 \
--output-dir artifacts/live-subfinder-google/iteration-01
```
`recon-iterate` 不发送流量。它过滤嘈杂或已失败的主机,写入排名的 URL 资产,并为下一个受门控的实时步骤发出批准行,如 `APPROVE LIVE HTTPX https://example.google.com`。
多次传递 `--httpx-dir` 以从多个先前批次中排除失败项。
从 JADX 输出中排序被动移动假设:
```
uv run vrp-hunt mobile-hypotheses \
--app-id com.google.android.gm \
--artifact-path artifacts/jadx/com.google.android.gm \
--output-dir artifacts/mobile/com.google.android.gm
```
将 APK 指纹、JADX 输出和 MobSF 静态 JSON 导入移动资产:
```
uv run vrp-hunt mobile-import \
--app-id com.google.android.gm \
--apk-path artifacts/mobile/com.google.android.gm.apk \
--jadx-output artifacts/jadx/com.google.android.gm \
--mobsf-report artifacts/mobsf/com.google.android.gm.json \
--output-dir artifacts/mobile/com.google.android.gm
```
从生成的产物渲染本地静态仪表板:
```
uv run vrp-hunt dashboard \
--asset-file artifacts/recon-depth/assets.jsonl \
--approval-queue artifacts/recon-depth/approval-queue.txt \
--artifact-bundle artifacts/pipeline/docs-baseline/findings/scenario/artifact-bundle.json \
--summary-json artifacts/recon-depth/recon-depth-summary.json \
--output artifacts/dashboard/index.html
```
`mobile-hypotheses` 不发送流量或运行账户支持的验证。它将反编译的产物转化为排名的手动审查线索,例如 OAuth 重定向处理、深度链接授权边界、WebView 桥接暴露、API 接口和已编辑的密钥形状说明。
## 实时侦察
实时侦察是选择加入的,并且额外受到以下条件的门控:
- `config/google_vrp_rules.yaml`
- `config/operator_policy.yaml`
- `--operator-id`
- `--accept-legal-liability`
- 针对 `subfinder`、ProjectDiscovery 的 `httpx` 和 `jadx` 的工具特定允许列表
在任何实时流量之前,请重新检查规范的 Google Bug Hunters 规则页面,如果规则已更改,则更新 `google-alphabet-vrp-rules.md` 和 `config/google_vrp_rules.yaml`。
示例:
```
uv run vrp-hunt live-recon \
--tool subfinder \
--target google.com \
--operator-id "$VRP_HUNT_OPERATOR_ID" \
--accept-legal-liability
uv run vrp-hunt live-recon \
--tool httpx \
--target www.google.com \
--rate-limit-per-minute 5 \
--operator-id "$VRP_HUNT_OPERATOR_ID" \
--accept-legal-liability
uv run vrp-hunt live-recon \
--tool jadx \
--target com.google.android.gm \
--artifact-path /path/to/app.apk \
--publisher "Google LLC" \
--operator-id "$VRP_HUNT_OPERATOR_ID" \
--accept-legal-liability
```
## 模型辅助规划
默认模型提供者是 `heuristic`,它在本地运行。远程模型规划是选择加入的,需要凭据以及明确确认已编辑的资产摘要可能会离开本机:
```
OPENAI_API_KEY=... uv run vrp-hunt agent-plan \
--asset url:https://accounts.google.com/profile \
--model-provider openai \
--allow-remote-model
```
模型路径仅请求有界的假设标签。它不请求漏洞利用载荷、凭据材料、浏览器操作或实时测试步骤。
## 安全边界
- 仅使用研究人员自己拥有的专用账户。
- 不访问、修改、存储或披露第三方数据。
- 不自动化账户创建。
- 不执行 DoS、垃圾邮件、社会工程、网络钓鱼、物理入侵、黑帽 SEO、代理披露、暴力破解或破坏性测试。
- 如果出现意外的第三方数据,请立即停止,最小化暴露,编辑证据,并通过 VRP 报告。
- 将 `google-alphabet-vrp-rules.md` 和 `config/google_vrp_rules.yaml` 视为必须在实时工作之前刷新的本地摘要。
另见:
- `docs/ethics-checklist.md`
- `docs/test-account-runbook.md`
- `docs/autonomous-agent.md`
## Git 卫生
提交源代码、测试、共享配置、文档、`pyproject.toml` 和 `uv.lock`。不要提交:
- `.env` 文件或凭据
- `config/operator_policy.yaml`
- `artifacts/`
- `planning/`
- 虚拟环境、缓存、覆盖率输出或构建输出
## 许可证
VRP Hunt 在 GNU Affero General Public License v3.0 或更高版本下获得许可。
参见 `LICENSE`。
标签:Alphabet VRP, Bug Bounty 程序, GPT, Python 安全框架, Python 工具包, 主机过滤, 奖励估计, 安全合规, 安全扫描工具, 情报收集, 授权安全测试, 提交跟踪, 测试剧本, 漏洞分诊, 漏洞研究, 漏洞管理, 秘密信息检测, 移动安全分析, 端点提取, 网络代理, 网络安全, 被动信息收集, 证据处理, 谷歌漏洞奖励计划, 资产侦察, 运行时操纵, 逆向工具, 防护栏机制, 隐私保护