Penetration testing, a crucial industrial practice for ensuring system security,
has traditionally resisted automation due to the extensive expertise required by
human professionals. We explore the potential of Large Language Models (LLMs) to
revolutionize this field.
We establish a comprehensive benchmark using real-world penetration testing targets,
encompassing both vulnerable machines and CTF challenges. Our findings reveal that
while LLMs demonstrate proficiency in specific sub-tasks—such as using testing tools,
interpreting outputs, and proposing subsequent actions—they encounter difficulties
maintaining an overall testing context.
To address these limitations, we introduce PENTESTGPT, an LLM-empowered automated
penetration testing framework featuring three self-interacting modules. Our evaluation
shows that PENTESTGPT achieves a 228.6% performance increase compared to GPT-3.5
and proves effective in real-world scenarios.