reverse-skills-max: initial public release (restored, redacted, hardened)
This commit is contained in:
62
reverse-skill-repo/skills/ops/IDENTITY.md
Normal file
62
reverse-skill-repo/skills/ops/IDENTITY.md
Normal file
@@ -0,0 +1,62 @@
|
||||
# reverse-skill 身份宣言(相对 Z3r0)
|
||||
|
||||
> 本文件固定 **我们是谁**。吸收 Z3r0 的证据/范围/分工/时间线思想,但 **不** 做成 Z3r0 平台。
|
||||
|
||||
## 我们是
|
||||
|
||||
| 维度 | reverse-skill |
|
||||
|------|----------------|
|
||||
| 形态 | **Skill 路由包** — 给任意 AI 客户端(Claude/Cursor/Codex…)用的方法论 + 工具自举 |
|
||||
| 入口 | `RULES.md` → `MASTER-ROUTING` / `master-route.ps1` → 子 skill |
|
||||
| 工具真相 | `tool-index.md` + `bootstrap-manifest.json`(本机路径,不猜) |
|
||||
| 进化 | `field-journal/` 脱敏经验回写 |
|
||||
| 产物 | Markdown 报告 + `work/<case>/` 本地作战目录(gitignore) |
|
||||
| 部署 | `git clone` 即可;无强制 PG/UI/Docker 池 |
|
||||
|
||||
## 我们不是
|
||||
|
||||
| Z3r0 有 | reverse-skill **故意不做** |
|
||||
|---------|---------------------------|
|
||||
| React 作战台 | ❌ |
|
||||
| FastAPI 控制面 + WebSocket 会话 | ❌ |
|
||||
| PostgreSQL 证据库 | ❌ |
|
||||
| LightRAG 服务 | ❌ |
|
||||
| Docker 主机池 / noVNC 控制代理 | ❌(可 **文档** 推荐可选沙箱 profile) |
|
||||
| 多 Agent 进程运行时 | ❌(仅 **角色→skill 映射 + 交接协议**) |
|
||||
|
||||
## 我们从 Z3r0 学什么(缩水落地)
|
||||
|
||||
| 思想 | reverse-skill 形态 |
|
||||
|------|-------------------|
|
||||
| 授权与项目边界 | `ops/scope-contract.md` → 每案 `scope.md` |
|
||||
| Evidence→Finding→Path | `ops/evidence-finding-path.md` + 报告模板 |
|
||||
| 专家分工 | `ops/role-map.md`(Lead/cie/cpe/cre…→ skill) |
|
||||
| 可回放 | `work/<case>/timeline.md` 追加写 |
|
||||
| WorkItem/覆盖 | `workitems.md` + coverage 勾选 |
|
||||
| 沙箱工具齐 | `ops/sandbox-profile.md` vs bootstrap-manifest |
|
||||
| 出站管控 | `network_profile` 字段(offline/lab/authorized) |
|
||||
|
||||
## 特色(必须保留)
|
||||
|
||||
1. **三轴路由 + PRIMARY 快路径**(目标类型 / 意图 / 工具链)
|
||||
2. **bootstrap 按需装工具**,跨 Windows/Kali/Linux/macOS
|
||||
3. **MCP 友好**(IDA/Burp/jshook/anything-analyzer)
|
||||
4. **field-journal 脱敏进化**
|
||||
5. **服从性工程**:ACTION REQUIRED / 完成自检 / 禁止假停
|
||||
|
||||
## 与 Z3r0 的健康关系
|
||||
|
||||
```text
|
||||
Z3r0 = 红队操作系统 / 团队协作平台
|
||||
reverse-skill = Agent 的安全作业路由器 + 说明书
|
||||
|
||||
可选未来:把本包 skill 内容挂进 Z3r0 sandbox-local skills
|
||||
当前:零依赖 Z3r0 安装即可完整工作
|
||||
```
|
||||
|
||||
## 与「800+ 社区微 skill」的关系
|
||||
|
||||
- **不** submodule 巨型 skill 库(投毒面与维护成本,见 `skill-supply-chain.md`)
|
||||
- **要** 维护 `references/community-security-skills.md` 作索引与借鉴规则
|
||||
- **要** 用 `domain-coverage-map.md` 证明:深度 skill + 路由 > 碎片 skill 堆叠
|
||||
- 外部 skill 安装:AST10 思维 + 只信 curated 源(如 Trail of Bits curated)
|
||||
26
reverse-skill-repo/skills/ops/README.md
Normal file
26
reverse-skill-repo/skills/ops/README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# ops — reverse-skill 作战契约层
|
||||
|
||||
Z3r0 启发、**本包形态**实现:
|
||||
|
||||
| 文件 | 用途 |
|
||||
|------|------|
|
||||
| [IDENTITY.md](IDENTITY.md) | 我们是谁 / 不做平台 |
|
||||
| [scope-contract.md](scope-contract.md) | 启动 scope + network_profile |
|
||||
| [evidence-finding-path.md](evidence-finding-path.md) | 证据链 |
|
||||
| [role-map.md](role-map.md) | 角色→skill + 交接 |
|
||||
| [timeline-workitem.md](timeline-workitem.md) | 时间线与覆盖 |
|
||||
| [sandbox-profile.md](sandbox-profile.md) | 工具对照 |
|
||||
| [skill-supply-chain.md](skill-supply-chain.md) | Agent Skill/MCP 供应链安全(AST10 精简) |
|
||||
| [case-review/](../case-review/) | Evidence 图完整性审查与报告交接 |
|
||||
|
||||
相关 references(非孤儿,从本 hub / MASTER / SKILL 可达):
|
||||
|
||||
- `../references/community-security-skills.md` — 社区 skill 生态对照
|
||||
- `../references/domain-coverage-map.md` — 本包领域覆盖
|
||||
- `../attack-chain/references/lifecycle-checklist.md` — 攻击链阶段门闩
|
||||
- `../reverse-engineering/references/re-agent-workflow.md` — RE 四阶段
|
||||
- `../pentest-tools/references/recon-pipeline.md` — 授权侦察 + Evidence 门
|
||||
|
||||
- 脚本:`../scripts/case-init.ps1`
|
||||
- 校验:`../scripts/verify-routing-coherence.ps1`(含 ops 契约检查)
|
||||
- 审查:`../case-review/scripts/review_case.py`(只读 Evidence 图检查)
|
||||
116
reverse-skill-repo/skills/ops/evidence-finding-path.md
Normal file
116
reverse-skill-repo/skills/ops/evidence-finding-path.md
Normal file
@@ -0,0 +1,116 @@
|
||||
# Evidence → Finding → Path 证据链
|
||||
|
||||
> 灵感来自 Z3r0 Evidence Plane,落地为 **Markdown 字段契约**。
|
||||
> reverse-skill 特色:与 `docs-generator` 报告模板、`field-journal` 脱敏回写、可复现命令绑定。
|
||||
|
||||
## 1. Evidence(不可变观察)
|
||||
|
||||
每条证据独立一段或表行:
|
||||
|
||||
```markdown
|
||||
### E-{nnn}
|
||||
- title:
|
||||
- observed_at:
|
||||
- source_type: command | screenshot | file | log | memory | network | manual
|
||||
- source_ref: {path or command id}
|
||||
- content_hash: {sha256 of artifact if file, else n/a}
|
||||
- artifact_path: {relative path under case root when content_hash is recorded, else n/a}
|
||||
- repro_command: |
|
||||
{exact command}
|
||||
- raw_excerpt: |
|
||||
{脱敏摘录}
|
||||
- linked_workitem: WI-{nnn} | n/a
|
||||
- supersedes: E-{nnn} | none
|
||||
```
|
||||
|
||||
**MUST**:Finding 引用的 Evidence 至少 1 条;`repro_command` 第三方可跑或标明离线限制。
|
||||
|
||||
**CLI helper**(写入 `work/<case>/evidence/E-*.md`):
|
||||
|
||||
```powershell
|
||||
powershell -File skills/scripts/append-evidence.ps1 -CaseRoot work/<case> `
|
||||
-Id E-001 -Title "..." -ReproCommand "..." -Severity info -Status observed
|
||||
```
|
||||
|
||||
When the evidence is a case-local file, pass `-ArtifactPath` to record a SHA-256 fixity value and a relative artifact path. Review the complete case graph before handoff:
|
||||
|
||||
```bash
|
||||
python3 skills/case-review/scripts/review_case.py work/<case> --verify-hashes --strict
|
||||
```
|
||||
|
||||
The review is read-only and checks scope fields, Evidence records, work item and timeline references, structured Findings, Paths, and artifact hash matches.
|
||||
|
||||
## 2. Finding(安全/逆向结论)
|
||||
|
||||
```markdown
|
||||
### F-{nnn}
|
||||
- title:
|
||||
- severity: critical | high | medium | low | info | n/a_re
|
||||
- category: vuln | misconfig | design | reverse_algo | bypass | other
|
||||
- status: candidate | validated | false_positive | accepted_risk
|
||||
- evidence_ids: [E-001, E-002]
|
||||
- location: {file:line | addr | url | class.method}
|
||||
- impact:
|
||||
- confidence: high | medium | low
|
||||
- repro_steps:
|
||||
1.
|
||||
2.
|
||||
- remediation: {or n/a for pure RE}
|
||||
- optional_attack: {ATT&CK ID or empty}
|
||||
```
|
||||
|
||||
**MUST**:`evidence_ids` 非空;`status=validated` 时 confidence 不得为 low(除非标注 residual risk)。
|
||||
|
||||
## 3. Path(攻击路径 / 调用路径 / 解题路径)
|
||||
|
||||
统一叫 **Path**,按任务类型解释:
|
||||
|
||||
| 任务 | Path 含义 |
|
||||
|------|-----------|
|
||||
| 渗透 / 攻击链 | 攻击路径步骤 |
|
||||
| 逆向 | 关键调用/数据流步骤 |
|
||||
| CTF | 解题步骤 |
|
||||
|
||||
```markdown
|
||||
### P-{nnn}
|
||||
- title:
|
||||
- path_type: attack | callflow | solve
|
||||
- start:
|
||||
- goal:
|
||||
- steps:
|
||||
1. action: — evidence: E-xxx — finding: F-xxx | none
|
||||
2. action: — evidence: E-xxx — finding: F-yyy | none
|
||||
- residual_risks:
|
||||
```
|
||||
|
||||
**MUST**:每步可关联 Evidence;攻击路径终点 Finding 若声明「已拿权限/数据」必须有 validated 证据。
|
||||
|
||||
## 4. 报告中的位置
|
||||
|
||||
`docs-generator` 安全报告 **MUST** 含:
|
||||
|
||||
1. Scope 摘要(链到 case `scope.md`)
|
||||
2. Evidence 表或章节
|
||||
3. Findings 列表(含 evidence_ids)
|
||||
4. 至少 1 条 Path(攻击/调用/解题)
|
||||
5. Timeline 摘要(可选全文链到 `timeline.md`)
|
||||
|
||||
详见 `docs-generator/references/security-report-templates.md` 中 **Evidence Chain** 节。
|
||||
|
||||
## 5. field-journal 挂钩
|
||||
|
||||
回写 journal 时 **SHOULD** 摘录:
|
||||
|
||||
- 3 条内关键 Evidence id + 命令
|
||||
- 1 条核心 Finding
|
||||
- 可复用 Path 模式一句话
|
||||
|
||||
完整敏感内容只在用户项目报告中;journal **MUST** 脱敏(`anonymization.md`)。
|
||||
|
||||
## 6. 与 Z3r0 的差异(特色)
|
||||
|
||||
| Z3r0 | reverse-skill |
|
||||
|------|----------------|
|
||||
| PG 不可变行 + API | Markdown 文件 + hash 字段 |
|
||||
| UI 审阅队列 | 报告 + next-step 菜单 + journal |
|
||||
| ATT&CK 深度绑定 | 可选标签,不强制 UI |
|
||||
63
reverse-skill-repo/skills/ops/role-map.md
Normal file
63
reverse-skill-repo/skills/ops/role-map.md
Normal file
@@ -0,0 +1,63 @@
|
||||
# 专家角色 → Skill 映射(无多 Agent 服务器)
|
||||
|
||||
> 角色代号灵感来自 Z3r0 专家队;**实现方式**是 reverse-skill 路由与交接协议,不是进程编排。
|
||||
|
||||
## 角色表
|
||||
|
||||
| Code | 名称(可本地化) | 职责 | PRIMARY / 工具 skill |
|
||||
|------|------------------|------|----------------------|
|
||||
| **lead** | Lead / 总指挥 | 拆任务、定 scope、阶段门控、汇总报告 | `attack-chain/` 或当前 PRIMARY hub;结束 → `docs-generator/` |
|
||||
| **cie** | 情报收集 | 资产发现、暴露面、关系 | `pentest-tools/`(recon);浏览器 → `browser-automation/`;云面 → `cloud-k8s/` |
|
||||
| **cpe** | 渗透验证 | 扫描、利用验证、影响确认 | `pentest-tools/`;API → `api-security/`;AD → `windows-ad/`;无线 → `wifi-wireless/`;库 → `database-security/`;SSO → `identity-federation/`;OT → `ot-ics/` |
|
||||
| **cre** | 逆向分析 | 二进制/固件/移动/前端逻辑 | `ida-reverse/` `ghidra-reverse/` `radare2/` `apk-reverse/` `mobile-reverse/` `macos-reverse/` `js-reverse/` `browser-extension-reverse/` `dotnet-reverse/` `go-rust-reverse/` `firmware-pentest/` `hardware-security/` `malware-analysis/` `protocol-reverse/` `thick-client/` `reverse-engineering/` |
|
||||
| **cae** | 代码审计 | 源码/依赖/供应链 | `code-audit/` + `supply-chain-security/` |
|
||||
| **cbe** | 蓝队/取证 | 狩猎、检测、IR 伪影 | `threat-hunting/` `digital-forensics/` |
|
||||
| **cce** | 密码学 | 算法/协议/密钥误用 | `reverse-engineering` 模式文档 |
|
||||
| **llm** | AI 安全 | Prompt/Agent | `llm-security/` |
|
||||
| **doc** | 文档官 | 报告/writeup/图 | `docs-generator/` + `diagram-generator/` |
|
||||
|
||||
## Lead 强制协议
|
||||
|
||||
```text
|
||||
1. 输出 PRIMARY(master-route)+ lead_role=lead
|
||||
2. 写 scope.md(ops/scope-contract)
|
||||
3. 指定 specialist_roles[] 与 handoff 条件
|
||||
4. 每阶段结束:更新 timeline + workitems;决定继续/换角色/出报告
|
||||
5. 禁止跳过 scope 直接 cpe 扫生产
|
||||
```
|
||||
|
||||
## 交接(Handoff)规则
|
||||
|
||||
| 从 → 到 | 触发 | 交付物 |
|
||||
|---------|------|--------|
|
||||
| lead → cie | 需要资产面 | scope + 已知域名/IP |
|
||||
| cie → cpe | 有存活面/服务 | assets 列表 + 端口/URL |
|
||||
| cpe → cre | 需逆向校验/客户端逻辑 | 样本路径 + 可疑点 |
|
||||
| cre → cpe | 还原出协议/密钥/校验 | 算法说明 + 复现命令 |
|
||||
| any → doc | 阶段或任务完成 | Evidence/Finding/Path 草稿 |
|
||||
| any → lead | 阻塞/越权/换路径 | timeline 备注 + blocked 原因 |
|
||||
|
||||
## 单人 Agent 怎么用(特色)
|
||||
|
||||
不必真起 6 个 Agent:
|
||||
|
||||
```text
|
||||
同一会话内:
|
||||
[lead] 规划
|
||||
[cie] 执行侦察 skill
|
||||
[cpe] 切换 pentest-tools
|
||||
…
|
||||
输出时用角色前缀标签,方便 timeline 检索:
|
||||
[cpe] nuclei high findings → E-003
|
||||
```
|
||||
|
||||
## 与 master-route 关系
|
||||
|
||||
- `master-route` 定 **PRIMARY skill**
|
||||
- `role-map` 定 **谁在当前阶段负责**(可写在 scope.md)
|
||||
- 多阶段任务 PRIMARY 常为 `attack-chain/`,由 lead 再分发
|
||||
|
||||
## MUST NOT
|
||||
|
||||
- 不要假设存在 Z3r0 会话 API
|
||||
- 不要为角色启动未授权目标的额外扫描
|
||||
54
reverse-skill-repo/skills/ops/sandbox-profile.md
Normal file
54
reverse-skill-repo/skills/ops/sandbox-profile.md
Normal file
@@ -0,0 +1,54 @@
|
||||
# 可选沙箱工具 Profile(对照 bootstrap-manifest)
|
||||
|
||||
> Z3r0 默认镜像工具很全;reverse-skill **不捆绑镜像**,用本表做「覆盖率对照」与可选 Docker 建议。
|
||||
|
||||
## reverse-skill 可自动 bootstrap 的能力
|
||||
|
||||
来源:`skills/scripts/bootstrap-manifest.json`(以文件为准):
|
||||
|
||||
| 能力 | 典型场景 |
|
||||
|------|----------|
|
||||
| jadx / apktool / adb / frida / frida-ps | Android |
|
||||
| r2 / rabin2 | 二进制 CLI |
|
||||
| idalib-mcp / idapro | IDA MCP |
|
||||
| jeb-pro | 商业 Android / ARM 反编译器(手动许可安装) |
|
||||
| jshookmcp / reqable-mcp / anything-analyzer / agent-browser | Web/JS/抓包/浏览器 |
|
||||
| ghidra-mcp | Ghidra |
|
||||
| nmap / seclists / proxycat / burpsuite-mcp / pentestswarm | 渗透 |
|
||||
| binwalk / pwntools / yara | 固件/pwn/恶意 |
|
||||
|
||||
```powershell
|
||||
powershell -File skills\scripts\bootstrap-reverse.ps1 -Capability @('jadx','nmap','yara') -StartServices
|
||||
powershell -File skills\scripts\refresh-tool-index.ps1
|
||||
```
|
||||
|
||||
## Z3r0 沙箱常见但本包 manifest 未自动装的
|
||||
|
||||
| 工具 | reverse-skill 策略 |
|
||||
|------|-------------------|
|
||||
| subfinder / amass / httpx / ffuf / nuclei / sqlmap | 文档安装 / Kali 脚本 / 外部 MCP;**勿假装 bootstrap 已有** |
|
||||
| Ghidra GUI 全量 | ghidra-mcp 能力 + 手动插件步骤 |
|
||||
| gdb / pwndbg | 平台文档手动;pwntools 可 bootstrap |
|
||||
| hydra / hashcat | 手动或 Kali |
|
||||
| JEB Pro | 用户持有许可证后手动安装;第三方 MCP bridge 必须先完成供应链审查 |
|
||||
| Reqable 桌面客户端 | 用户手动安装;`reqable-mcp` 仅登记官方固定版本的 MCP 运行时 |
|
||||
| SecLists | seclists 能力 |
|
||||
|
||||
## 推荐「轻量 Docker 作战」profile(可选,非依赖)
|
||||
|
||||
仅当用户 **自己** 有 Docker 且授权 lab 时:
|
||||
|
||||
```text
|
||||
最小:nmap + nuclei + sqlmap 容器或 pentestMCP 类镜像
|
||||
移动:jadx + apktool + frida 宿主机
|
||||
逆向:宿主机 IDA/r2 + tool-index
|
||||
```
|
||||
|
||||
**MUST NOT** 要求用户安装 Z3r0 才能使用 reverse-skill。
|
||||
|
||||
## network_profile 联动
|
||||
|
||||
沙箱内扫描仍受 case `scope.md` 的 `network_profile` 约束:
|
||||
|
||||
- `offline` → 不建议起对外扫描容器
|
||||
- `authorized_target_only` → 容器也只能打 in_scope
|
||||
93
reverse-skill-repo/skills/ops/scope-contract.md
Normal file
93
reverse-skill-repo/skills/ops/scope-contract.md
Normal file
@@ -0,0 +1,93 @@
|
||||
# 通用 Scope 契约(任务启动硬门槛)
|
||||
|
||||
> **MUST**:任何安全/逆向/渗透任务在 **ACT 之前** 在用户项目或 `work/<case>/` 落地 `scope.md`。
|
||||
> 无 scope → 只允许读文档/路由,**禁止** 对目标主动扫描、Hook、利用。
|
||||
> 模板可复制;字段名保持英文键,便于脚本校验。
|
||||
|
||||
## 如何初始化
|
||||
|
||||
```powershell
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -File skills\scripts\case-init.ps1 -Hint "<任务一句话>" -CaseName "my-case"
|
||||
# 默认产出:当前分析项目的 work/<case>/scope.md 等
|
||||
# 从其他目录调用 skill 时显式指定:-ProjectRoot "C:\path\to\analysis-project"
|
||||
```
|
||||
|
||||
## scope.md 完整模板
|
||||
|
||||
```markdown
|
||||
# Case Scope
|
||||
|
||||
## meta
|
||||
- case_id: {YYYYMMDD-short}
|
||||
- created: {ISO-8601}
|
||||
- operator: {name or local}
|
||||
- primary_skill: {from master-route}
|
||||
- lead_role: lead # see ops/role-map.md
|
||||
- specialist_roles: [] # e.g. cie, cpe, cre
|
||||
|
||||
## auth
|
||||
- status: granted | pending | denied
|
||||
- basis: written_contract | bug_bounty_scope | ctf_public | own_system | lab_only
|
||||
- evidence_of_auth: {ticket/path or "CTF public" or "owner-operated"}
|
||||
- MUST NOT proceed if status != granted
|
||||
|
||||
## in_scope
|
||||
- assets: [] # hosts, domains, APK paths, binaries, URLs
|
||||
- surfaces: [] # web, mobile, binary, network, api
|
||||
- activities: [] # recon, reverse, exploit_validate, report
|
||||
|
||||
## out_of_scope
|
||||
- assets: []
|
||||
- activities: [] # e.g. DoS, phishing real users, data exfil
|
||||
|
||||
## network_profile
|
||||
- mode: offline | lab_only | authorized_target_only | unrestricted_lab
|
||||
- notes: |
|
||||
offline = 无对外发包(纯静态/本地样本)
|
||||
lab_only = 仅 lab/VM IP
|
||||
authorized_target_only = 仅 in_scope 资产
|
||||
- MUST NOT use unrestricted against production without written auth
|
||||
|
||||
## deliverables
|
||||
- report: true
|
||||
- field_journal: true
|
||||
- diagrams: true
|
||||
- timeline: true
|
||||
|
||||
## constraints
|
||||
- timebox: {}
|
||||
- stealth: low | medium | high
|
||||
- data_handling: anonymize | no_user_pii
|
||||
|
||||
## signoff
|
||||
- ready_for_act: false
|
||||
- checklist:
|
||||
- [ ] auth.status = granted
|
||||
- [ ] in_scope.assets non-empty OR offline sample path set
|
||||
- [ ] network_profile.mode chosen
|
||||
- [ ] out_of_scope reviewed
|
||||
```
|
||||
|
||||
## 路由挂钩(AI 必须执行)
|
||||
|
||||
```text
|
||||
RULES / MASTER-ROUTING / SKILL:
|
||||
1) master-route → PRIMARY
|
||||
2) case-init 或手写 scope.md
|
||||
3) auth 未 granted → STOP,只允许补授权材料
|
||||
4) ready_for_act = true → 打开 PRIMARY SKILL.md → ACT
|
||||
```
|
||||
|
||||
## network_profile 速查
|
||||
|
||||
| mode | 允许 | 禁止 |
|
||||
|------|------|------|
|
||||
| `offline` | 静态分析、本地文件、模拟 | 任意外连、公网 RPC |
|
||||
| `lab_only` | lab/CTF 靶机网段 | 生产/未授权 IP |
|
||||
| `authorized_target_only` | in_scope 列表 | 列表外资产 |
|
||||
| `unrestricted_lab` | 隔离实验网(书面) | 互联网生产 |
|
||||
|
||||
## 特色
|
||||
|
||||
- 纯 Markdown,**无数据库**
|
||||
- 与 `tool-index` / bootstrap 正交:scope 管「能不能打」,tool-index 管「用什么打」
|
||||
71
reverse-skill-repo/skills/ops/skill-supply-chain.md
Normal file
71
reverse-skill-repo/skills/ops/skill-supply-chain.md
Normal file
@@ -0,0 +1,71 @@
|
||||
# Agent Skill 供应链安全(本包特色)
|
||||
|
||||
> 来源综合:OWASP Agentic Skills Top 10(AST10)、Anthropic Agent Skills 安全建议、公开投毒事件(如 ClawHavoc,见 AST10 时间线)
|
||||
> 检索日期:2026-07-17
|
||||
> 适用:安装/编写/合并 **任何** skill、MCP、bootstrap 脚本时
|
||||
|
||||
本包**可执行脚本面**静态审计(后门 / 删库 / 管道执行):[`docs/PACKAGE-SECURITY-AUDIT.md`](../../docs/PACKAGE-SECURITY-AUDIT.md)。
|
||||
|
||||
## 1. 为什么 reverse-skill 要单独管这个
|
||||
|
||||
本包会:
|
||||
|
||||
- 指导 AI **执行命令与 bootstrap 下载**
|
||||
- 通过 MCP 接触本地与网络
|
||||
- 写入 field-journal / 报告
|
||||
|
||||
恶意 skill 可导致:凭据窃取、持久化提示词、供应链后门。
|
||||
我们用 **文档门闩 + 工具真相源**,而不是再做一个 skill 应用商店。
|
||||
|
||||
## 2. 威胁对照(精简 AST10 思路)
|
||||
|
||||
| 风险类 | 表现 | 本包控制 |
|
||||
|--------|------|----------|
|
||||
| 恶意/投毒 skill | 诱导 exfil、写 memory/后门 | 只信本仓库 + 用户书面授权的外源;外源先人工读 SKILL.md 与 scripts |
|
||||
| 权限过度 | 无差别 `curl \| bash`、全盘读 | bootstrap 仅 manifest 能力;scope `network_profile` |
|
||||
| 依赖投毒 | pip/npm 恶意包 | 优先官方 release;记录版本到 tool-index |
|
||||
| MCP 盲信 | 未审计 MCP 服务器 | tool-index 注册状态 + 端口探测;不默认信任远程 MCP |
|
||||
| MCP/CLI 自动执行投毒 | 仓库 `.env` 改 `CODEX_HOME` 等导致启动即执行恶意 MCP(HackTricks / CVE 类案例) | 不信任仓库内默认 MCP 配置;启动 Agent 前检查 env 与 MCP 列表 |
|
||||
| 提示注入进 skill | SKILL 正文藏隐蔽指令 | 审阅 diff;禁止「隐藏在 HTML 注释的执行指令」不经用户 |
|
||||
| 范围漂移 | skill 诱导扩大扫描 / 「一个域名全自动打穿」 | ops/scope-contract:out_of_scope + auth;禁止无 in_scope 的狂扫 |
|
||||
| 技能堆叠过载 | 同时挂载过多 skill 反而漏报(公开评测观察) | 只加载 PRIMARY + 必要 secondary(MASTER-ROUTING) |
|
||||
|
||||
## 3. 安装外部 skill 的 MUST 清单
|
||||
|
||||
```text
|
||||
□ 来源:官方 org / 已审计列表(如 ToB curated)/ 用户自有
|
||||
□ 阅读全部 SKILL.md + scripts/* + package 依赖
|
||||
□ 无神秘外连、无读取 ~/.ssh / 浏览器库 的默认步骤
|
||||
□ 与本包路由冲突时:以本包 MASTER-ROUTING + scope 为准
|
||||
□ 不复制进 monorepo 除非走 CONTRIBUTING 与脱敏
|
||||
□ 更新 skills/references/community-security-skills.md 记录来源日期
|
||||
```
|
||||
|
||||
## 4. 与 bootstrap / MCP 的边界
|
||||
|
||||
| 动作 | 允许 | 禁止 |
|
||||
|------|------|------|
|
||||
| `bootstrap-reverse.ps1 -Capability X` | X ∈ bootstrap-manifest.json | 任意新 name 而不改 manifest |
|
||||
| 注册 MCP | 用户确认 + tool-index 刷新 | 静默写入全局 MCP 指向未知 URL |
|
||||
| 跑社区 Python 一键 pentest | 授权 lab + 读源码后 | 直接生产目标 + 未知脚本 |
|
||||
|
||||
## 5. 本包作者/贡献者
|
||||
|
||||
- 新 skill:CONTRIBUTING + ACTION REQUIRED + 完成自检
|
||||
- 引用社区内容:标注 URL + 日期(本文件 / community-security-skills.md)
|
||||
- 发现可疑行为:停止执行,告知用户,不自动「尝试绕过」
|
||||
|
||||
## 6. 快速自检(每次合并外部材料前)
|
||||
|
||||
```powershell
|
||||
# 列出将引入的脚本扩展名
|
||||
Get-ChildItem -Recurse -Include *.ps1,*.sh,*.py,*.js | Select-Object FullName
|
||||
# 粗搜危险模式(人工复核,非完备)
|
||||
# 在外部目录执行:Select-String -Pattern 'Invoke-WebRequest|curl .\||wget .\||~/.ssh|exfil'
|
||||
```
|
||||
|
||||
## 7. 相关
|
||||
|
||||
- 身份:`IDENTITY.md`
|
||||
- 外部目录:`../references/community-security-skills.md`
|
||||
- 授权:`scope-contract.md` + `field-journal/precedent-auth.md`
|
||||
74
reverse-skill-repo/skills/ops/timeline-workitem.md
Normal file
74
reverse-skill-repo/skills/ops/timeline-workitem.md
Normal file
@@ -0,0 +1,74 @@
|
||||
# Timeline + WorkItem / Coverage
|
||||
|
||||
> 可回放作战记录(Z3r0 timeline 思想)+ 覆盖勾选(WorkItem 思想)。
|
||||
> 全部落在 **`work/<case>/`**(仓库 gitignore),不进 skill 包正文。
|
||||
|
||||
## 目录约定
|
||||
|
||||
```text
|
||||
work/<case>/
|
||||
scope.md # 契约(ops/scope-contract.md)
|
||||
timeline.md # 追加写,禁止改历史条目
|
||||
workitems.md # 工作项与覆盖
|
||||
evidence/ # 原始产物(截图、pcap、日志)
|
||||
notes/
|
||||
report/ # 最终报告草稿或拷贝
|
||||
```
|
||||
|
||||
初始化:
|
||||
|
||||
```powershell
|
||||
powershell -File skills\scripts\case-init.ps1 -Hint "full pentest" -CaseName "acme-2026"
|
||||
```
|
||||
|
||||
## timeline.md 格式
|
||||
|
||||
每条记录 **只追加**:
|
||||
|
||||
```markdown
|
||||
## {ISO-8601} | {role} | {phase}
|
||||
- action:
|
||||
- command_or_ref:
|
||||
- result_summary:
|
||||
- artifacts: [] # relative paths under this case
|
||||
- evidence_ids: [] # E-xxx when promoted
|
||||
- next:
|
||||
```
|
||||
|
||||
**MUST NOT** 删除或改写已有 `##` 时间块(更正用新条目 + `corrects: {timestamp}`)。
|
||||
|
||||
## workitems.md 模板
|
||||
|
||||
```markdown
|
||||
# Work Items
|
||||
|
||||
| ID | title | role | targets | surface | status | evidence | notes |
|
||||
|----|-------|------|---------|---------|--------|----------|-------|
|
||||
| WI-001 | Port scan edge | cie | {ip} | network | done | E-001 | |
|
||||
| WI-002 | Auth bypass check | cpe | /api/login | web | blocked | | need creds |
|
||||
|
||||
status: pending | in_progress | blocked | done | cancelled
|
||||
|
||||
## Coverage
|
||||
- [ ] Recon complete for in_scope assets
|
||||
- [ ] Critical/High candidates triaged
|
||||
- [ ] Validated findings have Evidence
|
||||
- [ ] Path documented (attack/call/solve)
|
||||
- [ ] Timeline continuous (no silent gaps >1 major phase)
|
||||
- [ ] Report exported via docs-generator
|
||||
- [ ] field-journal written (anonymized)
|
||||
```
|
||||
|
||||
## attack-chain / pentest 挂钩
|
||||
|
||||
| Skill | MUST |
|
||||
|-------|------|
|
||||
| `attack-chain/` | 多阶段任务创建 case 目录;每阶段结束更新 workitems + timeline |
|
||||
| `pentest-tools/` | 每次工具跑批后至少 1 条 timeline;发现 → Evidence 草稿 |
|
||||
| 其它 RE skill | 建议 timeline;至少在出报告前补齐 Evidence 链 |
|
||||
|
||||
## 特色
|
||||
|
||||
- Agent 友好的纯文本,diff/review 友好
|
||||
- 与 tool-index 命令路径可交叉引用
|
||||
- 不依赖 WebSocket 直播;需要时把 timeline 贴进报告即可
|
||||
Reference in New Issue
Block a user