# A Survey on Penetration Path Planning in Automated Penetration Testing
## 5 Planning Methods in Penetration Path Planning
### Summary  
In the field of PT, the testing is typically classified into three types: white-box testing, gray-box testing, and black-box testing, based on the degree of information available and utilized during the testing process. Similarly, penetration path planning can be in both static planning and dynamic decision-making modes depending on the degree of information known.  
Figure 5: LLM-based automated penetration framework.  
Static planning involves global path planning based on complete prior information, making it analogous to white-box testing. In contrast, dynamic decision-making focuses on local path planning using feedback information, emphasizing real-time decisions and adjustments based on the evolving situation during an attack. This approach effectively handles the unknown and uncertain aspects of PT, aligning with grey-box or black-box testing.  
Intelligent planning is a type of static planning that relies on established environmental models to make decisions using search or optimization techniques. Its strength lies in efficiently identifying the optimal penetration path when an accurate model is available. However, it struggles in complex or unknown environments where precise modeling is difficult. Additionally, intelligent planning is limited to generating action sequences and does not adapt these sequences based on environmental feedback. It cannot learn from environmental experiences, thereby failing to optimize its action selection strategy.  
RL is categorized as a form of dynamic decision-making. It enables agents to optimize strategies dynamically through interaction with a simulated environment, planning penetration paths based on real-time feedback. However, it can face challenges like reward sparsity and the need for expert-designed reward functions. HDRL and demonstration learning can mitigate these issues by integrating the strengths of supervised learning.  
LLMs are capable of both static planning and dynamic decision-making. Recently, LLMs have demonstrated significant potential in planning and exploring real-world scenarios. LLMs possess powerful language comprehension and real-time interaction capabilities, enabling them to understand complex instructions and contextual information and to interact with humans on-the-fly. The integration of LLMs with sequential decision-making processes opens new possibilities for penetration path planning in automated PT.  
Although LLMs have made significant advances in penetration path planning, their application still faces several challenges and limitations. Firstly, a complete and efficient penetration path planning framework based on LLMs has yet to be developed, with the process currently relying on carefully crafted language prompts to guide problem-solving. This makes the planning process more akin to an art of prompt engineering rather than a scientifically rigorous model design. Secondly, LLM outputs can sometimes suffer from hallucination, where the model generates information that seems plausible but is actually inaccurate or irrelevant. Additionally, certain security constraints may limit the use of LLMs in penetration path planning. While GPT-4 can handle complex planning scenarios without additional fine-tuning, its closed-source nature and high usage costs pose challenges for reproducibility and accessibility. On the other hand, open-source LLMs offer a more cost-effective alternative but typically require extensive customization and fine-tuning to meet the specific needs of penetration path planning tasks. Moreover, deploying and fine-tuning these open-source models often demands significant computational resources.