Algorithm Search⌘K

Modelcore

Attack graph

Also called network attack graph.

A graph of network states or security conditions and exploits that shows every way an attacker can reach a goal.

An attack graph shows all the ways in which an attacker can move through a network, step by step, from an initial foothold to a goal. Each step is an exploit: an action that needs some security conditions to hold and makes other conditions hold. There are two main forms. In a state graph, a node is a full state of the network and the attacker, and an edge is one exploit. In a condition graph, the nodes are single conditions and exploits, and edges join the conditions an exploit needs to the exploit and the exploit to the conditions it gives. Phillips and Swiler (1998) proposed attack graphs for network vulnerability analysis. Sheyner et al. (2002) generated state graphs with a model checker, and Ammann et al. (2002) and Ou et al. (2006) showed that condition graphs of polynomial size suffice when the attacker never loses what it has gained. Attack graphs are a tool for defenders to find and close paths. The example below is abstract.

The machine

The attacker is the machine. Its state is the set of conditions that hold, such as "the attacker can run code on host hh as user uu" or "the attacker can send packets to host hh on port pp".

Conditions and exploits. Let CC be a finite set of conditions and XX a finite set of exploits. Each exploit x∈Xx \in X has a set pre(x)⊆C\mathrm{pre}(x) \subseteq C of preconditions and a set post(x)⊆C\mathrm{post}(x) \subseteq C of postconditions. The initial state s0⊆Cs_0 \subseteq C holds the facts of the network and the starting point of the attacker. A goal is a condition gg or a set of goal states.

State graph. A node is a state s⊆Cs \subseteq C. There is an edge from ss to s∪post(x)s \cup \mathrm{post}(x) when pre(x)⊆s\mathrm{pre}(x) \subseteq s and post(x)⊈s\mathrm{post}(x) \not\subseteq s. The attack graph is the part reachable from s0s_0, often restricted to the states from which a goal state can be reached. In general models an exploit can also remove conditions, and the state can include the defender's view.

Condition graph. Under monotonicity, no exploit removes a condition. Then there is one node per condition and one per exploit, with an edge c→xc \to x for each c∈pre(x)c \in \mathrm{pre}(x) and an edge x→cx \to c for each c∈post(x)c \in \mathrm{post}(x). An exploit is an AND node and a condition is an OR node.

What it counts

Example. Conditions c0c_0 (the start), c1c_1, c2c_2 and c3c_3 (the goal). Exploits e1:{c0}→c1e_1 : \{c_0\} \to c_1, e2:{c0}→c2e_2 : \{c_0\} \to c_2, e3:{c1}→c3e_3 : \{c_1\} \to c_3 and e4:{c2}→c3e_4 : \{c_2\} \to c_3. The labels are abstract.

form nodes edges
state graph from {c0}\{c_0\} 7 states 10 transitions
condition graph 4 conditions and 4 exploits 8

The state graph has a node for each reachable set of conditions, for example {c0,c1}\{c_0, c_1\} and {c0,c1,c2}\{c_0, c_1, c_2\}, and so it repeats the same exploit in many states. The condition graph has each condition and each exploit once.

Size. A state graph can have up to 2∣C∣2^{|C|} nodes, and this blowup is the main cost of the state form. A condition graph has ∣C∣+∣X∣|C| + |X| nodes and at most ∑x(∣pre(x)∣+∣post(x)∣)\sum_x (|\mathrm{pre}(x)| + |\mathrm{post}(x)|) edges.

Questions and their cost. On the word RAM:

  • Can the attacker reach gg? Under monotonicity, this is forward chaining: fire every exploit whose preconditions hold until nothing changes. It takes time linear in the size of the condition graph, as in Horn satisfiability. Without monotonicity, it is reachability in the state graph, which can be exponential in ∣C∣|C|.
  • What is the shortest or cheapest attack? In a state graph with weights on the edges, this is a shortest path, found with Dijkstra's algorithm. Phillips and Swiler used edge weights such as a probability or an effort and looked for the paths of lowest cost. In a condition graph, the cheapest set of exploits that reaches gg is an AND-OR problem, and it is hard in general, as for attack trees with shared nodes.
  • What is the smallest set of exploits to remove so that gg becomes unreachable? In the example, every attack uses e1e_1 and e3e_3 or e2e_2 and e4e_4, so the smallest such sets have 2 exploits, for example {e1,e2}\{e_1, e_2\} or {e3,e4}\{e_3, e_4\}, and there are 4 of them. In general this is a hitting set of the minimal attacks.

