Skip to content
Skillpedia
Security41k Β· #6778

attack-tree-construction

What it does

This tool helps map out how an attack might happen. It shows all the possible steps, from the attacker's main goal down to the simplest actions they can take.

When to use it

  • βœ“To understand how an attack could work.
  • βœ“To see where security might fail.
  • βœ“To explain security risks to others.

Skill link

https://github.com/wshobson/agents/blob/main/plugins/security-scanning/skills/attack-tree-construction/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/wshobson/agents/blob/main/plugins/security-scanning/skills/attack-tree-construction/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œDraw an attack tree for stealing a bank.”

5 new skills a week. 1 minute to read.

How it works

You describe the main goal of the attack. The AI then helps break that goal into smaller parts, showing if any part (OR) or all parts (AND) need to be completed for the attack to succeed. Each final step is a simple attack.

Technical content (original SKILL.md)

Original text by the author, straight from 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
FAQ

What are OR and AND nodes?

An OR node means any of the paths below it can lead to success. An AND node means all paths below it must happen.

What are attack attributes?

These are characteristics like the cost, time, required skill, and chance of detection for each attack step.

Why is it important to assign costs and time?

It helps understand which attacks are easier or harder to carry out, allowing focus on the most important defenses.

Details

Original description by the author

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

Popularity

GitHub stars
41k
Ranking position
#6778
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills