Skip to content

Repository files navigation

HackBot Logo

HackBot — AI Cybersecurity Assistant

Production-ready AI-powered pentesting & cybersecurity assistant with Agent, Chat & Planning modes, native desktop GUI, 10 AI providers, and built-in intelligence modules.

WebsitePython 3.9+License: MITPlatformTestsOpen In ColabDiscord

FeaturesScreenshotsGUIInstallQuick StartModesIntelligenceProvidersConfigDockerColabDiscord

WebsitePlugin Marketplace


👨‍💻 About the Author

DeveloperYashab Alam
🐙 GitHubgithub.com/yashab-cyber
💼 LinkedInlinkedin.com/in/yashab-alam
📧 Emailyashabalam707@gmail.com · yashabalam9@gmail.com
❤️ DonateSupport HackBot → DONATE.md

HackBot is free & open-source. If it has helped you, please consider supporting its development or reaching out for collaboration!


⚡ Features

FeatureDescription
🤖 Agent ModeAutonomous penetration testing — runs real security tools, analyzes results, adapts strategy
💬 Chat ModeInteractive cybersecurity Q&A with streaming responses and conversation memory
📋 Planning ModeGenerates structured pentest plans, checklists, and attack methodologies
🖥️ Native Desktop GUIFull-featured graphical interface with dark theme, powered by pywebview
🛡️ CVE/Exploit LookupReal-time CVE search against NVD, exploit PoC discovery via GitHub
🌐 OSINT ModuleSubdomain enumeration, DNS recon, WHOIS, email harvesting, tech stack fingerprinting
🗺️ Network Topology VisualizerInteractive D3.js force-directed graph from nmap/masscan scan output
📋 Compliance MappingAuto-map findings to PCI DSS v4.0, NIST 800-53, OWASP Top 10, ISO 27001 controls
🎯 MITRE ATT&CK MappingMap findings and tool usage to ATT&CK techniques/tactics, export Navigator layer JSON
🗄️ Vulnerability DatabasePersistent SQLite finding tracker with deduplication, risk scoring, and remediation status
🔀 Diff ReportsCompare two assessments — see new, fixed, and persistent vulnerabilities at a glance
🎯 Multi-Target CampaignsDefine a scope with multiple hosts/URLs and run coordinated assessments across all of them
🧩 Custom PluginsPython plugin system — register your own scripts as agent-callable tools
🔧 AI Remediation EngineAuto-generate fix commands, config patches, and code snippets for each finding
🔌 HTTP Proxy / Traffic CaptureBuilt-in intercepting proxy for capturing, inspecting, replaying, and flagging web traffic
🔬 Zero-Day Discovery EngineProactive vulnerability research with response anomaly detection, smart fuzzing, exploit chain analysis, version gap analysis
🧠 Memory & SessionsAuto-save conversations, session history, /continue truncated responses, conversation summarization
🌍 10 AI ProvidersOpenAI, Anthropic, Google Gemini, Groq, Mistral, DeepSeek, Together AI, OpenRouter, Ollama, Local
🔧 50+ Tool Integrationsnmap, nikto, sqlmap, nuclei, ffuf, subfinder, hydra, gobuster, wpscan, dalfox, commix, and more
📊 Auto ReportingHTML, Markdown, JSON, and professional PDF reports with executive summary, risk matrix, charts
🛡️ Safe ModeCommand validation, blocked dangerous commands, risky-command confirmation prompts
💻 Cross-PlatformLinux, macOS, Windows — pip install, Docker, or one-line installer
🎨 Rich Terminal UIBeautiful output with syntax highlighting, markdown rendering, progress indicators

📸 Screenshots

CLI View

HackBot CLI

GUI View

HackBot GUI

Settings

HackBot Settings

�🖥️ Native Desktop GUI

HackBot includes a full native desktop GUI — no browser needed. Launch it with a single command:

hackbot gui

If GUI falls back to browser mode with errors like No module named qtpy or No module named gi, install one native backend:

# Option A (venv-friendly Qt backend)
pip install PyQt5 qtpy
# Option B (GTK backend on Debian/Kali/Ubuntu)
sudo apt install -y python3-gi python3-gi-cairo gir1.2-gtk-3.0 gir1.2-webkit2-4.1

GUI Features

  • Dark cybersecurity theme with a polished, modern interface
  • Real-time streaming — AI responses stream in via Server-Sent Events (SSE)
  • All modes accessible — Chat, Agent, Plan, CVE Lookup, OSINT, Topology, Compliance panels
  • Collapsible sidebar — Minimize navigation to an icon rail with the preference remembered locally
  • Session management — Browse, restore, and delete saved sessions from the sidebar
  • Provider switching — Change AI provider and model on the fly from the settings panel
  • Agent control panel — Start assessments that auto-run steps, stop them on demand, and view findings live
  • CVE search panel — Search by keyword, CVE ID, or browse exploits with severity filters
  • OSINT panel — Run subdomain enumeration, DNS lookups, WHOIS, and tech fingerprinting
  • Topology visualization — Paste nmap/masscan output and see an interactive D3.js network graph
  • Compliance panel — Map agent findings to PCI DSS, NIST 800-53, OWASP Top 10, ISO 27001 with summary cards and per-framework tables
  • ATT&CK panel — Map findings to MITRE ATT&CK techniques, view per-tactic breakdown, export Navigator layer JSON
  • Vulnerability database panel — Browse, search, and manage persistent findings with risk scores and remediation status tracking
  • Diff report panel — Compare two assessments side-by-side to see new, fixed, and persistent vulnerabilities with trend analysis
  • Campaign dashboard — Create, manage, and monitor multi-target campaigns with progress tracking, target status, and coordinated findings
  • Plugin manager — Browse, reload, and execute custom plugins with argument inputs and live output
  • Remediation panel — One-click fix generation for findings with copyable commands, config patches, and code snippets
  • Proxy panel — Start/stop the intercepting proxy, view traffic table, filter by method/keyword, set domain scope, replay requests, and view flagged security-relevant traffic
  • Zero-day discovery — Auto-detects anomaly signals in every tool output, supports smart fuzzing (150+ payloads, 12 categories), and builds exploit chains from findings
  • PDF export — One-click professional PDF report generation with charts and executive summary from the agent panel
  • Markdown rendering — Full markdown support with syntax highlighting in responses
  • Native OS window — Powered by pywebview for a true desktop application feel

GUI Architecture

ComponentTechnology
BackendFlask 3.0+ with SSE streaming
FrontendSingle-page HTML/CSS/JS with dark theme
Desktop Windowpywebview 5.0+ (native OS webview)
VisualizationD3.js v7 force-directed graphs
Markdownmarked.js renderer

GUI Layout

┌─────────────────────────────────────────────────────────────┐
│ 🤖 HackBot ⚙️ Settings │
│ ┌──────────┐ ┌────────────────────────────────────────────┐ │
│ │ 💬 Chat │ │ │ │
│ │ 🤖 Agent │ │ Chat / Agent / Plan / CVE / OSINT / │ │
│ │ 📋 Plan │ │ Topology panels with real-time output │ │
│ │ 🛡️ CVE │ │ │ │
│ │ 🌐 OSINT │ │ Streaming AI responses with markdown │ │
│ │ 🗺️ Topo │ │ rendering and syntax highlighting │ │
│ │ │ │ │ │
│ │ Sessions │ ├────────────────────────────────────────────┤ │
│ │ • sess-1 │ │ [ Type your message... ] [Send] │ │
│ │ • sess-2 │ │ │ │
│ └──────────┘ └────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘

📦 Installation

Which install method should I use?

  • Use One-Line Install if you want a quick setup on Linux/macOS and may also want bundled security tooling.
  • Use pip if you work inside a project or virtual environment and want full control of dependencies.
  • Use pipx if you want HackBot installed globally but isolated from your system Python packages.
  • Use From Source if you are developing HackBot itself.

Create a Python Virtual Environment (recommended for pip installs)

# Linux/macOS
python3 -m venv .venv
source .venv/bin/activate
# Upgrade packaging tools inside the venv
python -m pip install --upgrade pip setuptools wheel
# Windows (PowerShell)
py -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip setuptools wheel

One-Line Install (Linux/macOS)

curl -sSL https://raw.githubusercontent.com/yashab-cyber/hackbot/main/install.sh | bash

Full install with security tools:

curl -sSL https://raw.githubusercontent.com/yashab-cyber/hackbot/main/install.sh | bash -s full

pip (All Platforms)

# Full install (GUI + PDF reports + all features)
pip install "hackbot[all] @ git+https://github.com/yashab-cyber/hackbot.git"# Minimal install (CLI only, no GUI)
pip install git+https://github.com/yashab-cyber/hackbot.git

pipx (Isolated Install)

# Full install (GUI + PDF reports + all features)
pipx install "hackbot[all] @ git+https://github.com/yashab-cyber/hackbot.git"# Minimal install (CLI only, no GUI)
pipx install git+https://github.com/yashab-cyber/hackbot.git

From Source (Development)

git clone https://github.com/yashab-cyber/hackbot.git
cd hackbot
pip install -e ".[all,dev]"

Windows

# Option 1: pip (full install with GUI + all features)
pip install "hackbot[all] @ git+https://github.com/yashab-cyber/hackbot.git"# Option 2: Download and run installer
git clone https://github.com/yashab-cyber/hackbot.git
cd hackbot
install.bat

Docker

docker build -t hackbot .
docker run -it -e HACKBOT_API_KEY=your-key hackbot

🗑️ Uninstall

pip

pip uninstall hackbot

pipx

pipx uninstall hackbot

From Source (Development)

pip uninstall hackbot

Windows

pip uninstall hackbot

Docker

# Remove the container(s)
docker rm $(docker ps -aq --filter ancestor=hackbot)# Remove the image
docker rmi hackbot

Remove Configuration & Data

After uninstalling, you can also remove saved sessions, config, and plugins:

# Linux/macOS
rm -rf ~/.config/hackbot
# Windows (PowerShell)
Remove-Item -Recurse -Force "$env:APPDATA\hackbot"

🔁 Reinstall

Always uninstall first using the matching method above, then reinstall.

One-Line Install (Linux/macOS)

# If you previously used pip/pipx, uninstall first via the Uninstall section.# Then reinstall via the installer script.
curl -sSL https://raw.githubusercontent.com/yashab-cyber/hackbot/main/install.sh | bash

pip

# Step 1: uninstall
pip uninstall -y hackbot
# Step 2: reinstall
pip install "hackbot[all] @ git+https://github.com/yashab-cyber/hackbot.git"

pipx

# Step 1: uninstall
pipx uninstall hackbot
# Step 2: reinstall
pipx install "hackbot[all] @ git+https://github.com/yashab-cyber/hackbot.git"

From Source (Development)

cd hackbot
pip uninstall -y hackbot
pip install -e ".[all,dev]"

Windows

# Option 1: pip
pip uninstall -y hackbot
pip install "hackbot[all] @ git+https://github.com/yashab-cyber/hackbot.git"# Option 2: From local source
cd hackbot
install.bat

Docker

docker rm $(docker ps -aq --filter ancestor=hackbot)
docker rmi hackbot
docker build --no-cache -t hackbot .

�🚀 Quick Start

1. Set Your API Key

# Option A: Environment variableexport HACKBOT_API_KEY=sk-your-openai-key
# Option B: Setup command
hackbot setup sk-your-openai-key
# Option C: Set inside the app
hackbot
/key sk-your-openai-key

2. Launch HackBot

# Terminal UI (default)
hackbot
# Native desktop GUI
hackbot gui
# Direct mode launch
hackbot agent scanme.nmap.org
hackbot plan example.com --type web_pentest

3. Start Hacking (Ethically!)

💬 hackbot> /agent scanme.nmap.org

🎯 Modes

🤖 Agent Mode — Autonomous Security Testing

The Agent Mode is the core feature. It autonomously:

  • Plans a structured assessment methodology
  • Executes real security tools (nmap, nikto, nuclei, etc.)
  • Analyzes output and determines next steps
  • Tracks findings with severity ratings (Critical/High/Medium/Low/Info)
  • Generates comprehensive reports
  • Recommends CVE lookups after service detection
  • Suggests OSINT recon before active scanning
  • Builds network topology from scan results
  • Maps findings to compliance frameworks automatically after assessment
  • Maps findings to MITRE ATT&CK techniques and tactics
  • Stores findings in a persistent vulnerability database with risk scoring
  • Zero-day hunting — auto-analyzes every tool output for anomaly signals (stack traces, error leaks, memory addresses, injection points)
  • Smart fuzzing — AI-driven fuzzing with 150+ payloads across 12 categories (SSTI, SSRF, XXE, deserialization, etc.)
  • Exploit chain analysis — combines multiple low/medium findings into high-impact attack paths
