<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mohammad Shahbaaz Ahmed</title>
    <description>The latest articles on DEV Community by Mohammad Shahbaaz Ahmed (@shahbaaz-devsec).</description>
    <link>https://dev.to/shahbaaz-devsec</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3891205%2F82e9b2c0-efdd-45c5-9dc4-915fc108a57f.png</url>
      <title>DEV Community: Mohammad Shahbaaz Ahmed</title>
      <link>https://dev.to/shahbaaz-devsec</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shahbaaz-devsec"/>
    <language>en</language>
    <item>
      <title>🚀 PentestGPT on Kali Linux — Fully Automated AI-Powered Pentesting Setup</title>
      <dc:creator>Mohammad Shahbaaz Ahmed</dc:creator>
      <pubDate>Tue, 28 Apr 2026 16:47:06 +0000</pubDate>
      <link>https://dev.to/shahbaaz-devsec/pentestgpt-on-kali-linux-fully-automated-ai-powered-pentesting-setup-4pkj</link>
      <guid>https://dev.to/shahbaaz-devsec/pentestgpt-on-kali-linux-fully-automated-ai-powered-pentesting-setup-4pkj</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxuib7225lk76w5leeyi0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxuib7225lk76w5leeyi0.png" alt=" " width="800" height="763"&gt;&lt;/a&gt;AI is rapidly changing how we approach cybersecurity.&lt;/p&gt;

&lt;p&gt;Tools like &lt;strong&gt;PentestGPT&lt;/strong&gt; bring AI into penetration testing workflows — but setting them up on Kali Linux is far from straightforward.&lt;/p&gt;

&lt;p&gt;So I built a solution.&lt;/p&gt;




&lt;h2&gt;
  
  
  💡 The Problem
&lt;/h2&gt;

&lt;p&gt;Installing PentestGPT on Kali Linux can be frustrating due to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;❌ Docker installation issues&lt;/li&gt;
&lt;li&gt;❌ Broken APT repositories (&lt;code&gt;&amp;lt;!doctype html&amp;gt;&lt;/code&gt; errors)&lt;/li&gt;
&lt;li&gt;❌ Docker permission problems&lt;/li&gt;
&lt;li&gt;❌ Environment inconsistencies&lt;/li&gt;
&lt;li&gt;❌ Complex setup steps (Makefile, configs, containers)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For something that should take minutes… it often takes hours.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚙️ The Solution — PentestGPT Kali Installer
&lt;/h2&gt;

&lt;p&gt;I created a &lt;strong&gt;fully automated installer&lt;/strong&gt; that sets up PentestGPT in a clean, reproducible way using Docker.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 What it does
&lt;/h2&gt;

