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,542 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.4.0.tar.gz (716.6 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.4.0-py3-none-any.whl (822.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for penbot-2.4.0.tar.gz
Algorithm Hash digest
SHA256 7618f5748d9d48f14006cc2ee5a292478ed638338934848961b12a92886e488f
MD5 f31194d4b09498f843975af507fcab84
BLAKE2b-256 d0caf22ab4d52e3f68edb9ca1d0ff99b7f053f428404b552a211b55ee6f9033d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: penbot-2.4.0-py3-none-any.whl
  • Upload date:
  • Size: 822.1 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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 216e7ecd1f8bae45de2def6804a97aab7f8a0af178900ee224f6ccadfd39b630
MD5 18f4a2f153be7807ce253ebc4e78876c
BLAKE2b-256 7302e22fd5c9511384be829dd76207134619130262fbfb8744af9e615c7555f4

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