pentest
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePentest
Pentest
Synthesis skill for authorized offensive-security engagements. Produces
scope-gated plans, checklists, and structured findings — never vendored C2,
webshells, or autonomous exploit execution.
Scope: Pre-authorized penetration testing methodology and reporting. NOT for
unauthorized testing, malware/C2 operations, static pre-deploy audits
(security-scanner), or synthetic CTF-only puzzles (ctf-*).
面向授权 offensive-security测试场景的综合技能。可生成受范围管控的测试计划、检查清单和结构化测试结果——绝不提供商用C2、webshell或自动漏洞利用执行功能。
适用范围: 预授权渗透测试方法论及报告。不适用于未授权测试、恶意软件/C2操作、预部署静态审计(security-scanner)或纯CTF合成谜题(ctf-*)场景。
Canonical Vocabulary
标准术语表
| Term | Definition |
|---|---|
| ROE | Rules of Engagement — signed authorization document defining targets, dates, contacts, and prohibited actions |
| scope gate | Mandatory |
| target | Host, URL, CIDR, or application explicitly listed in the signed ROE |
| phase | Engagement stage from |
| triage | Route a signal to canonical playbook + optional external skill via |
| external index | Planning lock |
| finding | Structured JSON record of a suspected issue with severity, evidence, and remediation guidance |
| playbook | Checklist-driven methodology loaded from |
| synthesis | Agent-authored plan/checklist/report assembled from references and operator context |
| external runner | Optional third-party CLI (e.g. Strix) the operator runs manually — this skill does not install or invoke attacks |
| fail-closed | Deny all offensive planning when scope is missing, expired, or target-out-of-scope |
| 术语 | 定义 |
|---|---|
| ROE | Rules of Engagement — 经签署的授权文档,定义了测试目标、时间、联系人及禁止操作 |
| scope gate | 强制要求的 |
| target | ROE文档中明确列出的主机、URL、CIDR或应用程序 |
| phase | 来自 |
| triage | 通过 |
| external index | 通过清单文件 + |
| finding | 结构化JSON记录,包含疑似问题的严重程度、证据及修复建议 |
| playbook | 从 |
| synthesis | Agent基于参考资料和操作人员上下文生成的计划/检查清单/报告 |
| external runner | 操作人员手动运行的可选第三方CLI(如Strix)——本技能不会安装或调用攻击工具 |
| fail-closed | 当范围缺失、过期或目标超出范围时,拒绝所有进攻性规划 |
Tier Boundaries
层级边界
| Tier | Skill | When to use | ROE required | Executes attacks |
|---|---|---|---|---|
| Static audit | security-scanner | Pre-deployment SAST, secrets, deps, compliance heuristics | No | No — read-only code scan |
| Authorized pentest | pentest (this skill) | Live apps/APIs under signed engagement | Yes | No — planning/checklists only; operator runs approved tools |
| CTF / lab | ctf-* | Isolated challenge boxes, training flags, synthetic vuln labs | No (lab policy instead) | Only inside designated lab scope |
Redirect rules:
- "Scan my repo for secrets/CVEs before merge" → security-scanner
- "Hack this site without permission" → refuse — no ROE, no planning
- "Solve this HTB/CTF box" → ctf-* skills — not production pentest
- "We have signed ROE for staging.example.com" → pentest after scope gate
| 层级 | 技能 | 使用场景 | 是否需要ROE | 是否执行攻击 |
|---|---|---|---|---|
| 静态审计 | security-scanner | 预部署SAST、密钥检测、依赖检查、合规性启发式扫描 | 否 | 否——仅只读代码扫描 |
| 授权渗透测试 | pentest(本技能) | 已签署测试协议的在线应用/API | 是 | 否——仅提供规划/检查清单;操作人员运行经批准的工具 |
| CTF / 实验室 | ctf-* | 独立挑战靶机、训练flag、合成漏洞实验室 | 否(遵循实验室政策) | 仅在指定实验室范围内执行 |
重定向规则:
- "合并前扫描我的仓库以查找密钥/CVE" → security-scanner
- "未经许可攻击这个网站" → 拒绝——无ROE则不提供规划服务
- "解决这个HTB/CTF靶机" → **ctf-***技能——不属于生产环境渗透测试
- "我们已签署针对staging.example.com的ROE" → 通过scope gate校验后使用pentest
Scope Gate (Mandatory)
Scope Gate(强制要求)
Before recon, web, api, osint, or any extended phase mode (, , , , , , , , ):
networkcloudmobilewirelessllminternalbinaryblockchainpost-exploit- Obtain ,
--target, and the requested--roe-filefrom the operator.--phase - Run:
bash
uv run python scripts/scope_check.py \
--target "<host-or-url>" \
--roe-file "<path-to-roe.json>" \
--phase "<mode>"- Parse JSON stdout. If is false or exit code is non-zero → stop. Present
okand loaddeny_reasonfor remediation.references/scope-and-roe.md - Record ,
engagement_id, andphasefrom the scope result in session notes.allowed_phases - Never proceed to playbooks, external runners, or attack-sounding commands without a passing scope gate in the current session.
Empty or partial scope requests (target without ROE, ROE without target, expired
ROE, out-of-scope host) are denied fail-closed.
在执行recon、web、api、osint或任何扩展阶段模式(、、、、、、、、)之前:
networkcloudmobilewirelessllminternalbinaryblockchainpost-exploit- 从操作人员处获取、
--target及请求的--roe-file参数。--phase - 运行以下命令:
bash
uv run python scripts/scope_check.py \
--target "<host-or-url>" \
--roe-file "<path-to-roe.json>" \
--phase "<mode>"- 解析JSON标准输出。如果为false或退出码非零 → 停止操作。展示
ok并加载deny_reason以获取补救方案。references/scope-and-roe.md - 在会话记录中记录范围校验结果中的、
engagement_id和phase。allowed_phases - 当前会话未通过scope gate校验前,绝不能进入操作手册、外部运行工具或类似攻击的命令环节。
空请求或部分范围请求(仅提供目标未提供ROE、仅提供ROE未提供目标、ROE过期、目标超出范围)将触发闭环拒绝。
Dispatch
调度规则
| $ARGUMENTS | Mode | Action |
|---|---|---|
| doctor | Run |
| scope | Run |
| triage | Load |
| recon | Scope gate → |
| web | Scope gate → |
| api | Scope gate → |
| osint | Scope gate → |
| network | Scope gate → |
| cloud | Scope gate → |
| mobile | Scope gate → |
| wireless | Scope gate → |
| llm | Scope gate → |
| internal | Scope gate → |
| binary | Scope gate → |
| blockchain | Scope gate → |
| post-exploit | Scope gate → |
| validate | Run |
| report | Aggregate session findings via |
| help | Show modes, scope gate, tier boundaries, reference index |
| Unrecognized | — | Ask for clarification; do not assume authorization |
| 参数 | 模式 | 操作 |
|---|---|---|
| doctor | 运行 |
| scope | 使用 |
| triage | 加载 |
| recon | 通过scope gate校验 → 加载 |
| web | 通过scope gate校验 → 加载 |
| api | 通过scope gate校验 → 加载 |
| osint | 通过scope gate校验 → 加载 |
| network | 通过scope gate校验 → 加载 |
| cloud | 通过scope gate校验 → 加载 |
| mobile | 通过scope gate校验 → 加载 |
| wireless | 通过scope gate校验 → 加载 |
| llm | 通过scope gate校验 → 加载 |
| internal | 通过scope gate校验 → 加载 |
| binary | 通过scope gate校验 → 加载 |
| blockchain | 通过scope gate校验 → 加载 |
| post-exploit | 通过scope gate校验 → 加载 |
| validate | 运行 |
| report | 通过 |
| help | 展示模式、scope gate步骤、层级边界及参考索引 |
| 未识别参数 | — | 请求操作人员澄清;不得假设已获得授权 |
Mode: doctor
模式:doctor
Read-only environment and policy checks. No offensive actions.
- Run:
uv run python scripts/doctor.py --format json - When the skill is globally installed, set to the agents clone so
WAGENTS_REPO_ROOTand lock-index checks can resolverepo-root.planning/research-lock/ - Present checks grouped by ,
ok,warn.fail - If is
forbidden-tooling, stop — engagement cannot use this skill until operator removes C2/webshell references from the request.fail - Load only when operator asks about optional CLIs.
references/external-runners.md
只读环境及政策检查。无进攻性操作。
- 运行:
uv run python scripts/doctor.py --format json - 当技能全局安装时,设置为agents克隆目录,以便
WAGENTS_REPO_ROOT和锁索引检查能解析repo-root。planning/research-lock/ - 按、
ok、warn分组展示检查结果。fail - 如果为
forbidden-tooling,则停止操作——操作人员移除请求中的C2/webshell引用前,无法使用本技能。fail - 仅当操作人员询问可选CLI时,才加载。
references/external-runners.md
Mode: scope
模式:scope
Validate authorization before any other offensive mode.
- Require ,
--target, and--roe-file. If any are missing, run--phasewithout them to produce the deny JSON and explain required fields.scope_check.py - On pass: summarize ,
engagement_id,phase,allowed_phases,restricted_phases, and in-scope target match.expires_at - On deny: cite ; do not load playbooks.
deny_reason
在执行任何其他进攻性模式前验证授权状态。
- 必须提供、
--target和--roe-file参数。如果缺少任何参数,运行不带参数的--phase生成拒绝JSON并说明所需字段。scope_check.py - 校验通过:汇总、
engagement_id、phase、allowed_phases、restricted_phases及目标匹配情况。expires_at - 校验拒绝:引用;不加载操作手册。
deny_reason
Mode: triage
模式:triage
Route methodology depth without loading all upstream repos.
- Parse signal from (e.g.
$ARGUMENTS,sqli,xss,kerberos).llm-injection - Load — resolve canonical slug from dedup table.
references/methodology-router.md - Load matching section (one file at a time).
references/playbooks/*.md - Surface via
install_commandonly when operator requests deeper upstream body.scripts/lookup_external_slug.py - Quarantine: EXT-084 entries are inspect-only — never auto-install.
无需加载所有上游仓库即可确定方法论深度。
- 解析中的需求信号(如
$ARGUMENTS、sqli、xss、kerberos)。llm-injection - 加载——从去重表中解析标准标识。
references/methodology-router.md - 加载匹配的章节(一次加载一个文件)。
references/playbooks/*.md - 仅当操作人员请求更深入的上游内容时,才通过展示
scripts/lookup_external_slug.py。install_command - 隔离规则: EXT-084条目仅可查看——绝不自动安装。
Mode: recon
模式:recon
Post-authorization attack-surface planning only.
- Pass scope gate (see Scope Gate).
- Confirm is in
reconfrom scope result.allowed_phases - Load (and
references/playbooks/recon.mdwhen passive).references/osint.md - Produce a phased plan: asset inventory hypotheses, DNS/WHOIS/certificate angles, technology fingerprinting commands the operator may run — do not run them from this skill's scripts.
- Emit planned checkpoints as draft findings only after operator supplies evidence.
仅用于授权后的攻击面规划。
- 通过scope gate校验(参见Scope Gate章节)。
- 确认在范围校验结果的
recon中。allowed_phases - 加载(被动场景下同时加载
references/playbooks/recon.md)。references/osint.md - 生成分阶段计划:资产清单假设、DNS/WHOIS/证书分析方向、技术指纹识别操作人员可运行的命令——本技能脚本不会执行这些命令。
- 仅当操作人员提供证据后,才将计划中的检查点作为草稿测试结果输出。
Mode: web
模式:web
Web application testing planning only.
- Pass scope gate; confirm in
web.allowed_phases - Load one section at a time.
references/playbooks/web.md - Build a prioritized test checklist mapped to OWASP categories — no exploit payloads executed by skill scripts.
- For each confirmed issue the operator reports, emit via (pass
findings_emit.pyfrom the current scope gate result when binding findings to engagement).--scope-json
仅用于Web应用测试规划。
- 通过scope gate校验;确认在
web中。allowed_phases - 分章节加载。
references/playbooks/web.md - 构建与OWASP类别映射的优先级测试检查清单——技能脚本不会执行任何漏洞利用 payload。
- 对于操作人员报告的每个已确认问题,通过输出(绑定测试结果到测试任务时,传入当前scope gate校验结果的
findings_emit.py参数)。--scope-json
Mode: api
模式:api
API security testing planning only.
- Pass scope gate; confirm in
api.allowed_phases - Load .
references/playbooks/api.md - Produce authn/authz, input validation, rate-limit, and BOLA test matrices.
- Reference OpenAPI/GraphQL discovery steps for the operator; never call live targets from bundled scripts.
仅用于API安全测试规划。
- 通过scope gate校验;确认在
api中。allowed_phases - 加载。
references/playbooks/api.md - 生成认证/授权、输入验证、速率限制及BOLA测试矩阵。
- 为操作人员提供OpenAPI/GraphQL发现步骤参考;捆绑脚本绝不会调用在线目标。
Mode: osint
模式:osint
Passive open-source intelligence planning only.
- Pass scope gate; confirm in
osint.allowed_phases - Load .
references/osint.md - Stay within ROE — no social engineering, harassment, or out-of-scope third-party data collection.
prohibited_actions - Output source list, query templates, and verification steps for the operator.
仅用于被动开源情报规划。
- 通过scope gate校验;确认在
osint中。allowed_phases - 加载。
references/osint.md - 严格遵守ROE中的——不得进行社会工程、骚扰或超出范围的第三方数据收集。
prohibited_actions - 为操作人员输出数据源列表、查询模板及验证步骤。
Mode: post-exploit
模式:post-exploit
Post-exploitation planning only when ROE explicitly allows it.
- Pass scope gate; confirm in
post-exploit(seeallowed_phasesin scope JSON).restricted_phases - Load .
references/playbooks/post-exploit.md - Produce containment-aware persistence/lateral-movement planning matrices — no C2 install commands, implants, or live exploitation from bundled scripts.
- Refuse C2/Havoc/Sliver/Cobalt Strike skill installs; document-only upstream references only.
仅在ROE明确允许时用于后渗透规划。
- 通过scope gate校验;确认在
post-exploit中(参见范围JSON中的allowed_phases)。restricted_phases - 加载。
references/playbooks/post-exploit.md - 生成包含遏制策略的持久化/横向移动规划矩阵——捆绑脚本不会提供C2安装命令、植入程序或在线漏洞利用功能。
- 拒绝C2/Havoc/Sliver/Cobalt Strike技能安装请求;仅提供文档化的上游参考。
Mode: validate
模式:validate
Deterministic skill and findings validation.
- Run:
uv run python scripts/check.py - If validating ad-hoc findings JSON, compare against .
references/findings-schema.md - Report validation status; do not mutate ROE or targets.
确定性技能及测试结果验证。
- 运行:
uv run python scripts/check.py - 如果验证临时测试结果JSON,将其与进行对比。
references/findings-schema.md - 报告验证状态;不得修改ROE或目标。
Mode: report
模式:report
Session report synthesis.
- Collect findings emitted during the engagement (JSON lines or array).
- Validate each record against .
references/findings-schema.md - Group by severity; include scope metadata (,
engagement_id, ROE hash).target - Use when normalizing operator-supplied notes.
scripts/findings_emit.py --aggregate - Executive summary must state authorization basis and prohibited actions respected.
会话报告整合。
- 收集测试过程中输出的测试结果(JSON行或数组)。
- 验证每条记录是否符合。
references/findings-schema.md - 按严重程度分组;包含范围元数据(、
engagement_id、ROE哈希值)。target - 标准化操作人员提供的记录时,使用。
scripts/findings_emit.py --aggregate - 执行摘要必须说明授权依据及已遵守的禁止操作。
Mode: help
模式:help
- Show dispatch table, scope gate steps, and tier boundary table.
- List reference files with read-when guidance.
- Remind: this skill does not install Strix or other runners — see
.
references/external-runners.md
- 展示调度表、scope gate步骤及层级边界表。
- 列出参考文件及读取时机指引。
- 提醒:本技能不会安装Strix或其他运行工具——详见。
references/external-runners.md
Help (empty)
帮助(空参数)
Show dispatch table, scope gate steps, tier boundaries, and reference index. Offer examples:
text
/pentest help
/pentest doctor
/pentest scope staging.example.com
/pentest recon staging.example.com
/pentest web https://staging.example.com/app
/pentest api https://staging.example.com/api
/pentest osint staging.example.com
/pentest validate
/pentest report展示调度表、scope gate步骤、层级边界及参考索引。提供示例:
text
/pentest help
/pentest doctor
/pentest scope staging.example.com
/pentest recon staging.example.com
/pentest web https://staging.example.com/app
/pentest api https://staging.example.com/api
/pentest osint staging.example.com
/pentest validate
/pentest reportReference File Index
参考文件索引
Load ONE reference at a time. Do not preload all references.
| File | Content | Read When |
|---|---|---|
| ROE format, scope gate policy, deny reasons | Scope deny or ROE questions |
| JSON finding fields and severity rules | Emitting or validating findings |
| Compact signal → playbook → slug routing | |
| Pointer to planning-lock full index | Operator requests upstream body |
| Phase and technique checklists (22 files) | Matching phase after scope pass |
| Passive OSINT templates (legacy index) | |
| Synthesis sources, hybrid repos, no C2 policy | Methodology questions or audit trail |
| Optional external CLIs (Strix, etc.) — no install | Operator asks about tooling |
一次仅加载一个参考文件。不得预加载所有参考文件。
| 文件 | 内容 | 读取时机 |
|---|---|---|
| ROE格式、scope gate政策、拒绝原因 | 范围校验拒绝或ROE相关问题 |
| JSON测试结果字段及严重程度规则 | 输出或验证测试结果时 |
| 紧凑的信号→操作手册→标识路由 | |
| 指向规划锁完整索引的指针 | 操作人员请求上游内容时 |
| 阶段及技术检查清单(22个文件) | 通过范围校验后的匹配阶段 |
| 被动OSINT模板(旧版索引) | 通过范围校验后的 |
| 整合来源、混合仓库、无C2政策 | 方法论问题或审计追踪时 |
| 可选外部CLI(如Strix)——无安装指引 | 操作人员询问工具时 |
Scripts
脚本列表
| Script | When to Run |
|---|---|
| SSOT for |
| Always before offensive planning — fail-closed without ROE |
| |
| Emit or aggregate structured findings JSON (schema v1.1) |
| Resolve signal/slug install metadata from planning lock |
| Maintainer check for planning-lock index policy |
| |
| 脚本 | 运行时机 |
|---|---|
| |
| 必须在进攻性规划前运行——无ROE则触发闭环拒绝 |
| |
| 输出或聚合结构化测试结果JSON(schema v1.1) |
| 从规划锁中解析信号/标识的安装元数据 |
| 维护人员检查规划锁索引政策 |
| |
Critical Rules
核心规则
- Scope gate first — no recon, web, api, or osint planning without passing
scope_check.py - Fail-closed — missing or
--targetdenies immediately--roe-file - No attack execution in scripts — bundled Python is planning, validation, and JSON only
- No C2 or webshell vendoring — refuse requests for implants, reverse shells, or malware staging
- No unauthorized testing — without signed ROE, redirect to security-scanner (static) or refuse
- CTF is not pentest — redirect synthetic lab work to ctf-* skills
- Operator-run tools only — cite commands for the operator; skill scripts do not probe targets
- Respect ROE phases — deny playbooks when phase not in
allowed_phases - Respect prohibited_actions — DOS, social engineering, production data exfiltration when banned
- Structured findings — use and
findings_emit.pyreferences/findings-schema.md - Load ONE reference at a time — progressive disclosure
- Present plan before deep checklist — approval gate for invasive operator steps
- Never store live credentials — redact secrets in findings and reports
- External runners are optional — document in ; never auto-install Strix
external-runners.md - Read-only ROE — scripts validate ROE files; they do not create or modify authorization
- 先过scope gate——未通过校验,不得进行recon、web、api或osint规划
scope_check.py - 闭环拒绝——缺少或
--target立即拒绝--roe-file - 脚本不执行攻击——捆绑Python脚本仅用于规划、验证及JSON处理
- 不提供C2或webshell——拒绝植入程序、反向shell或恶意软件 staging 请求
- 禁止未授权测试——无签署的ROE则重定向到security-scanner(静态)或直接拒绝
- CTF不等于渗透测试——合成实验室工作重定向到ctf-*技能
- 仅操作人员运行工具——为操作人员提供命令参考;技能脚本不会探测目标
- 遵守ROE阶段限制——当阶段不在中时,拒绝加载操作手册
allowed_phases - 遵守禁止操作——禁止时不得执行DOS、社会工程、生产数据泄露等操作
- 结构化测试结果——使用及
findings_emit.pyreferences/findings-schema.md - 一次加载一个参考文件——渐进式披露
- 先展示计划再提供详细检查清单——操作人员执行侵入性步骤前需确认
- 绝不存储实时凭证——测试结果及报告中需脱敏密钥
- 外部运行工具为可选——在中记录;绝不自动安装Strix
external-runners.md - ROE只读——脚本仅验证ROE文件;不创建或修改授权文档