&lt;p&gt;This installer handles everything:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✔ Fixes broken Kali APT repositories&lt;/li&gt;
&lt;li&gt;✔ Installs Docker &amp;amp; Docker Compose&lt;/li&gt;
&lt;li&gt;✔ Configures user permissions (&lt;code&gt;docker&lt;/code&gt; group)&lt;/li&gt;
&lt;li&gt;✔ Clones PentestGPT repository&lt;/li&gt;
&lt;li&gt;✔ Prepares environment configuration&lt;/li&gt;
&lt;li&gt;✔ Ensures compatibility with Kali Linux&lt;/li&gt;
&lt;li&gt;✔ Provides a clean deployment workflow&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ⚡ One-Line Installation
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/shahbaaz-devsec/pentestgpt-kali-installer/main/scripts/pentestgpt_kali_installer.sh | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
`&lt;/p&gt;




&lt;h2&gt;
  
  
  📦 Manual Installation
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;bash&lt;br&gt;
git clone https://github.com/shahbaaz-devsec/pentestgpt-kali-installer.git&lt;br&gt;
cd pentestgpt-kali-installer&lt;br&gt;
chmod +x scripts/pentestgpt_kali_installer.sh&lt;br&gt;
./scripts/pentestgpt_kali_installer.sh&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  ▶️ After Installation (Important)
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;bash&lt;br&gt;
newgrp docker&lt;br&gt;
cd ~/PentestGPT&lt;br&gt;
make config&lt;br&gt;
make connect&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Inside the container:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;bash&lt;br&gt;
claude login&lt;br&gt;
pentestgpt -t test.local&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 What is PentestGPT?
&lt;/h2&gt;

&lt;p&gt;PentestGPT is an AI-powered penetration testing assistant that helps with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reconnaissance&lt;/li&gt;
&lt;li&gt;Vulnerability analysis&lt;/li&gt;
&lt;li&gt;Attack planning&lt;/li&gt;
&lt;li&gt;Command generation&lt;/li&gt;
&lt;li&gt;Report assistance&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It acts like a &lt;strong&gt;thinking layer on top of traditional tools&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔥 Example Workflow
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;bash&lt;br&gt;
pentestgpt -t example.com&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You can then:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Analyze targets&lt;/li&gt;
&lt;li&gt;Generate attack paths&lt;/li&gt;
&lt;li&gt;Get command suggestions&lt;/li&gt;
&lt;li&gt;Iterate faster during engagements&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🛠 Real Issues This Fixes
&lt;/h2&gt;

&lt;p&gt;This project was built from real problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Kali repo corruption breaking installs&lt;/li&gt;
&lt;li&gt;Docker not starting or misconfigured&lt;/li&gt;
&lt;li&gt;Permission issues (&lt;code&gt;permission denied /var/run/docker.sock&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Missing dependencies&lt;/li&gt;
&lt;li&gt;Broken or inconsistent environments&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 The installer fixes these automatically.&lt;/p&gt;




&lt;h2&gt;
  
  
  📁 Project Structure
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`text&lt;br&gt;
scripts/&lt;br&gt;
  └── pentestgpt_kali_installer.sh&lt;/p&gt;

&lt;p&gt;docs/&lt;br&gt;
  ├── 01-installation.md&lt;br&gt;
  ├── 02-usage.md&lt;br&gt;
  ├── 03-architecture.md&lt;br&gt;
  ├── 04-troubleshooting.md&lt;br&gt;
  └── 05-clean-reset.md&lt;br&gt;