# Start directly
hackbot agent scanme.nmap.org
# Or switch inside the app
/agent 192.168.1.0/24

What it does:

🤖 HackBot Agent:
Starting assessment against scanme.nmap.org
Phase 1: Reconnaissance
▶ Executing: nmap
nmap -sV -sC -O scanme.nmap.org -oN scan_results.txt
◀ nmap SUCCESS (exit=0, 32.1s)
┌──────────────────────────────────────┐
│ PORT STATE SERVICE VERSION │
│ 22/tcp open ssh OpenSSH 6.6 │
│ 80/tcp open http Apache 2.4.7 │
│ 9929/tcp open nping-echo │
└──────────────────────────────────────┘
🔍 [Info] Open SSH Service Detected
OpenSSH 6.6 on port 22 — check for known vulnerabilities
💡 Tip: Use /cve OpenSSH 6.6 to look up known CVEs
Phase 2: Web Application Scanning...
▶ Executing: nikto
nikto -h http://scanme.nmap.org -output nikto_results.txt
...

Agent Commands:

CommandDescription
/agent <target>Start new assessment
/stepExecute next agent step
/run <cmd>Run a tool manually
/findingsShow all findings
/stopStop assessment
/exportGenerate report
/pdfGenerate professional PDF report
/diffCompare two assessments (diff report)
/attackMITRE ATT&CK technique mapping
/vulndbVulnerability database management
/campaignMulti-target campaign management
/remediateGenerate fix commands/patches for findings
/pluginsList/manage/reload custom tool plugins
/continueContinue truncated response

💬 Chat Mode — Cybersecurity Q&A

Interactive AI chat with deep cybersecurity knowledge, streaming responses, and conversation memory:

💬 hackbot> How do I test for SQL injection in a login form?
HackBot:
## SQL Injection Testing — Login Forms
### 1. Manual Testing
Try these payloads in the username/password fields:
' OR '1'='1' --
' OR '1'='1' /*
admin'--
' UNION SELECT NULL--
### 2. Automated Testing with sqlmap
sqlmap -u "http://target.com/login" --data="user=admin&pass=test" --dbs
### 3. Blind SQL Injection
sqlmap -u "http://target.com/login" --data="user=admin&pass=test" --level=5 --risk=3

Chat features:

  • Streaming responses — see output as it's generated
  • Auto-save — conversations are automatically saved to session history
  • /continue — resume truncated responses seamlessly
  • Conversation summarization — long chats are summarized to stay within context limits

📋 Planning Mode — Assessment Planning

Generate structured pentest plans with methodology, tools, and timelines:

hackbot plan example.com --type web_pentest

Available Templates:

TemplateDescription
web_pentestWeb Application Penetration Test
network_pentestNetwork Penetration Test
api_pentestAPI Security Assessment
cloud_auditCloud Security Audit
ad_pentestActive Directory Pentest
mobile_pentestMobile App Pentest
red_teamRed Team Engagement
bug_bountyBug Bounty Methodology

🛡️ Intelligence Modules

🔬 Zero-Day Discovery Engine

Proactive vulnerability research engine that goes beyond known CVE scanning to find undisclosed vulnerabilities.

Capabilities:

FeatureDescription
Response Anomaly Detection40+ regex patterns across 7 categories: stack traces, error leaks, path disclosures, debug info, memory addresses, auth leaks, injection signals
Smart Fuzz Payloads150+ payloads in 12 categories: buffer overflow, integer overflow, path traversal, SSTI, SSRF, deserialization, command injection, XSS, header injection, XXE, request smuggling, race conditions
Exploit Chain BuilderAnalyzes multiple findings to propose chained attack paths (e.g., SSRF→Internal Service→RCE, SQLi→File Write→WebShell)
Version Gap AnalysisIdentifies software where the exact version has no known CVE but nearby versions do — flags zero-day candidates
Auto-EnrichmentEvery tool execution output is automatically scanned for anomaly signals and zero-day indicators
Timing AnalysisDetects response time anomalies that suggest blind injection points

Agent Actions:

{"action": "fuzz", "target_url": "<url>", "parameter": "<param>", "categories": ["xss","ssti","ssrf"]}
{"action": "analyze_anomaly", "response_body": "<suspicious_output>", "context": "<description>"}
{"action": "chain_exploits", "explanation": "Analyze findings for exploit chains"}

CVE/Exploit Lookup

Real-time vulnerability intelligence powered by the NVD (National Vulnerability Database) and GitHub exploit search.

# Search by keyword
/cve apache 2.4
# Look up a specific CVE
/cve CVE-2021-44228
# Auto-map nmap output to CVEs
/cve --nmap
# Search for exploit PoCs
/cve --exploit log4shell

Capabilities:

FeatureDescription
NVD LookupSearch CVEs by ID with full details (CVSS score, severity, references, CWEs)
Keyword SearchFind CVEs by software name/version with severity filtering
Nmap→CVE MappingAutomatically map discovered services from nmap output to known CVEs
Exploit SearchFind proof-of-concept exploits on GitHub for any CVE or keyword
Severity FilteringFilter results by CRITICAL, HIGH, MEDIUM, LOW
Markdown ReportsGenerate formatted vulnerability reports

OSINT Module

Passive intelligence gathering for reconnaissance — no active scanning required.

# Full OSINT scan
/osint example.com
# Individual modules
/osint --subs example.com # Subdomain enumeration
/osint --dns example.com # DNS records
/osint --whois example.com # WHOIS / RDAP lookup
/osint --tech example.com # Technology fingerprinting
/osint --emails example.com # Email harvesting

Capabilities:

FeatureDescription
Subdomain EnumerationCertificate Transparency (crt.sh) + DNS brute-force with 90+ common prefixes
DNS RecordsA, AAAA, MX, NS, TXT, CNAME, SOA records via dnspython with socket fallback
WHOIS / RDAPDomain registration info via RDAP protocol with traditional WHOIS fallback
Email HarvestingDiscover email addresses from multiple passive sources
Tech Stack FingerprintingDetect web servers, frameworks, CMS, and libraries from HTTP headers, cookies, and HTML
Full ScanRun all modules at once and generate a unified OSINT report

Detected Technologies:

  • Servers: Nginx, Apache, IIS, Express, LiteSpeed, Caddy
  • Frameworks: React, Vue.js, Angular, Next.js, Django, Laravel, Rails, Flask, Spring
  • CMS: WordPress, Drupal, Joomla, Shopify, Wix, Squarespace
  • Languages: PHP, ASP.NET, Java, Python, Node.js
  • Security: Cloudflare, AWS CloudFront, Akamai, Sucuri

Network Topology Visualizer

Parse nmap or masscan scan results into an interactive network topology map.

# Auto-detect and parse from last agent scan
/topology
# Parse from a file
/topology scan_results.txt
# Parse nmap XML output
/topology nmap_output.xml

Capabilities:

FeatureDescription
Nmap Text ParsingParse standard nmap -sV text output into graph structure
Nmap XML ParsingParse nmap -oX XML format with full host/port/OS detail
Masscan ParsingParse masscan output with host/port discovery
Auto-DetectionAutomatically detect input format (XML, nmap text, or masscan)
ASCII RenderingBeautiful ASCII art network map in the terminal
D3.js VisualizationInteractive force-directed graph in the GUI with zoom, drag, and tooltips
Subnet GroupingHosts automatically organized by /24 subnet
Markdown SummaryTabular summary of hosts, ports, services, and OS detection

GUI Topology View:

┌─ Network Topology ─────────────────────────────────────────┐
│ │
│ [Scanner] │
│ / | \ │
│ [192.168.1.0/24] [10.0.0.0/24] │
│ / | \ | \ │
│ [.1] [.10] [.50] [.1] [.100] │
│ 3 ports 5 ports 2 ports │
│ │
│ Hosts: 5 │ Services: 18 │ Subnets: 2 │
└─────────────────────────────────────────────────────────────┘

Compliance Mapping

Automatically map security findings to compliance framework controls with gap analysis.

# Map all agent findings to all 4 frameworks
/compliance
# Filter by specific frameworks
/compliance pci nist
/compliance owasp
/compliance pci iso

Supported Frameworks:

FrameworkVersionControlsDescription
PCI DSSv4.022Payment Card Industry Data Security Standard
NIST 800-53Rev 522Security and Privacy Controls for Information Systems
OWASP Top 10202110Web Application Security Risks
ISO 27001202219Information Security Management System (Annex A)

Mapping Capabilities:

FeatureDescription
Auto-Detection15 keyword/regex rules match findings to controls (SQLi, XSS, SSRF, auth, crypto, etc.)
Severity MappingCritical/High → FAIL, Medium → rule default, Low/Info → WARN
Framework FilteringMap to specific frameworks or all four at once
DeduplicationSame control + finding pair only appears once
Executive SummaryPer-framework pass/fail/warn counts with percentages
Gap AnalysisTop failing control families, compliance coverage statistics
GUI DashboardSummary cards with progress bars, collapsible per-framework tables with status icons

Report Output:

📋 Compliance Mapping Report
| Framework | Fail | Warn | Pass | Not Tested |
|--------------------|------|------|------|------------|
| PCI DSS v4.0 | 8 | 3 | 0 | 0 |
| NIST 800-53 Rev 5 | 7 | 2 | 0 | 0 |
| OWASP Top 10 (2021)| 5 | 1 | 0 | 0 |
| ISO 27001:2022 | 6 | 2 | 0 | 0 |
Gap Analysis:
- 26 controls failing (76% of mapped controls)
- Top Failing: Secure Development (5), Access Control (4), Injection (3)

MITRE ATT&CK Mapping

Map security findings and tool usage to MITRE ATT&CK Enterprise techniques and tactics. Generate ATT&CK Navigator layer JSON for visualization.

# Map agent findings to ATT&CK techniques
/attack map
# Short summary
/attack summary
# Export Navigator layer JSON (import into ATT&CK Navigator)
/attack layer
# List all tactics
/attack tactics
# List techniques (optionally by tactic)
/attack techniques
/attack techniques TA0007
# Show ATT&CK techniques for a specific tool
/attack tool nmap
# Look up a technique by ID
/attack lookup T1046

Capabilities:

FeatureDescription
Finding Mapping30 regex rules map finding text to ATT&CK techniques (SQLi, XSS, brute force, etc.)
Tool Mapping26 security tools pre-mapped to ATT&CK techniques (nmap, nikto, sqlmap, hydra, etc.)
Navigator Layer ExportGenerate v4.5 layer JSON with confidence scoring and severity-based gradient coloring
14 TacticsFull Enterprise ATT&CK tactic coverage from Reconnaissance to Impact
~80 TechniquesCurated pentesting-relevant technique subset
Confidence ScoringHigh/Medium/Low confidence with color-coded indicators
DeduplicationSame technique from same source only mapped once
PDF IntegrationATT&CK section auto-included in PDF reports with per-tactic breakdown tables
GUI DashboardMap findings, browse tactics/techniques, export Navigator layers via REST API

Report Output:

📊 ATT&CK Coverage: 12 techniques, 6/14 tactics
Tactics: Reconnaissance, Initial Access, Execution, Discovery, Credential Access, ...
Confidence: 🔴 4 high | 🟠 6 medium | 🟡 2 low

Vulnerability Database

Persistent SQLite-based vulnerability tracker that stores findings across all assessments with deduplication, risk scoring, and remediation status management.

# Show database statistics
/vulndb stats
# Search findings
/vulndb search sql injection
# Filter by severity
/vulndb severity Critical
# View finding detail
/vulndb detail 42
# Update remediation status
/vulndb status 42 in_progress "Assigned to dev team"# List assessments
/vulndb assessments
# Risk score for a target
/vulndb risk example.com
# Delete a finding
/vulndb delete 42
# Purge all data
/vulndb purge

Capabilities:

