Les POMDP font de meilleurs hackers: Tenir compte de l'incertitude dans les tests de pénétration

Carlos Sarraute, Olivier Buffet, Hoffmann, Joerg

TL;DR

This paper proposes a novel approach to automate penetration testing by modeling the problem as a Partially Observable Markov Decision Process (POMDP). To overcome the scalability issues of global POMDPs for large networks, they introduce a hierarchical decomposition algorithm (4AL) that breaks down the problem into manageable sub-problems, achieving efficient and effective attack planning with minimal loss in quality.

What Problem Does This Paper Address?

Automating penetration testing (pentesting) is crucial for regular and systematic security assessments. A key challenge in this automation is generating realistic and effective attack strategies. Traditional approaches often rely on extensive pre-scanning to reduce uncertainty about the network configuration, which is time-consuming and generates significant network traffic. Furthermore, these methods struggle to effectively handle the inherent uncertainty in real-world network environments, where complete knowledge of system configurations is rarely available. This paper addresses the problem of generating intelligent attack plans that can reason about and leverage this uncertainty, while also being scalable to large networks.

Methods

The core of the proposed solution is to model penetration testing as a POMDP. This allows the system to reason about the state of the network, even with incomplete information, and to make decisions about which actions (scans or exploits) to take to achieve its goals.

To address the scalability limitations of solving a single, large POMDP for an entire network, the authors introduce a hierarchical decomposition algorithm called 4AL. This algorithm breaks down the problem into four levels of abstraction:

  1. Network Decomposition: The logical network (LN) is decomposed into an acyclic tree of biconnected components.
  2. Component Attack: Each biconnected component is attacked by considering paths within the component and propagating rewards upwards.
  3. Subnetwork Attack: For each subnetwork, the algorithm determines the best machine to attack first, considering firewall restrictions and pivoting rewards.
  4. Individual Machine Attack: For individual machines, the problem is modeled as a standard POMDP and solved using an existing solver.

The key idea is to use POMDPs only for the most granular level (individual machines) and to use conservative approximations at higher levels to maintain tractability while ensuring that the overall solution is also conservative (i.e., it doesn't overestimate the attack value).

Datasets

The paper does not introduce new datasets. Instead, it uses a realistic industrial test case from Core Security, which includes a network structure with multiple zones (Exposed, Sensitive, User) separated by firewalls, and a set of exploits from Core Security's database. The number of machines and exploits are scaled for experiments.

Key Insights and Ideas

  • POMDPs as a Natural Fit for Pentesting: The inherent uncertainty in network configurations and the sequential decision-making nature of attacks make POMDPs a theoretically sound model for penetration testing.
  • Hierarchical Decomposition for Scalability: Directly solving a POMDP for a large network is intractable. The 4AL algorithm effectively decomposes the problem, allowing for efficient planning by focusing POMDP solving on individual machines.
  • Conservative Approximations are Key: By using conservative approximations at each level of the hierarchy, the overall 4AL algorithm ensures that the resulting attack plan does not overestimate its potential success, providing a reliable, albeit potentially suboptimal, strategy.
  • Intelligent Blending of Scans and Exploits: The POMDP framework naturally allows for the intelligent interleaving of scanning actions (to gain information) and exploit actions (to achieve objectives), mimicking how a human hacker might operate.

Key Results

The experimental evaluation of 4AL against a global POMDP model shows:

  • Minimal Loss in Attack Quality: The quality of attacks generated by 4AL is comparable to a global POMDP, with an average loss of only 1.96% and a maximum loss of 14.1% across various configurations.
  • Significant Speedup: 4AL demonstrates substantial improvements in execution time. Even for realistic scenarios with up to 100 machines and 100 exploits, the execution time remains under 37 seconds, whereas global POMDPs become infeasible.

Limitations and Future Work

  • Model Simplifications: The paper acknowledges that the model for software updates (used to generate the initial belief state) is a simplification. Future work could involve developing more precise models for software updates.
  • Domain-Specific Algorithm: 4AL is a domain-specific algorithm for penetration testing. The authors suggest exploring how its ideas (like hierarchical decomposition and policy abstraction) can be generalized to other POMDP problems.
  • Comparison with Classical Planning: An important open question is how 4AL's cost-effectiveness compares to classical planning approaches that use extensive scans. Future work will involve experimental comparisons.
  • Further POMDP Solver Optimization: The authors suggest that POMDP solvers could be further adapted to the specific characteristics of penetration testing problems, such as the absence of non-deterministic actions and the presence of static state components.
  • Industrial Application: The paper expresses hope that their work will inspire further advancements in the industrial application of this technology.

Summary updated

BibTeX
@inproceedings{sarraute2012les,
  author = {Carlos Sarraute and Olivier Buffet and Hoffmann, Joerg},
  title = {{Les POMDP font de meilleurs hackers: Tenir compte de l'incertitude dans les tests de pénétration}},
  booktitle = {HAL},
  year = {2012},
}
Figure