PentestGPT  by GreyDGL

GPT-empowered penetration testing CLI tool

Created 2 years ago
8,771 stars

Top 5.8% 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

1 month ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
3
Star History
141 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Meng Zhang Meng Zhang(Cofounder of TabbyML), and
3 more.

qodo-cover by qodo-ai

0.2%
5k
CLI tool for AI-powered test generation and code coverage enhancement
Created 1 year ago
Updated 2 months ago
Feedback? Help us improve.