`&lt;code&gt;&lt;/code&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 What I Learned
&lt;/h2&gt;

&lt;p&gt;This project wasn’t just about automation.&lt;/p&gt;

&lt;p&gt;It involved:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Building &lt;strong&gt;reproducible security environments&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Handling &lt;strong&gt;real-world Linux failures&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Working with &lt;strong&gt;Docker-based deployments&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Improving &lt;strong&gt;developer experience in security tooling&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Thinking like a &lt;strong&gt;DevSecOps engineer&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ⚠️ Important Notes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Must be run as a normal user (not root)&lt;/li&gt;
&lt;li&gt;Requires Docker support&lt;/li&gt;
&lt;li&gt;Needs internet access&lt;/li&gt;
&lt;li&gt;Minimum 2 CPU cores recommended&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🔐 Disclaimer
&lt;/h2&gt;

&lt;p&gt;Use only on systems you own or have explicit permission to test.&lt;/p&gt;




&lt;h2&gt;
  
  
  📦 Repository
&lt;/h2&gt;

&lt;p&gt;👉 &lt;a href="https://github.com/shahbaaz-devsec/pentestgpt-kali-installer" rel="noopener noreferrer"&gt;https://github.com/shahbaaz-devsec/pentestgpt-kali-installer&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 What’s Next
&lt;/h2&gt;

&lt;p&gt;I'm building a series of AI + cybersecurity tools including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ShellGPT automation (CLI AI workflows)&lt;/li&gt;
&lt;li&gt;PentestGPT deployment systems&lt;/li&gt;
&lt;li&gt;DevSecOps-focused tooling&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧠 Final Thought
&lt;/h2&gt;

&lt;p&gt;AI won't replace penetration testers.&lt;/p&gt;

&lt;p&gt;But those who &lt;strong&gt;use AI effectively&lt;/strong&gt; will outperform those who don’t.&lt;/p&gt;




&lt;h2&gt;
  
  
  🏷 Tags
&lt;/h2&gt;

&lt;h1&gt;
  
  
  cybersecurity #pentesting #kaliLinux #devsecops #docker #ai #infosec #redteam
&lt;/h1&gt;

</description>
      <category>ai</category>
      <category>automation</category>
      <category>cybersecurity</category>
      <category>linux</category>
    </item>
    <item>
      <title>🚀ShellGPT on Kali Linux — Fully Automated Installer (No Headaches)</title>
      <dc:creator>Mohammad Shahbaaz Ahmed</dc:creator>
      <pubDate>Tue, 28 Apr 2026 16:36:07 +0000</pubDate>
      <link>https://dev.to/shahbaaz-devsec/shellgpt-on-kali-linux-fully-automated-installer-no-headaches-21m6</link>
      <guid>https://dev.to/shahbaaz-devsec/shellgpt-on-kali-linux-fully-automated-installer-no-headaches-21m6</guid>
      <description>&lt;p&gt;Running ChatGPT directly in your terminal sounds amazing… until you try to set it up on Kali Linux.&lt;/p&gt;

&lt;p&gt;I recently built a &lt;strong&gt;ShellGPT Kali Installer&lt;/strong&gt; to solve exactly that problem — turning a messy setup process into a clean, reproducible workflow.&lt;/p&gt;




&lt;h2&gt;
  
  
  💡 The Problem
&lt;/h2&gt;

&lt;p&gt;If you've tried installing ShellGPT (&lt;code&gt;shell-gpt&lt;/code&gt;) on Kali Linux, you’ve probably hit issues like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;❌ Broken APT repositories (&lt;code&gt;&amp;lt;!doctype html&amp;gt;&lt;/code&gt; errors)&lt;/li&gt;
&lt;li&gt;❌ Python / pip / venv conflicts&lt;/li&gt;
&lt;li&gt;❌ &lt;code&gt;sgpt: command not found&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;❌ PATH misconfiguration&lt;/li&gt;
&lt;li&gt;❌ API key confusion (OpenAI vs OpenRouter)&lt;/li&gt;
&lt;li&gt;❌ Inconsistent environments across machines&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of fixing these one by one every time…&lt;/p&gt;

&lt;p&gt;👉 I decided to automate everything.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚙️ The Solution — ShellGPT Kali Installer
&lt;/h2&gt;

&lt;p&gt;This project provides a &lt;strong&gt;fully automated installer&lt;/strong&gt; that sets up ShellGPT correctly on Kali Linux.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 What it does
&lt;/h2&gt;

&lt;p&gt;The installer handles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✔ APT repository cleanup and repair
&lt;/li&gt;
&lt;li&gt;✔ Dependency installation (Python, pip, venv, git, curl)
&lt;/li&gt;
&lt;li&gt;✔ Virtual environment setup
&lt;/li&gt;
&lt;li&gt;✔ ShellGPT installation
&lt;/li&gt;
&lt;li&gt;✔ Global &lt;code&gt;sgpt&lt;/code&gt; CLI command
&lt;/li&gt;
&lt;li&gt;✔ PATH configuration (bash + zsh)
&lt;/li&gt;
&lt;li&gt;✔ API configuration guidance
&lt;/li&gt;
&lt;li&gt;✔ Clean and reproducible setup
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ⚡ One-Line Installation
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/shahbaaz-devsec/shellgpt-kali-installer/main/scripts/shellgpt_kali_installer.sh | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
`&lt;/p&gt;




&lt;h2&gt;
  
  
  📦 Manual Installation
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;bash&lt;br&gt;
git clone https://github.com/shahbaaz-devsec/shellgpt-kali-installer.git&lt;br&gt;
cd shellgpt-kali-installer&lt;br&gt;
chmod +x scripts/shellgpt_kali_installer.sh&lt;br&gt;
./scripts/shellgpt_kali_installer.sh&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  ▶️ After Installation
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;bash&lt;br&gt;
export PATH="$HOME/.local/bin:$PATH"&lt;br&gt;
sgpt --help&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Test it:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;bash&lt;br&gt;
sgpt "what is privilege escalation"&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🔑 API Setup (Important)
&lt;/h2&gt;