FeatureDescription
Persistent StorageSQLite database with WAL mode for concurrent access
Auto-IntegrationAgent mode automatically stores findings and creates assessments
DeduplicationSHA-256 fingerprint prevents duplicate findings for the same target
Risk ScoringWeighted formula: Critical=10, High=7.5, Medium=5, Low=2.5, Info=0.5
Remediation Tracking5 statuses: open → in_progress → resolved / accepted / false_positive
Audit LogFull remediation history with timestamps and notes
Risk SnapshotsPoint-in-time risk score tracking for trend analysis
Search & FilterQuery by text, severity, status, target, with pagination
GUI DashboardBrowse findings, update status, view risk scores via REST API

Professional PDF Reports

Generate polished, paginated PDF pentest reports with charts and executive summaries.

# Generate PDF report from agent findings
/pdf
# Or use /export with pdf format
/export pdf

PDF Report Contents:

SectionDescription
Cover PageTarget, date, scope, severity summary cards
Table of ContentsSections and findings index with severity indicators
Executive SummaryRisk assessment, overall rating, severity counts table
Severity Bar ChartHorizontal bar chart of findings by severity
Donut ChartProportional severity breakdown with total count
Risk Matrix5×5 heat-map (severity × likelihood) with finding counts
Detailed FindingsPer-finding: description, evidence (code blocks), recommendations
Compliance MappingAuto-generated PCI DSS / NIST / OWASP / ISO control tables
Tool Execution LogFull command history with status, duration, exit codes
Page FooterPage numbers, confidentiality notice on every page

Installation:

pip install 'hackbot[pdf]'# Installs reportlab + matplotlib + Pillow

🔀 Diff Reports

Compare two assessments of the same target to instantly see what changed — which vulnerabilities are new, which were fixed, and which persist across scans.

# List agent sessions with findings
/diff
# Compare two specific sessions
/diff agent_1707000000 agent_1707100000
# Compare a saved baseline against the current live assessment
/diff agent_1707000000

Diff Report Output:

SectionDescription
Comparison OverviewSide-by-side session metadata (dates, total findings, risk scores)
Overall TrendImproved 📉 / Degraded 📈 / Unchanged ➡️ with risk score delta
Severity BreakdownPer-severity counts with ↑↓ change indicators
🆕 New VulnerabilitiesFindings that appeared in the newer assessment
✅ Fixed VulnerabilitiesFindings that were remediated since the baseline
⚠️ Persistent VulnerabilitiesFindings that remain unresolved (includes severity changes)
🔴 RegressionsPreviously fixed findings that have reappeared

Matching Engine: Findings are matched across assessments using a token-based similarity algorithm on title, description, and tool. Exact title matches score 1.0; partial matches use Jaccard similarity with a tool-name boost. Threshold: 0.65.

GUI: The Diff Report panel provides two dropdown selectors (baseline vs. current) with a "Compare" button. Results render as interactive cards with color-coded severity badges, trend indicators, and collapsible finding sections.

AI Remediation Engine

Auto-generate actionable fix commands, configuration patches, and code snippets for each security finding.

# Remediate all findings
/remediate
# Remediate a specific finding
/remediate 3
# AI-enhanced remediation (uses your configured LLM)
/remediate --ai

Capabilities:

FeatureDescription
Rule-Based Engine20+ built-in vulnerability rules — instant remediation with no API key required
AI-Enhanced ModeFalls back to LLM for tailored fixes when --ai flag is used
Fix CommandsShell commands (apt, systemctl, ufw, iptables, etc.) ready to copy-paste
Config PatchesNginx, Apache, sshd_config, BIND, SNMP patches with file paths
Code SnippetsPython, PHP, Java, JavaScript fix examples with vulnerable vs. secure patterns
Multi-LanguageEach finding gets fixes in multiple languages/frameworks
ReferencesOWASP, NIST, CIS Benchmark, and MDN links for each remediation
Priority MappingSeverity → priority: Critical→Immediate, High→High, Medium→Medium, Low→Low

Covered vulnerability types: SQL injection, XSS, command injection, path traversal, CSRF, SSL/TLS misconfiguration, missing security headers, weak credentials, SSH hardening, information disclosure, outdated software, CORS, IDOR/broken access control, file upload, XXE, SSRF, insecure deserialization, DNS zone transfer, SNMP defaults, exposed admin panels, and more.

GUI: The Findings panel includes a "🔧 Remediate" button that generates remediation cards with copyable fix commands, config patches, and code snippets — all color-coded by priority.


🧩 Custom Plugins

HackBot supports a Python plugin system that lets you register your own scripts as agent-callable tools. The AI agent can invoke your plugins during assessments just like built-in tools.

Official links:

Plugin Directory

Plugins are Python files placed in ~/.config/hackbot/plugins/. HackBot auto-discovers them on startup.

Writing a Plugin

Method 1: Decorator (recommended)

# ~/.config/hackbot/plugins/port_check.pyfromhackbot.core.pluginsimporthackbot_plugin@hackbot_plugin(name="port_check",description="Check if a TCP port is open on a target host",args={"host": "Target hostname or IP", "port": "TCP port number"},category="recon",author="Your Name",version="1.0.0",)defrun(host: str, port: str="80") ->str:
importsocketsock=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(3)
result=sock.connect_ex((host, int(port)))
sock.close()
returnf"Port {port} on {host}: {'OPEN'ifresult==0else'CLOSED'}"

Method 2: Register function

# ~/.config/hackbot/plugins/http_headers.pyfromhackbot.core.pluginsimportPluginDefinitiondefregister() ->PluginDefinition:
returnPluginDefinition(
name="http_headers",
description="Fetch and analyze HTTP security headers",
args={"url": "Target URL"},
run=check_headers,
)
defcheck_headers(url: str) ->str:
# Your analysis logic herereturn"Results..."

Managing Plugins

CommandDescription
/pluginsList all registered plugins
/plugins reloadRediscover plugins after adding/removing files
/plugins dirShow the plugins directory path

Agent Integration

The AI agent automatically sees available plugins and can call them during assessments:

{"action": "execute", "tool": "hackbot-plugin",
"command": "hackbot-plugin port_check --host 10.0.0.1 --port 22",
"explanation": "Check if SSH is open on the target"}

GUI: The Plugins panel lists all registered plugins with description, arguments, version, and category. Each plugin card has inline argument inputs and a "Run" button for manual execution, with live output rendering.

See examples/plugins/ for complete example plugins.

Multi-Target Campaigns

Define a scope with multiple hosts or URLs and run coordinated security assessments across all of them. The campaign system tracks progress per-target, shares intelligence between targets, and aggregates findings into a unified report.

# Create a campaign with multiple targets
/campaign new "Internal Audit Q1" 192.168.1.1 192.168.1.2 app.internal.com
# Add more targets
/campaign add 10.0.0.1 10.0.0.2
# Start the campaign (begins first target assessment)
/campaign start
# Complete current target, advance to the next
/campaign next
# Skip a target
/campaign skip
# View campaign progress
/campaign status
# View aggregated findings across all targets
/campaign findings
# Export campaign report
/campaign report
# Pause / resume / abort
/campaign pause
/campaign resume
/campaign abort
# List and load saved campaigns
/campaign list
/campaign load <id>

Key capabilities:

  • Cross-target intelligence — findings from previous targets are shared with the agent for subsequent assessments
  • Per-target tracking — status (pending/running/completed/failed/skipped), findings, duration, step count
  • Coordinated reporting — severity summary, per-target breakdown, critical/high finding details
  • Full lifecycle — draft → running → paused → completed/aborted with save/restore support
  • GUI dashboard — create campaigns, monitor target progress, view findings, and export reports from the Campaigns panel

🧠 Memory & Sessions

HackBot automatically saves your conversations and provides full session management.

Features

FeatureDescription
Auto-SaveConversations are automatically saved after each interaction
Session HistoryBrowse all past sessions with timestamps, modes, and message counts
Session RestoreReload any previous conversation and continue where you left off
/continueSeamlessly resume truncated AI responses
Conversation SummarizationLong conversations are automatically summarized to stay within context limits
SearchSearch sessions by keyword, mode, or date

Commands

/save [name] # Save current session with optional name
/load [session_id] # Load a previous session
/sessions # List all saved sessions
/sessions --mode agent # Filter sessions by mode
/sessions --search nmap # Search sessions by keyword
/continue # Continue a truncated response
/clear # Clear current conversation
/reset # Full reset (clear + new session)

GUI Session Panel

The GUI sidebar shows your session history and allows one-click restore or deletion. Sessions display:

  • Session ID and custom name
  • Mode (Chat / Agent / Plan)
  • Message count and timestamp
  • First message preview

🌍 AI Providers

HackBot supports 10 AI providers out of the box. Switch providers instantly with a single command.

Supported Providers

ProviderModelsEnv VariableNotes
OpenAIGPT-5.2, GPT-5.1, GPT-5.2 Codex, GPT-4o, o3-miniOPENAI_API_KEYLatest flagship models
AnthropicClaude Opus 4.6, Opus 4.5, Sonnet 4, Opus 4ANTHROPIC_API_KEYTop research & code
Google GeminiGemini 3 Pro, 3 Flash, 2.5 ProGEMINI_API_KEYUp to 1M context window
GroqLLaMA 3.3 70B, 3.1 405B, MixtralGROQ_API_KEYUltra-fast inference
MistralMistral Large 2, Codestral, NemoMISTRAL_API_KEYStrong multilingual & code
DeepSeekDeepSeek V3, DeepSeek R1DEEPSEEK_API_KEYReasoning models
Together AILLaMA 3.1 405B, Qwen 2.5, Mistral Large 2TOGETHER_API_KEYLarge open models
OpenRouterAll top models via one APIOPENROUTER_API_KEYOne key, many providers
OllamaLLaMA 3.1 405B/70B, TinyLlama, Pentester, WhiteRabbitNeo, Vicuna, GLM-4100% local, no API key needed
LocalAny OpenAI-compatible serverCustom endpoints

Switching Providers

# CLI flags
hackbot --provider anthropic --model claude-sonnet-4-20250514
# Inside the app
/provider groq
/model llama-3.3-70b-versatile
# List available providers and models
/providers
/models
/models openai
# Environment variablesexport HACKBOT_PROVIDER=anthropic
export HACKBOT_API_KEY=sk-ant-...
export HACKBOT_MODEL=claude-sonnet-4-20250514

Using Local Models (Ollama)

# Install Ollama: https://ollama.ai
ollama pull llama3.2
# Use with HackBot
hackbot --provider ollama --model llama3.2

No API key needed — runs entirely on your hardware.

Low-End PC (TinyLlama)

# Only ~600 MB VRAM — runs on almost any machine
ollama pull tinyllama
hackbot --provider ollama --model tinyllama

Ethical Hacking Model (xploiter/pentester)

# Purpose-built for ethical hacking & offensive security
ollama pull xploiter/pentester
hackbot --provider ollama --model xploiter/pentester

Cybersecurity Model (WhiteRabbitNeo)

# Penetration-testing–focused model
ollama pull whiterabbitneo
hackbot --provider ollama --model whiterabbitneo

⌨️ All Commands

Core Commands

CommandDescription
/chatSwitch to Chat Mode
/agent <target>Start Agent Mode assessment
/planSwitch to Planning Mode
/run <command>Execute a security tool
/helpShow help
/quitExit

Agent Commands

CommandDescription
/stepExecute next agent step
/findingsShow all findings
/stopStop assessment
/export [format]Export report (html/md/json/pdf)
/pdfProfessional PDF pentest report
/diff [old] [new]Compare two assessments (shows new/fixed/persistent findings)
/campaign new <name> <targets>Create a new multi-target campaign
/campaign startStart the active campaign
/campaign nextComplete current target, advance to next
/campaign statusShow campaign progress dashboard
/campaign findingsShow aggregated findings across all targets
/campaign reportExport campaign report
/campaign pause/resume/abortCampaign lifecycle control
/campaign listList all saved campaigns
/remediateGenerate remediations for all findings
/remediate #Remediate a specific finding by number
/remediate --aiUse AI for enhanced remediation guidance

Proxy Commands

CommandDescription
/proxy start [port]Start the intercepting proxy (default port 8080)
/proxy stopStop the proxy
/proxy statusShow proxy status and statistics
/proxy traffic [n]Show captured traffic (last n requests)
/proxy filter <term>Filter traffic by URL/header/body substring
/proxy scope <domain>Restrict capture to domain(s)
/proxy clearClear all captured traffic
/proxy export [file]Export traffic as JSON
/proxy replay <id>Replay a captured request
/proxy flagsShow auto-flagged security-relevant requests
/proxy detail <id>Show full request/response details

Intelligence Commands

CommandDescription
/cve <query>CVE/exploit lookup (keyword, CVE ID, or --nmap for auto-mapping)
/osint <domain>OSINT recon (--subs, --dns, --whois, --tech, --emails, or full scan)
/topology [file]Network topology from scan output (auto-loads from agent if no args)
/complianceMap findings to PCI DSS, NIST, OWASP, ISO compliance frameworks
/attackMITRE ATT&CK technique/tactic mapping and Navigator layer export
/vulndbVulnerability database — search, stats, status updates, risk scores
/proxyHTTP proxy / traffic capture (start, stop, traffic, filter, flags, replay, export)

Session & Memory Commands

CommandDescription
/save [name]Save session
/load [name]Load session
/sessionsList all sessions
/continueContinue truncated response
/clearClear history
/resetFull reset

Provider & Config Commands

CommandDescription
/provider <name>Switch AI provider
/model <name>Switch AI model
/models [provider]List available models
/providersList all providers
/key <key>Set API key
/configShow config
/toolsList detected security tools

Planning Commands

CommandDescription
/planEnter planning mode
/templatesList plan templates
/checklist <type>Generate testing checklist
/commands <target>Generate ready-to-use commands

⚙️ Configuration

Config File

Located at ~/.config/hackbot/config.yaml (Linux/macOS) or %APPDATA%/hackbot/config.yaml (Windows).

ai:
provider: openai # openai, anthropic, gemini, groq, mistral, deepseek, together, openrouter, ollama, localmodel: gpt-4o # AI model nameapi_key: sk-... # Your API keybase_url: ""# Custom API endpointtemperature: 0.2max_tokens: 4096agent:
auto_confirm: false # Auto-confirm risky commandsmax_steps: 50# Max agent steps per assessmenttimeout: 300# Command timeout (seconds)safe_mode: true # Enable safety checksallowed_tools: # Whitelist of allowed tools
- nmap
- nikto
- sqlmap
- nuclei# ... etcreporting:
format: html # html, markdown, json, pdfauto_save: trueinclude_raw_output: trueui:
theme: darkshow_banner: trueverbose: false

Environment Variables

VariableDescription
HACKBOT_API_KEYAI API key (highest priority)
OPENAI_API_KEYOpenAI API key (fallback)
HACKBOT_MODELOverride AI model
HACKBOT_PROVIDEROverride AI provider
HACKBOT_BASE_URLOverride API endpoint

🐳 Docker

Build & Run

# Build
docker build -t hackbot .# Interactive mode
docker run -it \
-e HACKBOT_API_KEY=sk-your-key \
--network host \
--cap-add NET_RAW \
hackbot
# Agent mode directly
docker run -it \
-e HACKBOT_API_KEY=sk-your-key \
--network host \
--cap-add NET_RAW \
hackbot agent scanme.nmap.org
# With docker-compose
HACKBOT_API_KEY=sk-your-key docker-compose run hackbot

Docker includes:

  • All Python dependencies
  • nmap, nikto, dirb, hydra, john, sslscan
  • nuclei, subfinder, httpx, ffuf (Go tools)
  • sqlmap, wfuzz (Python tools)

☁️ Run on Google Colab

No local CPU? Run HackBot entirely on Google Colab with free GPU access.

Open In Colab

The notebook includes all three modes ready to use:

SectionWhat it does
Chat ModeInteractive cybersecurity Q&A
Agent ModeAutonomous pentesting with real tools (nmap, nikto, etc.)
Plan ModeGenerate structured pentest plans (8 templates)
Ollama on ColabRun local models using Colab's free GPU
GUI on ColabLaunch the full web GUI via tunnel

Quick Start on Colab

# 1. Install
!pipinstall"hackbot @ git+https://github.com/yashab-cyber/hackbot.git"# 2. Configure (use Colab Secrets for API key)importosos.environ["HACKBOT_PROVIDER"] ="groq"os.environ["HACKBOT_MODEL"] ="llama-3.3-70b-versatile"os.environ["HACKBOT_API_KEY"] ="your-key"# 3. Usefromhackbot.configimportload_configfromhackbot.core.engineimportAIEnginefromhackbot.modes.chatimportChatModeconfig=load_config()
engine=AIEngine(config.ai)
chat=ChatMode(engine, config)
print(chat.ask("How do I scan for open ports with nmap?", stream=False))

You can also run Ollama models on Colab's free T4 GPU:

!curl-fsSLhttps://ollama.com/install.sh|sh
!ollamapullxploiter/pentester# ethical hacking model

🔧 Supported Security Tools

HackBot integrates with 30+ security tools:

CategoryTools
Scanningnmap, masscan
Web Testingnikto, dirb, gobuster, ffuf, wfuzz, whatweb
Vulnerabilitynuclei, sqlmap
Reconsubfinder, amass, httpx, whois, dig
Passwordhydra, john, hashcat
SSL/TLStestssl, sslscan, openssl
Networknetcat, traceroute, ping, curl, wget

Check what's installed:

hackbot tools

🏗️ Architecture

hackbot/
├── __init__.py # Package metadata
├── cli.py # Main CLI with interactive REPL (40+ commands)
├── config.py # Configuration management
├── memory.py # Session memory & conversation summarization
├── reporting.py # Report generation (HTML/MD/JSON)
├── core/
│ ├── engine.py # AI engine — 10 providers, LLM communication
│ ├── runner.py # Tool execution (subprocess management)
│ ├── cve.py # CVE/exploit lookup (NVD + GitHub)
│ ├── osint.py # OSINT recon (subdomains, DNS, WHOIS, tech stack)
│ ├── topology.py # Network topology parser & visualizer
│ ├── compliance.py # Compliance mapping (PCI DSS, NIST, OWASP, ISO)
│ ├── attack.py # MITRE ATT&CK mapping engine (techniques, Navigator layers)
│ ├── vulndb.py # Persistent vulnerability database (SQLite, risk scoring)
│ ├── campaigns.py # Multi-target campaign system (orchestration, reporting)
│ ├── diff_report.py # Assessment diff engine (new/fixed/persistent findings)
│ ├── pdf_report.py # Professional PDF report generator
│ ├── plugins.py # Custom plugin system (decorator + register patterns)
│ ├── remediation.py # AI Remediation Engine (20+ vulnerability rules)
│ └── proxy.py # HTTP Proxy / Traffic Capture engine
├── modes/
│ ├── chat.py # Chat mode (Q&A + auto-save + /continue)
│ ├── agent.py # Agent mode (autonomous testing + memory)
│ └── plan.py # Planning mode (8 templates)
├── gui/
│ ├── app.py # Flask backend (25+ API routes, SSE streaming)
│ └── templates/
│ └── index.html # Single-page frontend (dark theme, D3.js, panels)
└── ui/
└── __init__.py # Rich terminal UI components

