AI is rapidly changing how we approach cybersecurity.
Tools like PentestGPT bring AI into penetration testing workflows β but setting them up on Kali Linux is far from straightforward.
So I built a solution.
π‘ The Problem
Installing PentestGPT on Kali Linux can be frustrating due to:
- β Docker installation issues
- β Broken APT repositories (
<!doctype html>errors) - β Docker permission problems
- β Environment inconsistencies
- β Complex setup steps (Makefile, configs, containers)
For something that should take minutes⦠it often takes hours.
βοΈ The Solution β PentestGPT Kali Installer
I created a fully automated installer that sets up PentestGPT in a clean, reproducible way using Docker.
π What it does
This installer handles everything:
- β Fixes broken Kali APT repositories
- β Installs Docker & Docker Compose
- β Configures user permissions (
dockergroup) - β Clones PentestGPT repository
- β Prepares environment configuration
- β Ensures compatibility with Kali Linux
- β Provides a clean deployment workflow
β‘ One-Line Installation
curl -fsSL https://raw.githubusercontent.com/shahbaaz-devsec/pentestgpt-kali-installer/main/scripts/pentestgpt_kali_installer.sh | bash
`
π¦ Manual Installation
bash
git clone https://github.com/shahbaaz-devsec/pentestgpt-kali-installer.git
cd pentestgpt-kali-installer
chmod +x scripts/pentestgpt_kali_installer.sh
./scripts/pentestgpt_kali_installer.sh
βΆοΈ After Installation (Important)
bash
newgrp docker
cd ~/PentestGPT
make config
make connect
Inside the container:
bash
claude login
pentestgpt -t test.local
π§ What is PentestGPT?
PentestGPT is an AI-powered penetration testing assistant that helps with:
- Reconnaissance
- Vulnerability analysis
- Attack planning
- Command generation
- Report assistance
It acts like a thinking layer on top of traditional tools.
π₯ Example Workflow
bash
pentestgpt -t example.com
You can then:
- Analyze targets
- Generate attack paths
- Get command suggestions
- Iterate faster during engagements
π Real Issues This Fixes
This project was built from real problems:
- Kali repo corruption breaking installs
- Docker not starting or misconfigured
- Permission issues (
permission denied /var/run/docker.sock) - Missing dependencies
- Broken or inconsistent environments
π The installer fixes these automatically.
π Project Structure
`text
scripts/
βββ pentestgpt_kali_installer.sh
docs/
βββ 01-installation.md
βββ 02-usage.md
βββ 03-architecture.md
βββ 04-troubleshooting.md
βββ 05-clean-reset.md
`
π§ What I Learned
This project wasnβt just about automation.
It involved:
- Building reproducible security environments
- Handling real-world Linux failures
- Working with Docker-based deployments
- Improving developer experience in security tooling
- Thinking like a DevSecOps engineer
β οΈ Important Notes
- Must be run as a normal user (not root)
- Requires Docker support
- Needs internet access
- Minimum 2 CPU cores recommended
π Disclaimer
Use only on systems you own or have explicit permission to test.
π¦ Repository
π https://github.com/shahbaaz-devsec/pentestgpt-kali-installer
π Whatβs Next
I'm building a series of AI + cybersecurity tools including:
- ShellGPT automation (CLI AI workflows)
- PentestGPT deployment systems
- DevSecOps-focused tooling
π§ Final Thought
AI won't replace penetration testers.
But those who use AI effectively will outperform those who donβt.
Top comments (0)