&lt;p&gt;ShellGPT requires an API key.&lt;/p&gt;

&lt;h3&gt;
  
  
  OpenAI
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;bash&lt;br&gt;
export OPENAI_API_KEY="your_openai_api_key"&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  OpenRouter (recommended alternative)
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;bash&lt;br&gt;
export OPENAI_API_KEY="your_openrouter_api_key"&lt;br&gt;
export OPENAI_API_BASE="https://openrouter.ai/api/v1"&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 Example Usage
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`bash&lt;/p&gt;

&lt;h1&gt;
  
  
  General questions
&lt;/h1&gt;

&lt;p&gt;sgpt "explain DNS"&lt;/p&gt;

&lt;h1&gt;
  
  
  Generate shell commands
&lt;/h1&gt;

&lt;p&gt;sgpt --shell "list open ports"&lt;/p&gt;

&lt;h1&gt;
  
  
  Generate code
&lt;/h1&gt;

&lt;p&gt;sgpt --code "python port scanner"&lt;/p&gt;

&lt;h1&gt;
  
  
  Explain commands
&lt;/h1&gt;

&lt;p&gt;sgpt --describe-shell "nmap -sV 127.0.0.1"&lt;br&gt;
`&lt;code&gt;&lt;/code&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🛠 Real Issues This Fixes
&lt;/h2&gt;

&lt;p&gt;This project was built after encountering real-world problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Kali repo corruption&lt;/li&gt;
&lt;li&gt;Broken Python environments&lt;/li&gt;
&lt;li&gt;Missing PATH exports&lt;/li&gt;
&lt;li&gt;API quota confusion&lt;/li&gt;
&lt;li&gt;Installation inconsistencies&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of patching each issue manually, the installer &lt;strong&gt;solves them at the root level&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  📁 Project Structure
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`text&lt;br&gt;
scripts/&lt;br&gt;
  └── shellgpt_kali_installer.sh&lt;/p&gt;

&lt;p&gt;docs/&lt;br&gt;
  ├── 01-installation.md&lt;br&gt;
  ├── 02-usage.md&lt;br&gt;
  ├── 03-openrouter-setup.md&lt;br&gt;
  ├── 04-troubleshooting.md&lt;br&gt;
  └── 05-clean-reset.md&lt;br&gt;
`&lt;code&gt;&lt;/code&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🎯 What I Learned
&lt;/h2&gt;

&lt;p&gt;Building this wasn’t just about installing a tool.&lt;/p&gt;

&lt;p&gt;It was about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Designing &lt;strong&gt;reproducible environments&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Handling &lt;strong&gt;real-world Linux edge cases&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Improving &lt;strong&gt;developer experience (DX)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Writing &lt;strong&gt;documentation that actually helps&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Thinking like a &lt;strong&gt;DevSecOps engineer&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🔐 Disclaimer
&lt;/h2&gt;

&lt;p&gt;ShellGPT can generate shell commands.&lt;/p&gt;

&lt;p&gt;👉 Always review commands before running them.&lt;br&gt;
👉 Use only in authorized environments.&lt;/p&gt;




&lt;h2&gt;
  
  
  📦 Repository
&lt;/h2&gt;

&lt;p&gt;👉 &lt;a href="https://github.com/shahbaaz-devsec/shellgpt-kali-installer" rel="noopener noreferrer"&gt;https://github.com/shahbaaz-devsec/shellgpt-kali-installer&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 What’s Next
&lt;/h2&gt;

&lt;p&gt;I’m currently building:&lt;/p&gt;

&lt;p&gt;👉 PentestGPT Kali Installer (AI-powered pentesting automation)&lt;/p&gt;




&lt;h2&gt;
  
  
  🏷 Tags
&lt;/h2&gt;

&lt;h1&gt;
  
  
  kaliLinux #devsecops #cybersecurity #linux #ai #automation #python #cli #infosec
&lt;/h1&gt;

</description>
      <category>ai</category>
      <category>automation</category>
      <category>cli</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
