[論文レビュー] PentestGPT: An LLM-empowered Automatic Penetration Testing Tool
本論文は新しいベンチマークを用いて実世界のペンテストタスクに対するLLMsを評価し、タスク完了を向上させ、文脈喪失を低減する三部構成アーキテクチャを持つLLM主導の自動ペンテストシステムであるPentestGPTを提案する。
Penetration testing, a crucial industrial practice for ensuring system security, has traditionally resisted automation due to the extensive expertise required by human professionals. Large Language Models (LLMs) have shown significant advancements in various domains, and their emergent abilities suggest their potential to revolutionize industries. In this research, we evaluate the performance of LLMs on real-world penetration testing tasks using a robust benchmark created from test machines with platforms. Our findings reveal that while LLMs demonstrate proficiency in specific sub-tasks within the penetration testing process, such as using testing tools, interpreting outputs, and proposing subsequent actions, they also encounter difficulties maintaining an integrated understanding of the overall testing scenario. In response to these insights, we introduce PentestGPT, an LLM-empowered automatic penetration testing tool that leverages the abundant domain knowledge inherent in LLMs. PentestGPT is meticulously designed with three self-interacting modules, each addressing individual sub-tasks of penetration testing, to mitigate the challenges related to context loss. Our evaluation shows that PentestGPT not only outperforms LLMs with a task-completion increase of 228.6\% compared to the \gptthree model among the benchmark targets but also proves effective in tackling real-world penetration testing challenges. Having been open-sourced on GitHub, PentestGPT has garnered over 4,700 stars and fostered active community engagement, attesting to its value and impact in both the academic and industrial spheres.
研究の動機と目的
- LLMs を通じて自動化されたペンテストを促進し、ドメイン専門知識への依存を低減する。
- 多様なターゲットにわたるペンテスト能力を評価するための堅牢で実世界のベンチマークを作成する。
- 離散的なテスト状態とタスクをLLMsに指示する統合システム(PentestGPT)を開発する。
提案手法
- HackTheBox と VulnHub から合わせて 13 ターゲットを構築し、OWASP Top 10 の脆弱性に対応する 182 のサブタスクに合わせる。
- ベンチマークに対してエンドツーエンドおよびサブタスクの性能で GPT-3.5、GPT-4、Bard を評価する。
- 文脈喪失などの制約や特定のタスクパターンへの傾向といったLLMの挙動を分析する。
- 文脈を維持しタスク実行を導くための 3 つの自己対話モジュールを備えた PentestGPT を提案する。
- Kali Linux 環境で、テキストベースの LLM 出力と UI/コマンドベースのアクションを結ぶ対話ループを適用する。

実験結果
リサーチクエスチョン
- RQ1RQ1: 提案されたベンチマークに対して LLM はペンテストタスクをどの程度実行できるか?
- RQ2RQ2: ペンテストにおける人間のテスターとLLMの問題解決戦略はどのように異なるか?
- RQ3RQ3: 自動ペンテストにおける LLM の有効性を制限する要因は何か(例:文脈の保持、記憶、コマンド精度など)?
主な発見
- LLMs はエンドツーエンドのペンテストタスクを完遂でき、評価対象モデルの中で GPT-4 が最高の性能を達成した。
- GPT-4 は easy ターゲット4件と mediumターゲット1件をエンドツーエンドで完了;同じ条件下で Bard と GPT-3.5 はより少ないターゲットを完了した。
- サブタスクでは、GPT-4 は easy ターゲットの 77 件中 52 件、medium ターゲットの 71 件中 27 件を達成し、ツール使用やコード関連タスクにおける高い能力を示した。
- LLMs は長期的文脈の維持に苦労し、以前の発見を失いやすく、最近のタスクに焦点を合わせる傾向(深さ優先バイアス)を示す。
- 一般的な失敗原因にはセッション文脈の喪失、誤ったコマンド生成、デッドロック動作などが含まれ、結果の不成功に寄与する。
- PentestGPT の三部構成アーキテクチャ(Reasoning、Generation、Parsing)と Pentesting Task Tree(PTT)は文脈喪失を緩和し、一貫した行動計画を導くのに役立つ。

この論文を読む
Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。
Nubintでこの論文を読むこのレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。