API Endpoints (GUI Backend)

EndpointMethodDescription
/api/statusGETApp status and current mode
/api/providersGETList all AI providers
/api/toolsGETList detected security tools
/api/configGET/POSTRead or update configuration
/api/modePOSTSwitch mode (chat/agent/plan)
/api/chatPOSTSend chat message (SSE stream)
/api/chat/continuePOSTContinue truncated response
/api/sessionsGETList saved sessions
/api/sessions/<id>GET/DELETEGet or delete a session
/api/sessions/restore/<id>POSTRestore a session
/api/agent/startPOSTStart agent assessment
/api/agent/stepPOSTExecute next agent step
/api/agent/runPOSTRun a tool manually
/api/agent/findingsGETGet current findings
/api/cve/lookupPOSTLook up a specific CVE
/api/cve/searchPOSTSearch CVEs by keyword
/api/cve/exploitsPOSTSearch exploit PoCs
/api/cve/nmapPOSTMap nmap output to CVEs
/api/osint/scanPOSTFull OSINT scan (SSE)
/api/osint/subdomainsPOSTSubdomain enumeration
/api/osint/dnsPOSTDNS record lookup
/api/osint/whoisPOSTWHOIS / RDAP lookup
/api/osint/techstackPOSTTechnology fingerprinting
/api/topology/parsePOSTParse scan output to topology
/api/topology/from-agentGETGet topology from agent scans
/api/campaignsGET/POSTList all or create a campaign
/api/campaigns/<id>GET/DELETEGet or delete a campaign
/api/campaigns/<id>/activatePOSTSet campaign as active
/api/campaigns/activeGETGet active campaign state
/api/campaigns/active/startPOSTStart/resume campaign
/api/campaigns/active/start-targetPOSTAssess a target (SSE stream)
/api/campaigns/active/complete-targetPOSTMark target as completed
/api/campaigns/active/skip-targetPOSTSkip a target
/api/campaigns/active/pausePOSTPause campaign
/api/campaigns/active/abortPOSTAbort campaign
/api/campaigns/active/findingsGETAggregated findings
/api/campaigns/active/reportPOSTSave campaign report
/api/agent/remediatePOSTGenerate remediation guidance for findings
/api/proxy/startPOSTStart the intercepting proxy
/api/proxy/stopPOSTStop the proxy
/api/proxy/statusGETGet proxy status and stats
/api/proxy/trafficGETGet captured traffic (supports filter, method, limit params)
/api/proxy/traffic/<id>GETGet single request detail
/api/proxy/flagsGETGet flagged security-relevant traffic
/api/proxy/scopePOSTSet or clear domain scope
/api/proxy/clearPOSTClear captured traffic
/api/proxy/replayPOSTReplay a captured request
/api/proxy/exportGETExport traffic as JSON or Markdown
/api/compliance/mapPOSTMap findings to compliance frameworks
/api/compliance/from-agentGETMap agent findings to compliance frameworks
/api/compliance/frameworksGETList available compliance frameworks
/api/compliance/controls/<fw>GETGet controls for a framework
/api/attack/mapPOSTMap findings to ATT&CK techniques
/api/attack/from-agentGETMap agent findings to ATT&CK techniques
/api/attack/layerGETGenerate ATT&CK Navigator layer JSON
/api/attack/tacticsGETList all ATT&CK tactics
/api/attack/techniquesGETList ATT&CK techniques (optional tactic filter)
/api/attack/technique/<id>GETGet a specific technique by ID
/api/attack/tool/<name>GETGet ATT&CK techniques for a tool
/api/vulndb/statsGETVulnerability database statistics
/api/vulndb/findingsGETSearch/list findings
/api/vulndb/findings/<id>GETGet finding detail
/api/vulndb/findings/<id>/statusPOSTUpdate finding status
/api/vulndb/assessmentsGETList assessments
/api/vulndb/riskGETGet risk score and history

🧪 Testing

# Run all tests
python -m pytest tests/ -v
# Run specific test modules
python -m pytest tests/test_intel.py -v # CVE, OSINT, Topology tests
python -m pytest tests/test_engine.py -v # AI engine tests
python -m pytest tests/test_modes.py -v # Mode tests
python -m pytest tests/test_memory.py -v # Memory & session tests
python -m pytest tests/test_runner.py -v # Tool runner tests
python -m pytest tests/test_config.py -v # Config tests
python -m pytest tests/test_attack.py -v # ATT&CK mapping tests
python -m pytest tests/test_vulndb.py -v # Vulnerability database tests

724 tests across 16 test files covering all modules.


⚠️ Disclaimer

HackBot is designed for authorized security testing only.

  • Always obtain explicit written permission before testing any system
  • Follow responsible disclosure practices
  • Comply with all applicable laws and regulations
  • The developers are not responsible for misuse

Never use this tool against systems you don't own or have authorization to test.


�‍💻 Author

Yashab Alam — Creator & Lead Developer

🐙 GitHubgithub.com/yashab-cyber
💼 LinkedInlinkedin.com/in/yashab-alam
📧 Emailyashabalam707@gmail.com
📧 Email (alt)yashabalam9@gmail.com

❤️ Support HackBot

HackBot is free and open-source. If it has helped you, please consider supporting its development! See DONATE.md for details, or reach out through any of the links above.


💬 Community

Join the HackBot Discord community to connect with other users, get help, share ideas, and stay updated!

Discord


📄 License

MIT License — see LICENSE for details.


Built for ethical hackers, by ethical hackers. 🛡️

Report BugRequest Feature❤️ Donate💬 Discord

About

Production-ready AI-powered pentesting & cybersecurity assistant with Agent, Chat & Planning modes, native desktop GUI, 10 AI providers, and built-in intelligence modules.

Topics

Resources

Code of conduct

Security policy

Stars

40 stars

Watchers

3 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages