attack-tree-construction
它能做什么
这个工具可以帮你梳理一次攻击可能如何发生。它会列出从攻击者的主要目标,一直到他们可以采取的最简单操作之间的所有可能步骤。
适用场景
- ✓了解一次攻击可能如何展开。
- ✓找出安全防护可能在哪里失效。
- ✓向其他人解释安全风险。
技能链接
https://github.com/wshobson/agents/blob/main/plugins/security-scanning/skills/attack-tree-construction/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“为“盗取银行资金”画一棵攻击树。”
每周 5 个新技能,1 分钟读完。
工作原理
你先描述攻击的主要目标,AI 会帮你把它拆分成更小的部分,并标出哪些部分只需完成其中一项(OR),哪些部分必须全部完成(AND),攻击才能成功。最末端的每一步都是一个简单的攻击。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Attack Tree Construction
Systematic attack path visualization and analysis.
When to Use This Skill
- Visualizing complex attack scenarios
- Identifying defense gaps and priorities
- Communicating risks to stakeholders
- Planning defensive investments
- Penetration test planning
- Security architecture review
Core Concepts
1. Attack Tree Structure
[Root Goal]
|
┌────────────┴────────────┐
│ │
[Sub-goal 1] [Sub-goal 2]
(OR node) (AND node)
│ │
┌─────┴─────┐ ┌─────┴─────┐
│ │ │ │
[Attack] [Attack] [Attack] [Attack]
(leaf) (leaf) (leaf) (leaf)
2. Node Types
| Type | Symbol | Description |
|---|---|---|
| OR | Oval | Any child achieves goal |
| AND | Rectangle | All children required |
| Leaf | Box | Atomic attack step |
3. Attack Attributes
| Attribute | Description | Values |
|---|---|---|
| Cost | Resources needed | $, $$, $$$ |
| Time | Duration to execute | Hours, Days, Weeks |
| Skill | Expertise required | Low, Medium, High |
| Detection | Likelihood of detection | Low, Medium, High |
Templates and detailed worked examples
Full template library lives in references/details.md. Read that file when you need concrete templates for this skill.
Best Practices
Do's
- Start with clear goals - Define what attacker wants
- Be exhaustive - Consider all attack vectors
- Attribute attacks - Cost, skill, and detection
- Update regularly - New threats emerge
- Validate with experts - Red team review
Don'ts
- Don't oversimplify - Real attacks are complex
- Don't ignore dependencies - AND nodes matter
- Don't forget insider threats - Not all attackers are external
- Don't skip mitigations - Trees are for defense planning
- Don't make it static - Threat landscape evolves
常见问题
什么是 OR 节点和 AND 节点?
OR 节点表示其下方的任意一条路径都能导致成功。AND 节点表示其下方的所有路径都必须发生。
什么是攻击属性?
这是指每个攻击步骤的特征,例如成本、耗时、所需技能以及被发现的可能性。
为什么要评估成本和时间?
这有助于判断哪些攻击更容易实施、哪些更难,从而把防御重点放在最关键的地方。
详情
作者的原始描述
Build comprehensive attack trees to visualize threat paths. Use when mapping attack scenarios, identifying defense gaps, or communicating security risks to stakeholders.
repo: wshobson/agents
热度
- GitHub 星标
- 41k
- 排名
- #6778
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …