PentestGPT  by GreyDGL

GPT-empowered penetration testing CLI tool

created 2 years ago
8,568 stars

Top 6.1% on sourcepulse

GitHubView on GitHub
Project Summary

PentestGPT is an AI-powered penetration testing tool designed to automate and guide security assessments. It leverages large language models, specifically GPT-4, to assist penetration testers by providing interactive guidance, suggesting next steps, and analyzing findings, making it suitable for tackling CTF challenges and HackTheBox machines.

How It Works

PentestGPT integrates with the ChatGPT API to provide an interactive, conversational interface for penetration testing. It maintains "test status awareness" to prevent context loss during deeper assessments, a common issue with direct LLM usage. The tool guides users through the penetration testing lifecycle, allowing input of tool outputs, web content, or general comments to inform the AI's next actions.

Quick Start & Requirements

  • Install via pip: pip3 install git+https://github.com/GreyDGL/PentestGPT
  • Requires an OpenAI API key with a linked payment method.
  • Set API key: export OPENAI_API_KEY='<your key here>'
  • Optional: Set API base: export OPENAI_BASEURL='https://api.xxxx.xxx/v1'
  • Test connection: pentestgpt-connection
  • Recommended for Kali users: run within tmux.
  • Python 3.10 tested; other Python 3 versions may work.
  • Official documentation and demo videos are available.

Highlighted Details

  • Empowers penetration testing with LLMs, specifically recommending GPT-4 for superior reasoning.
  • Supports local LLMs with custom endpoint integration.
  • Research paper published at USENIX Security 2024.
  • Interactive command-line interface similar to msfconsole with features like help, next, more, discuss, and google.

Maintenance & Community

  • Actively under refactoring for v1.0 release.
  • Discord channel available for updates and discussions.
  • Key contributors listed with contact information.

Licensing & Compatibility

  • MIT License.
  • Tool is for educational purposes; author disclaims responsibility for illegal use.
  • Compatible with commercial use, but OpenAI API usage incurs costs.

Limitations & Caveats

The tool's prompts are optimized for GPT-4; performance with other models, including local ones, may vary. The "google" search functionality is still under development.

Health Check
Last commit

5 days ago

Responsiveness

1 day

Pull Requests (30d)
4
Issues (30d)
7
Star History
405 stars in the last 90 days

Explore Similar Projects

Starred by Peter Norvig Peter Norvig(Author of Artificial Intelligence: A Modern Approach; Research Director at Google), Michael Han Michael Han(Cofounder of Unsloth), and
15 more.

open-interpreter by openinterpreter

0.1%
60k
Natural language interface for computers
created 2 years ago
updated 4 days ago
Feedback? Help us improve.