Skip to main content
QUICK REVIEW

[논문 리뷰] PentestGPT: An LLM-empowered Automatic Penetration Testing Tool

Gelei Deng, Yi Liu|arXiv (Cornell University)|2023. 08. 13.
Software Engineering ResearchComputer Science인용 수 30
한 줄 요약

논문은 새로운 벤치마크를 사용해 실제 세계의 펜테스트(task) 작업에서 LLM을 평가하고, 트리파트 아키텍처를 갖춘 LLM 구동 자동 펜테스트 시스템 PentestGPT를 도입합니다. 이를 통해 작업 완수를 개선하고 컨텍스트 손실을 줄입니다.

ABSTRACT

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.

연구 동기 및 목표

  • LLM을 통해 자동 침투 테스트를 촉진하고 도메인 전문 지식에 대한 의존도를 줄인다.
  • 다양한 대상에 걸친 펜테스트 기능을 평가하기 위한 견고하고 실제 세계 벤치마크를 만든다.
  • LLM이 개별 테스트 상태와 작업을 안내하도록 통합 시스템(PentestGPT)을 개발한다.

제안 방법

  • OWASP Top 10 취약점에 맞춰 HackTheBox와 VulnHub에서 총 182개의 하위 작업으로 13개 대상 구축.
  • 벤치마크에 대해 GPT-3.5, GPT-4, Bard를 엔드투엔드 및 하위 작업 성능으로 평가한다.
  • 컨텍스트 손실과 특정 작업 패턴 경향과 같은 한계를 식별하기 위해 LLM의 동작을 분석한다.
  • 컨텍스트를 유지하고 작업 실행을 안내하기 위해 세 가지 자기 상호작용 모듈이 있는 PentestGPT를 제안한다.
  • 텍스트 LLM 출력과 UI/명령 기반 작업 간의 상호 작용 루프를 Kali Linux 환경에서 구현한다.
Figure 2 : Overview of strategy to use LLMs for penetration testing.
Figure 2 : Overview of strategy to use LLMs for penetration testing.

실험 결과

연구 질문

  • RQ1RQ1: 제안된 벤치마크에서 LLM이 펜테스트 작업을 수행할 수 있는 정도는 어느 정도인가?
  • RQ2RQ2: 침투 테스트에서 인간 테스트의 문제 해결 전략은 LLM의 전략과 어떻게 다른가?
  • RQ3RQ3: 컨텍스트 유지, 메모리, 명령 정확도 등의 요인들이 자동 펜테스팅에서 LLM의 효과에 어떤 제한을 주는가?

주요 결과

  • LLMs can complete end-to-end pentesting tasks, with GPT-4 achieving the best performance among the evaluated models.
  • GPT-4 completed 4 easy and 1 medium targets end-to-end; Bard and GPT-3.5 completed fewer targets under the same conditions.
  • On sub-tasks, GPT-4 achieved 52 of 77 on easy targets and 27 of 71 on medium targets, indicating strong capability in tool use and code-related tasks.
  • LLMs struggle with maintaining long-term context, often losing prior findings and tending to focus on recent tasks (depth-first bias).
  • Common failure causes include session context loss, false command generation, and deadlock operations, contributing to unsuccessful outcomes.
  • PentestGPT’s tripartite architecture (Reasoning, Generation, Parsing) and the Pentesting Task Tree (PTT) help mitigate context loss and guide coherent action planning.
Figure 3 : Overview of PentestGPT .
Figure 3 : Overview of PentestGPT .

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.