Relation to other models

  • Attack trees. An attack tree describes one goal by refinement. Unfolding a condition graph from the goal gives an attack tree, with shared nodes copied.
  • Model checking. A state graph is the set of runs of a transition system that violate the safety property "the goal is never reached". Sheyner et al. obtain it from a symbolic model checker.
  • Datalog and Horn clauses. A monotonic exploit is a Horn clause post←pre\mathrm{post} \leftarrow \mathrm{pre}. Logical attack graph generation writes the exploits as Datalog rules with variables over hosts and records the derivations.
  • Petri nets and planning. Conditions as places and exploits as transitions give a Petri net, and the search for an attack is a planning problem with exploits as actions.
  • Intrusion detection. Alerts from intrusion detectors can be mapped to exploits in the graph, to see which alerts form a path toward a goal.

Known results in the model

  • Monotonicity gives polynomial size (theorem). If no exploit removes a condition, every reachable condition is reached by a sequence of exploits in which each adds at least one new condition, so the reachable conditions are found in at most ∣C∣|C| rounds, and the condition graph has polynomial size. Ammann, Wijesekera and Kaushik (2002) stated this, and Ou, Boyer and McQueen (2006) proved an O(N2)O(N^2) bound on the size for NN hosts with the MulVAL rules.
  • State graphs can be exponential (theorem). With kk independent exploits from s0s_0, each adding its own condition, the reachable states are all 2k2^k subsets of the added conditions, while the condition graph has 2k+12k + 1 nodes. This gap is why later work moved to condition graphs.
  • Smallest blocking set is NP-hard (theorem). In a state graph whose edges are labeled with atomic attacks, removing an attack deletes every edge with its label. Jha, Sheyner and Wing (2002) relate the smallest set of attacks whose removal blocks all paths to the goal to the minimum hitting set problem, and use a greedy algorithm for an approximate answer. Hardness follows by a direct reduction: for a hitting set instance with sets S1,…,SmS_1, \ldots, S_m, draw one path from the start to the goal for each SiS_i, with one edge labeled by each element of SiS_i. The goal is blocked exactly when the removed labels hit every SiS_i.
  • Probabilities. Jha, Sheyner and Wing also put probabilities on the transitions and analyze the graph as a Markov decision process, to compute the probability that the attacker reaches the goal. The probabilities are inputs of the model, not facts about a network.

References

  1. Cynthia Phillips and Laura Painton Swiler, A graph-based system for network-vulnerability analysis, New Security Paradigms Workshop (NSPW) 1998, pages 71 to 79, attack states as nodes, attacker actions as weighted edges built from attack templates, configuration and attacker profiles, and shortest paths for the most likely attacks
  2. Oleg Sheyner, Joshua Haines, Somesh Jha, Richard Lippmann and Jeannette M. Wing, Automated generation and analysis of attack graphs, IEEE Symposium on Security and Privacy 2002, pages 273 to 284, the attack graph as the set of counterexamples of a model checker for a safety property, and its generation with a symbolic model checker
  3. Somesh Jha, Oleg Sheyner and Jeannette M. Wing, Two formal analyses of attack graphs, 15th IEEE Computer Security Foundations Workshop, 2002, pages 49 to 63, the minimization analysis (the smallest set of attacks to prevent, by hitting set) and the probabilistic analysis
  4. Paul Ammann, Duminda Wijesekera and Saket Kaushik, Scalable, graph-based network vulnerability analysis, ACM CCS 2002, pages 217 to 224, the monotonicity assumption and the polynomial graph over attributes and exploits
  5. Xinming Ou, Wayne F. Boyer and Miles A. McQueen, A scalable approach to attack graph generation, ACM CCS 2006, pages 336 to 345, the logical attack graph and its quadratic size

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/K1YV61/text.yaml