02 Model in more depth · Beginner to intermediate

Build an attack tree by hand

Add your own goals, gates and leaves, connect them, and link the tree to the diagram it threatens.

Free Lesson 1 of 6 4 min Updated

In this lesson you will learn

  • What goal, OR gate, AND gate and leaf nodes mean
  • How to add and connect nodes
  • When to use AND instead of OR
  • How to link a tree to its data flow diagram

Why build by hand

Generated trees cover the common threats for each element. The threats specific to your business, such as someone faking an expense claim, come from people who know the system. An attack tree lets you write those down as a structure: one attacker goal at the top, broken into the ways it can be reached.

Steps

  1. Know the four node types

    A Goal is the attacker's objective; a tree has one. An OR gate is reached if any child succeeds: several independent ways in. An AND gate is reached only if all its children succeed together. A Leaf is one concrete step, and it is where the risk data lives. Gates are pure logic: likelihood, impact, tags and treatments only appear on goals and leaves.

  2. Add nodes from the palette

    Drag a node from the palette on the left, or click it to place it in the middle of the canvas. Give it a label that says what the attacker does, such as Upload a forged receipt, and a description.

  3. Connect them

    Select the parent, click Draw connection (or press C), then click the child. Auto Layout tidies the tree when it gets busy.

    A ThreatTree attack tree with a hand-built AND gate, Pay out a fake claim, under Tamper with data or code, with two leaves: Upload a forged receipt and Approve with a stolen manager session.
    An AND gate: paying out a fake claim needs a forged receipt and a stolen manager session.
  4. Score the leaves and link the tree

    Score each leaf as in lesson 4. Leaves with no children go to the risk register by default; Include in risk register overrides that on any goal or leaf. If the tree isn't linked to a diagram yet, Link to DFD in the top bar picks one from the same forest, and the diagram's Attack Trees button then lists it.

Linking is optional. You can build a quick "what if" tree with no diagram and link it later.

Practice

Try it

In your attack tree, add an AND gate for an attack that needs two things to happen together, with a leaf for each. Connect them and score both leaves.

Open My Forests

Quiz

Check what you learned

Three quick questions. Your answers stay in this browser.

1 An attack only works if two conditions happen together. Which gate do you use?
2 Where do likelihood and impact go?
3 How do you connect a parent to a child?