AI Chatbot Penetration Testing Framework
Project description
██████╗ ███████╗███╗ ██╗██████╗ ██████╗ ████████╗
██╔══██╗██╔════╝████╗ ██║██╔══██╗██╔═══██╗╚══██╔══╝
██████╔╝█████╗ ██╔██╗ ██║██████╔╝██║ ██║ ██║
██╔═══╝ ██╔══╝ ██║╚██╗██║██╔══██╗██║ ██║ ██║
██║ ███████╗██║ ╚████║██████╔╝╚██████╔╝ ██║
╚═╝ ╚══════╝╚═╝ ╚═══╝╚═════╝ ╚═════╝ ╚═╝
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
- OWASP Top 10 for LLM Applications (2025)
- OWASP Top 10 for Agentic Applications (2026)
- Kumar et al. (2024). AmpleGCG-Plus. arXiv:2410.22143
- Zhang et al. (2025). Verbalized Sampling. arXiv:2510.01171
- Hiding in the AI Traffic: Abusing MCP for LLM-Powered Agentic Red Teaming. arXiv:2511.15998
Acknowledgments
- Elder Plinius / L1B3RT4S — jailbreak pattern research
- Manus AI — context engineering principles
- LangChain — LangGraph framework
- Anthropic
- OWASP — LLM Top 10 framework
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbbbd4f25963eb03955c3c89bf2b5d28563b8619f69807c88f3b053e3da307da
|
|
| MD5 |
e13f720a2930585ea7afa36d138a4d91
|
|
| BLAKE2b-256 |
8c69ba5575e010b2026e8f8a892685f80234ba4f0923cdf0c12223046fd6f9c3
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8dd049a7d4dd2525c750bd6885c710fef3d931da0af73dc49d265403a9b9091f
|
|
| MD5 |
44347762f1d3820cd3fe1d86b2fc1698
|
|
| BLAKE2b-256 |
326b56395c8d2c5031bf7b79fec9770aa8b7dafe90f4e2402e5710f680eb6b7f
|