Skip to main content

AI Chatbot Penetration Testing Framework

Project description

██████╗ ███████╗███╗   ██╗██████╗  ██████╗ ████████╗
██╔══██╗██╔════╝████╗  ██║██╔══██╗██╔═══██╗╚══██╔══╝
██████╔╝█████╗  ██╔██╗ ██║██████╔╝██║   ██║   ██║   
██╔═══╝ ██╔══╝  ██║╚██╗██║██╔══██╗██║   ██║   ██║   
██║     ███████╗██║ ╚████║██████╔╝╚██████╔╝   ██║   
╚═╝     ╚══════╝╚═╝  ╚═══╝╚═════╝  ╚═════╝    ╚═╝   
PenBot Logo

PyPI version Pipeline Status Python 3.11+ License: MIT OWASP LLM Top 10 OWASP ASI Contributions Welcome

Multi-agent adversarial testing framework for AI chatbots and agentic systems. Orchestrates specialized security agents to find vulnerabilities in conversational AI through prompt injection, social engineering, encoding attacks, RAG poisoning, tool exploitation, and MCP protocol abuse.


Install

pip install penbot              # Core: CLI + REST API testing
pip install penbot[full]        # Adds dashboard, Playwright, PDF/DOCX reports
pip install penbot[ml]          # Adds embedding-based attack memory

From source:

git clone https://gitlab.com/yan-ban/penbot.git
cd penbot
pip install -e .

Docker:

docker pull registry.gitlab.com/yan-ban/penbot:latest

Run

penbot onboard                                  # First-run setup
penbot wizard                                   # Configure a target
penbot test --config configs/clients/target.yaml
penbot doctor                                   # Verify environment

Dashboard:

penbot dashboard   # http://localhost:8000/dashboard

CLI

penbot onboard     First-run setup
penbot doctor      Environment health check
penbot wizard      Configure new target
penbot test        Run security test
penbot dashboard   Start Mission Control
penbot sessions    Manage past sessions
penbot agents      Browse agents
penbot patterns    Search attack library
penbot report      Generate report
penbot benchmark   Score detection against mock chatbots
penbot watch       Continuous testing

See CLI Reference.


Features

  • 14 specialized agents — jailbreak, encoding, social engineering, RAG, tool exploitation, MCP exploit, exfiltration, indirect injection, action safety, compliance, and more
  • 1,398+ attack patterns across 27 curated libraries (including 20 MCP protocol-attack patterns)
  • 22 vulnerability detectors — two-layer detection (pattern + LLM) with finding chaining and guardrail fingerprinting
  • OWASP LLM Top 10 (2025) + Agentic Top 10 (2026) coverage, including ASI02 and ASI04
  • Model Context Protocol (MCP) testing — tool-description poisoning, resource URI traversal, list_changed bait-and-switch, cross-server pivots, sampling API abuse
  • Multi-agent coordination — voting, hybrid attack composition, domain-aware campaign planning
  • Persistence verification — post-test replay confirms findings are reproducible
  • Endpoint reconnaissance — two-phase API surface mapping with framework detection
  • Evolutionary generation — novel attacks via genetic algorithms with semantic retrieval (sentence-transformers + FAISS)
  • Web dashboard — live Mission Control, session replay, OWASP report, real-time WebSocket streaming
  • Regression testing and purple-team mode for CI-friendly defense validation

Technology

  • LangGraph — multi-agent workflow orchestration
  • Claude Sonnet 4.5 — attack generation
  • FastAPI — API + WebSocket server (requires penbot[full])
  • Playwright — browser automation (requires penbot[full])
  • SQLite — session persistence

Install Extras

Extra Command What it adds
Core pip install penbot CLI, REST API testing, security agents, attack pattern libraries
Full pip install penbot[full] Dashboard, Playwright, PDF/DOCX reports, OpenAI provider, Tavily recon
Recon pip install penbot[recon] Tavily web search for target reconnaissance
Think pip install penbot[think] MCP-based enhanced reasoning
ML pip install penbot[ml] Embedding-based attack memory (sentence-transformers, FAISS)
ML-Viz pip install penbot[ml-viz] ML + scikit-learn & matplotlib for notebooks

Documentation

Document Description
Developer Guide How PenBot works under the hood
Architecture System design and diagrams
Methodology Attack strategies
Configuration YAML and environment setup
CLI Reference Command-line usage
API Reference REST and WebSocket
Agents Agent system details
Detection Vulnerability detectors
Advanced RAG, tools, evolutionary
OWASP Coverage Compliance mapping
Test Example Test walkthrough

Responsible Use

This tool is for authorized security testing only.

Permitted: testing your own systems, security research with written permission, contracted red team engagements, pre-deployment validation.

Prohibited: testing without authorization, attacking production systems maliciously, extracting proprietary data.

Built-in safeguards include authorization verification, a blocklist for public AI services, rate limiting, and audit logging.


Project Status

Aspect Status
Development Under active development
Tests 1,517 passing
Skipped 11 (optional deps)
Docker Multi-stage build

References


Acknowledgments


License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

penbot-2.3.1.tar.gz (710.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

penbot-2.3.1-py3-none-any.whl (815.4 kB view details)

Uploaded Python 3

File details

Details for the file penbot-2.3.1.tar.gz.

File metadata

  • Download URL: penbot-2.3.1.tar.gz
  • Upload date:
  • Size: 710.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for penbot-2.3.1.tar.gz
Algorithm Hash digest
SHA256 cbbbd4f25963eb03955c3c89bf2b5d28563b8619f69807c88f3b053e3da307da
MD5 e13f720a2930585ea7afa36d138a4d91
BLAKE2b-256 8c69ba5575e010b2026e8f8a892685f80234ba4f0923cdf0c12223046fd6f9c3

See more details on using hashes here.

File details

Details for the file penbot-2.3.1-py3-none-any.whl.

File metadata

  • Download URL: penbot-2.3.1-py3-none-any.whl
  • Upload date:
  • Size: 815.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for penbot-2.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8dd049a7d4dd2525c750bd6885c710fef3d931da0af73dc49d265403a9b9091f
MD5 44347762f1d3820cd3fe1d86b2fc1698
BLAKE2b-256 326b56395c8d2c5031bf7b79fec9770aa8b7dafe90f4e2402e5710f680eb6b7f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page