Skill 寫法圖鑑

attack-tree-construction

wshobson | 安全護欄 | 原文 | MIT

建構攻擊樹把威脅路徑視覺化,找出防禦缺口並向利害關係人說明風險

中文翻譯

---
name: attack-tree-construction
description: 建構完整的攻擊樹來視覺化威脅路徑。在對應攻擊情境、找出防禦缺口,或向利害關係人說明資安風險時使用。
---

# 攻擊樹建構

有系統地把攻擊路徑視覺化並加以分析。

## 何時使用這個 Skill

- 視覺化複雜的攻擊情境
- 找出防禦缺口和優先順序
- 向利害關係人說明風險
- 規劃防禦投資
- 規劃滲透測試
- 資安架構審查

## 核心概念

### 1. 攻擊樹結構

```
                    [Root Goal]
                         |
            ┌────────────┴────────────┐
            │                         │
       [Sub-goal 1]              [Sub-goal 2]
       (OR node)                 (AND node)
            │                         │
      ┌─────┴─────┐             ┌─────┴─────┐
      │           │             │           │
   [Attack]   [Attack]      [Attack]   [Attack]
    (leaf)     (leaf)        (leaf)     (leaf)
```

### 2. 節點類型

| 類型     | 符號    | 說明             |
| -------- | --------- | ----------------------- |
| **OR**   | 橢圓 | 任何一個子節點都能達成目標 |
| **AND**  | 矩形 | 需要所有子節點   |
| **Leaf** | 方框       | 不可再分的攻擊步驟      |

### 3. 攻擊屬性

| 屬性     | 說明             | 值             |
| ------------- | ----------------------- | ------------------ |
| **Cost**      | 需要的資源        | $、$$、$$$         |
| **Time**      | 執行所需時間     | 數小時、數天、數週 |
| **Skill**     | 需要的專業程度      | 低、中、高  |
| **Detection** | 被偵測到的可能性 | 低、中、高  |

## 範本與詳細的實作範例

完整的範本庫放在 `references/details.md`。需要這個 skill 的具體範本時,讀那個檔案。

## 最佳實務

### 該做的

- **從明確的目標開始** - 定義攻擊者想要什麼
- **要窮盡** - 考慮所有攻擊向量
- **替攻擊加上屬性** - 成本、技術門檻和偵測難度
- **定期更新** - 新的威脅會不斷出現
- **請專家驗證** - 紅隊審查

### 不該做的

- **不要過度簡化** - 真實的攻擊很複雜
- **不要忽略相依關係** - AND 節點很重要
- **不要忘了內部威脅** - 不是所有攻擊者都來自外部
- **不要跳過緩解措施** - 攻擊樹是用來規劃防禦的
- **不要讓它一成不變** - 威脅環境持續在演變

英文原文

---
name: attack-tree-construction
description: Build comprehensive attack trees to visualize threat paths. Use when mapping attack scenarios, identifying defense gaps, or communicating security risks to stakeholders.
---

# 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