ptai 0.8.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ptai-0.8.0/LICENSE +21 -0
- ptai-0.8.0/PKG-INFO +354 -0
- ptai-0.8.0/README.md +296 -0
- ptai-0.8.0/agents/__init__.py +0 -0
- ptai-0.8.0/agents/ad/__init__.py +0 -0
- ptai-0.8.0/agents/ad/ad_agent.py +143 -0
- ptai-0.8.0/agents/cloud/__init__.py +0 -0
- ptai-0.8.0/agents/cloud/cloud_agent.py +41 -0
- ptai-0.8.0/agents/detection/__init__.py +0 -0
- ptai-0.8.0/agents/detection/detection_agent.py +41 -0
- ptai-0.8.0/agents/exploit_chain/__init__.py +0 -0
- ptai-0.8.0/agents/exploit_chain/chain_agent.py +184 -0
- ptai-0.8.0/agents/mobile/__init__.py +0 -0
- ptai-0.8.0/agents/mobile/mobile_agent.py +94 -0
- ptai-0.8.0/agents/poc_validator/__init__.py +0 -0
- ptai-0.8.0/agents/poc_validator/poc_agent.py +79 -0
- ptai-0.8.0/agents/recon/__init__.py +0 -0
- ptai-0.8.0/agents/recon/recon_agent.py +137 -0
- ptai-0.8.0/agents/report/__init__.py +0 -0
- ptai-0.8.0/agents/report/report_agent.py +112 -0
- ptai-0.8.0/agents/social_engineer/__init__.py +0 -0
- ptai-0.8.0/agents/social_engineer/social_engineer_agent.py +84 -0
- ptai-0.8.0/agents/web/__init__.py +0 -0
- ptai-0.8.0/agents/web/web_agent.py +174 -0
- ptai-0.8.0/agents/wireless/__init__.py +0 -0
- ptai-0.8.0/agents/wireless/wireless_agent.py +65 -0
- ptai-0.8.0/cli/__init__.py +1 -0
- ptai-0.8.0/cli/auth.py +53 -0
- ptai-0.8.0/cli/main.py +159 -0
- ptai-0.8.0/config/__init__.py +0 -0
- ptai-0.8.0/config/settings.py +129 -0
- ptai-0.8.0/engine/__init__.py +1 -0
- ptai-0.8.0/engine/findings_db.py +321 -0
- ptai-0.8.0/engine/orchestrator.py +135 -0
- ptai-0.8.0/engine/scanners.py +601 -0
- ptai-0.8.0/mcp_server/__init__.py +3 -0
- ptai-0.8.0/mcp_server/server.py +458 -0
- ptai-0.8.0/ptai.egg-info/PKG-INFO +354 -0
- ptai-0.8.0/ptai.egg-info/SOURCES.txt +52 -0
- ptai-0.8.0/ptai.egg-info/dependency_links.txt +1 -0
- ptai-0.8.0/ptai.egg-info/entry_points.txt +2 -0
- ptai-0.8.0/ptai.egg-info/requires.txt +34 -0
- ptai-0.8.0/ptai.egg-info/top_level.txt +6 -0
- ptai-0.8.0/pyproject.toml +96 -0
- ptai-0.8.0/setup.cfg +4 -0
- ptai-0.8.0/tests/test_core.py +334 -0
- ptai-0.8.0/tools/__init__.py +1 -0
- ptai-0.8.0/tools/binary/__init__.py +0 -0
- ptai-0.8.0/tools/cloud/__init__.py +0 -0
- ptai-0.8.0/tools/network/__init__.py +0 -0
- ptai-0.8.0/tools/osint/__init__.py +0 -0
- ptai-0.8.0/tools/password/__init__.py +0 -0
- ptai-0.8.0/tools/registry.py +851 -0
- ptai-0.8.0/tools/web/__init__.py +0 -0
ptai-0.8.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 0xSteph
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
ptai-0.8.0/PKG-INFO
ADDED
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ptai
|
|
3
|
+
Version: 0.8.0
|
|
4
|
+
Summary: Autonomous AI pentesting with 150+ tools, exploit chaining, and PoC validation
|
|
5
|
+
Author: 0xSteph
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://pentestai.xyz
|
|
8
|
+
Project-URL: Repository, https://github.com/0xSteph/pentest-ai
|
|
9
|
+
Project-URL: Documentation, https://pentestai.xyz
|
|
10
|
+
Project-URL: Issues, https://github.com/0xSteph/pentest-ai/issues
|
|
11
|
+
Keywords: pentest,pentesting,security,mcp,ai,cybersecurity,exploit,vulnerability
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Information Technology
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Security
|
|
21
|
+
Classifier: Topic :: Software Development :: Testing
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: fastmcp>=2.0
|
|
26
|
+
Requires-Dist: httpx>=0.27
|
|
27
|
+
Requires-Dist: pydantic>=2.0
|
|
28
|
+
Requires-Dist: rich>=13.0
|
|
29
|
+
Requires-Dist: typer>=0.9
|
|
30
|
+
Requires-Dist: aiosqlite>=0.20
|
|
31
|
+
Requires-Dist: pyyaml>=6.0
|
|
32
|
+
Requires-Dist: python-dotenv>=1.0
|
|
33
|
+
Requires-Dist: jinja2>=3.1
|
|
34
|
+
Requires-Dist: cryptography>=42.0
|
|
35
|
+
Requires-Dist: dnspython>=2.6
|
|
36
|
+
Requires-Dist: scapy>=2.5
|
|
37
|
+
Requires-Dist: paramiko>=3.4
|
|
38
|
+
Requires-Dist: impacket>=0.11
|
|
39
|
+
Requires-Dist: bloodhound>=1.7
|
|
40
|
+
Requires-Dist: requests>=2.31
|
|
41
|
+
Requires-Dist: beautifulsoup4>=4.12
|
|
42
|
+
Requires-Dist: aiohttp>=3.9
|
|
43
|
+
Requires-Dist: tenacity>=8.2
|
|
44
|
+
Requires-Dist: structlog>=24.1
|
|
45
|
+
Provides-Extra: dev
|
|
46
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
47
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
|
|
48
|
+
Requires-Dist: pytest-cov>=4.1; extra == "dev"
|
|
49
|
+
Requires-Dist: ruff>=0.3; extra == "dev"
|
|
50
|
+
Requires-Dist: mypy>=1.8; extra == "dev"
|
|
51
|
+
Requires-Dist: pre-commit>=3.6; extra == "dev"
|
|
52
|
+
Provides-Extra: cloud
|
|
53
|
+
Requires-Dist: boto3>=1.34; extra == "cloud"
|
|
54
|
+
Requires-Dist: azure-identity>=1.15; extra == "cloud"
|
|
55
|
+
Requires-Dist: azure-mgmt-resource>=23.0; extra == "cloud"
|
|
56
|
+
Requires-Dist: google-cloud-storage>=2.14; extra == "cloud"
|
|
57
|
+
Dynamic: license-file
|
|
58
|
+
|
|
59
|
+
<p align="center">
|
|
60
|
+
<img src="assets/transparentbanner.png" alt="pentest-ai">
|
|
61
|
+
</p>
|
|
62
|
+
|
|
63
|
+
<h1 align="center">pentest-ai</h1>
|
|
64
|
+
|
|
65
|
+
<p align="center">
|
|
66
|
+
<strong>MCP server + 10 AI agents + 150+ security tools. One command.</strong>
|
|
67
|
+
</p>
|
|
68
|
+
|
|
69
|
+
<p align="center">
|
|
70
|
+
<a href="https://github.com/0xSteph/pentest-ai/blob/main/LICENSE"><img src="https://img.shields.io/github/license/0xSteph/pentest-ai?color=blue" alt="License"></a>
|
|
71
|
+
<a href="https://pypi.org/project/pentest-ai/"><img src="https://img.shields.io/badge/python-3.10%2B-blue" alt="Python"></a>
|
|
72
|
+
<a href="https://github.com/0xSteph/pentest-ai/releases"><img src="https://img.shields.io/badge/version-1.0.0-green" alt="Version"></a>
|
|
73
|
+
<a href="https://github.com/0xSteph/pentest-ai/stargazers"><img src="https://img.shields.io/github/stars/0xSteph/pentest-ai?style=social" alt="Stars"></a>
|
|
74
|
+
</p>
|
|
75
|
+
|
|
76
|
+
<p align="center">
|
|
77
|
+
<a href="https://pentestai.xyz">Website</a> ·
|
|
78
|
+
<a href="#quick-start">Quick Start</a> ·
|
|
79
|
+
<a href="#agents">Agents</a> ·
|
|
80
|
+
<a href="#tools">150+ Tools</a> ·
|
|
81
|
+
<a href="https://github.com/0xSteph/pentest-ai-agents">Claude Code Agents</a>
|
|
82
|
+
</p>
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
pentest-ai connects AI to 150+ real security tools through the [Model Context Protocol](https://modelcontextprotocol.io). It works with Claude Desktop, Cursor, VS Code Copilot, Windsurf, or any MCP-compatible client.
|
|
87
|
+
|
|
88
|
+
Point it at a target. It runs recon, finds vulnerabilities, chains them into full compromise paths, validates every finding with a working proof of concept, and generates professional reports with detection rules for your blue team.
|
|
89
|
+
|
|
90
|
+
No vendor lock-in. No cloud dependency. Runs locally.
|
|
91
|
+
|
|
92
|
+
## How It Works
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
You: "Run a full assessment against staging.example.com"
|
|
96
|
+
|
|
97
|
+
pentest-ai:
|
|
98
|
+
1. Recon > nmap, subfinder, amass, DNS enum, OSINT
|
|
99
|
+
2. Web scan > nuclei, sqlmap, nikto, ffuf, dalfox
|
|
100
|
+
3. Cloud audit > prowler, ScoutSuite, pacu
|
|
101
|
+
4. AD attack > BloodHound, Impacket, CrackMapExec
|
|
102
|
+
5. Chaining > Links 3 medium findings into domain admin
|
|
103
|
+
6. Validation > Generates safe PoC for each finding
|
|
104
|
+
7. Detection > Sigma + SPL + KQL rules for every attack
|
|
105
|
+
8. Report > Professional markdown/HTML/PDF with CVSS scores
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Quick Start
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
pip install -e .
|
|
112
|
+
pentest-ai start target.example.com
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
That starts the MCP server. Connect from your AI client and start talking to it.
|
|
116
|
+
|
|
117
|
+
### Connect to Claude Desktop
|
|
118
|
+
|
|
119
|
+
Add this to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`):
|
|
120
|
+
|
|
121
|
+
```json
|
|
122
|
+
{
|
|
123
|
+
"mcpServers": {
|
|
124
|
+
"pentest-ai": {
|
|
125
|
+
"command": "pentest-ai",
|
|
126
|
+
"args": ["server", "start"]
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Connect to Cursor / VS Code Copilot
|
|
133
|
+
|
|
134
|
+
Add the same MCP server config in your editor's settings. Any client that speaks MCP will work.
|
|
135
|
+
|
|
136
|
+
## Agents
|
|
137
|
+
|
|
138
|
+
10 specialist agents, each focused on a specific attack surface.
|
|
139
|
+
|
|
140
|
+
| Agent | What It Does |
|
|
141
|
+
|-------|-------------|
|
|
142
|
+
| **Recon** | Port scanning, service fingerprinting, subdomain enum, OSINT |
|
|
143
|
+
| **Web** | SQLi, XSS, SSRF, IDOR, auth bypass, API testing, business logic |
|
|
144
|
+
| **AD** | BloodHound, Kerberoasting, AS-REP, delegation abuse, DCSync |
|
|
145
|
+
| **Cloud** | AWS/Azure/GCP misconfigs, IAM escalation, exposed services |
|
|
146
|
+
| **Mobile** | Android/iOS app analysis, API interception, SSL pinning bypass |
|
|
147
|
+
| **Wireless** | WPA/WPA2/WPA3, evil twin, rogue AP, Bluetooth |
|
|
148
|
+
| **Social Engineer** | Phishing campaign design, pretexting, vishing frameworks |
|
|
149
|
+
| **Exploit Chain** | Correlates findings across agents into multi-step attack paths |
|
|
150
|
+
| **PoC Validator** | Auto-generates safe, non-destructive proofs of concept |
|
|
151
|
+
| **Report + Detection** | Professional reports with Sigma, SPL, and KQL rules |
|
|
152
|
+
|
|
153
|
+
Every agent stores findings in a local SQLite database. Findings persist across sessions and feed into the chaining engine.
|
|
154
|
+
|
|
155
|
+
## Tools
|
|
156
|
+
|
|
157
|
+
158 security tools organized into 6 categories. pentest-ai wraps each tool with structured output parsing so findings flow directly into the database.
|
|
158
|
+
|
|
159
|
+
<details>
|
|
160
|
+
<summary><strong>Network (30+ tools)</strong></summary>
|
|
161
|
+
|
|
162
|
+
nmap, masscan, rustscan, netcat, hping3, arping, tcpdump, Wireshark (tshark), responder, mitm6, bettercap, ettercap, arpwatch, nbtscan, enum4linux, smbclient, rpcclient, ldapsearch, snmpwalk, onesixtyone, fierce, dnsrecon, dnsenum, dig, whois, traceroute, mtr, ping, netdiscover, fping
|
|
163
|
+
|
|
164
|
+
</details>
|
|
165
|
+
|
|
166
|
+
<details>
|
|
167
|
+
<summary><strong>Web (40+ tools)</strong></summary>
|
|
168
|
+
|
|
169
|
+
nuclei, sqlmap, nikto, gobuster, ffuf, feroxbuster, dirb, dirbuster, wfuzz, dalfox, xsstrike, commix, ssrfmap, tplmap, arjun, paramspider, waybackurls, gau, httpx, httprobe, whatweb, wappalyzer, wafw00f, burpsuite, zaproxy, w3af, arachni, skipfish, wpscan, joomscan, droopescan, cmsmap, testssl, sslscan, sslyze, jwt_tool, graphqlmap, postman, curl, wget
|
|
170
|
+
|
|
171
|
+
</details>
|
|
172
|
+
|
|
173
|
+
<details>
|
|
174
|
+
<summary><strong>Password (20+ tools)</strong></summary>
|
|
175
|
+
|
|
176
|
+
hydra, hashcat, john, medusa, ncrack, patator, cewl, crunch, cupp, mentalist, ophcrack, fcrackzip, pdfcrack, rarcrack, aircrack-ng, cowpatty, hash-identifier, haiti, name-that-hash, kerbrute
|
|
177
|
+
|
|
178
|
+
</details>
|
|
179
|
+
|
|
180
|
+
<details>
|
|
181
|
+
<summary><strong>Binary (15+ tools)</strong></summary>
|
|
182
|
+
|
|
183
|
+
checksec, gdb, radare2, ghidra, objdump, strace, ltrace, file, strings, binwalk, foremost, volatility, ropper, ROPgadget, pwntools
|
|
184
|
+
|
|
185
|
+
</details>
|
|
186
|
+
|
|
187
|
+
<details>
|
|
188
|
+
<summary><strong>Cloud (20+ tools)</strong></summary>
|
|
189
|
+
|
|
190
|
+
prowler, ScoutSuite, pacu, enumerate-iam, cloudfox, cloudsplaining, pmapper, steampipe, trivy, grype, syft, kube-hunter, kubeaudit, kubectl, docker, crane, cosign, falco, tracee, tetragon
|
|
191
|
+
|
|
192
|
+
</details>
|
|
193
|
+
|
|
194
|
+
<details>
|
|
195
|
+
<summary><strong>OSINT (25+ tools)</strong></summary>
|
|
196
|
+
|
|
197
|
+
theHarvester, sherlock, recon-ng, maltego, spiderfoot, amass, subfinder, assetfinder, findomain, massdns, puredns, shuffledns, crt.sh, shodan, censys, zoomeye, hunter.io, phonebook, dehashed, h8mail, trufflehog, gitleaks, git-secrets, gitrob, shhgit
|
|
198
|
+
|
|
199
|
+
</details>
|
|
200
|
+
|
|
201
|
+
### Built-in Scanners (Zero Dependencies)
|
|
202
|
+
|
|
203
|
+
Don't have nmap installed? pentest-ai includes built-in scanners that work immediately:
|
|
204
|
+
|
|
205
|
+
- **Port scanner** (async TCP connect)
|
|
206
|
+
- **HTTP header analyzer** (missing security headers, CORS, cookies)
|
|
207
|
+
- **SSL/TLS checker** (expiry, weak ciphers, deprecated protocols)
|
|
208
|
+
- **Path discovery** (admin panels, backups, .env files, .git exposure)
|
|
209
|
+
- **DNS enumerator** (A records, subdomain brute-force)
|
|
210
|
+
- **Secret scanner** (AWS keys, GitHub tokens, JWTs, connection strings in responses)
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
# Works with zero external tools installed
|
|
214
|
+
pentest-ai start target.example.com --scope recon
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## Exploit Chaining
|
|
218
|
+
|
|
219
|
+
Most scanners give you a list of isolated findings. pentest-ai connects them.
|
|
220
|
+
|
|
221
|
+
Example: 5 medium-severity findings individually look minor. The chaining engine discovers they connect into a path from unauthenticated user to domain admin.
|
|
222
|
+
|
|
223
|
+
```
|
|
224
|
+
SSRF in /api/internal > Read cloud metadata > AWS keys
|
|
225
|
+
> Lateral move to staging DB > Extract AD service account creds
|
|
226
|
+
> Kerberoast > Crack hash > Domain Admin
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Each chain is validated with a working PoC before it shows up in your report.
|
|
230
|
+
|
|
231
|
+
## Architecture
|
|
232
|
+
|
|
233
|
+
```
|
|
234
|
+
pentest-ai/
|
|
235
|
+
├── mcp_server/ # FastMCP server, exposes all tools via MCP protocol
|
|
236
|
+
├── agents/ # 10 specialist Python agents
|
|
237
|
+
├── tools/ # 158 tool wrappers with output parsers
|
|
238
|
+
├── engine/ # Orchestrator + findings DB + built-in scanners
|
|
239
|
+
├── cli/ # CLI interface (Typer + Rich)
|
|
240
|
+
├── config/ # YAML config
|
|
241
|
+
└── tests/ # Test suite
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
## Configuration
|
|
245
|
+
|
|
246
|
+
```yaml
|
|
247
|
+
# config/pentest-ai.yaml
|
|
248
|
+
llm:
|
|
249
|
+
provider: openai # or anthropic, ollama
|
|
250
|
+
model: gpt-4o
|
|
251
|
+
temperature: 0.0
|
|
252
|
+
|
|
253
|
+
agent:
|
|
254
|
+
auto_chain: true
|
|
255
|
+
auto_validate_pocs: true
|
|
256
|
+
auto_generate_detections: true
|
|
257
|
+
hitl_mode: true # Human approval before exploitation
|
|
258
|
+
|
|
259
|
+
scope:
|
|
260
|
+
allowed_targets: []
|
|
261
|
+
excluded_targets: []
|
|
262
|
+
max_depth: 3
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
## MCP Tools Reference
|
|
266
|
+
|
|
267
|
+
| Tool | Description |
|
|
268
|
+
|------|-------------|
|
|
269
|
+
| `start_engagement` | Begin a full pentest against a target |
|
|
270
|
+
| `run_recon` | Reconnaissance (passive, standard, deep) |
|
|
271
|
+
| `test_web_app` | Web application security testing |
|
|
272
|
+
| `test_active_directory` | AD security assessment |
|
|
273
|
+
| `test_cloud` | Cloud provider security audit |
|
|
274
|
+
| `run_tool` | Run any of the 158 tools directly |
|
|
275
|
+
| `discover_attack_chains` | Find exploit chains from existing findings |
|
|
276
|
+
| `validate_finding` | Generate a safe PoC for a specific finding |
|
|
277
|
+
| `generate_detection_rules` | Create Sigma/SPL/KQL rules |
|
|
278
|
+
| `generate_report` | Professional report (markdown, HTML, PDF, JSON) |
|
|
279
|
+
| `builtin_scan` | Run built-in scans (no external tools needed) |
|
|
280
|
+
| `get_findings` | Query findings by severity, status, engagement |
|
|
281
|
+
|
|
282
|
+
## Claude Code Agents
|
|
283
|
+
|
|
284
|
+
Looking for the Claude Code version? **[pentest-ai-agents](https://github.com/0xSteph/pentest-ai-agents)** has 28 specialized Claude Code subagents for penetration testing. No server, no dependencies. Copy `.md` files into Claude Code and go.
|
|
285
|
+
|
|
286
|
+
| | pentest-ai (this repo) | pentest-ai-agents |
|
|
287
|
+
|---|---|---|
|
|
288
|
+
| **Type** | MCP server + Python agents | Claude Code subagents |
|
|
289
|
+
| **Works with** | Any MCP client (Claude, Cursor, Copilot, etc.) | Claude Code only |
|
|
290
|
+
| **Tools** | 158 tool wrappers with output parsing | Uses whatever tools are on your system |
|
|
291
|
+
| **Install** | `pip install -e .` | Copy `.md` files |
|
|
292
|
+
| **Best for** | Automated assessments, CI/CD integration | Interactive pentesting, learning, CTFs |
|
|
293
|
+
|
|
294
|
+
## Requirements
|
|
295
|
+
|
|
296
|
+
- Python 3.10+
|
|
297
|
+
- An MCP-compatible AI client (Claude Desktop, Cursor, VS Code Copilot, etc.)
|
|
298
|
+
- Security tools you want to use (optional, built-in scanners work without any)
|
|
299
|
+
|
|
300
|
+
## Development
|
|
301
|
+
|
|
302
|
+
```bash
|
|
303
|
+
git clone https://github.com/0xSteph/pentest-ai.git
|
|
304
|
+
cd pentest-ai
|
|
305
|
+
pip install -e ".[dev]"
|
|
306
|
+
pytest tests/ -v
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
## FAQ
|
|
310
|
+
|
|
311
|
+
**Does this replace manual pentesting?**
|
|
312
|
+
No. It accelerates it. The agents handle recon, scanning, and correlation. You make the decisions about what to exploit and how deep to go. Human-in-the-loop is on by default.
|
|
313
|
+
|
|
314
|
+
**Is my data sent to the cloud?**
|
|
315
|
+
No. Everything runs locally. The only external calls are to whatever LLM provider you configure (OpenAI, Anthropic, or a local model via Ollama).
|
|
316
|
+
|
|
317
|
+
**Can I add my own tools?**
|
|
318
|
+
Yes. Add a `SecurityTool` entry in `tools/registry.py` with a command template and output parser. The tool is immediately available through the MCP server.
|
|
319
|
+
|
|
320
|
+
**What about false positives?**
|
|
321
|
+
The PoC validator generates a safe proof of concept for every finding. If the PoC fails, the finding is flagged as unconfirmed. Only validated findings appear in the final report.
|
|
322
|
+
|
|
323
|
+
## For Teams: pentest-ai Enterprise
|
|
324
|
+
|
|
325
|
+
pentest-ai is fully open source. Every feature runs locally, no auth required. If you're an individual or a small team comfortable with the CLI, you're done — you have everything.
|
|
326
|
+
|
|
327
|
+
**pentest-ai Enterprise** ($499/mo) is a hosted dashboard for security teams, MSSPs, and consultancies that need:
|
|
328
|
+
|
|
329
|
+
- Shared team workspace with role-based access (Owner, Admin, Member)
|
|
330
|
+
- SSO / OIDC (Okta, Azure AD, Google Workspace)
|
|
331
|
+
- Compliance mapping (SOC 2, ISO 27001, PCI DSS, HIPAA, NIST)
|
|
332
|
+
- Audit logs for regulated environments
|
|
333
|
+
- Scheduled and recurring scans
|
|
334
|
+
- Executive and technical PDF reports
|
|
335
|
+
- MITRE ATT&CK coverage dashboards
|
|
336
|
+
- Attack surface monitoring
|
|
337
|
+
- Integrations (Jira, Slack, GitHub, Teams)
|
|
338
|
+
- White-label branding
|
|
339
|
+
|
|
340
|
+
Everything the CLI does is free forever. Enterprise exists for teams that need to collaborate at scale.
|
|
341
|
+
|
|
342
|
+
[Start a trial at app.pentestai.xyz](https://app.pentestai.xyz) · [Contact sales](mailto:sales@pentestai.xyz)
|
|
343
|
+
|
|
344
|
+
## Legal
|
|
345
|
+
|
|
346
|
+
This tool is for **authorized security testing only**. Always get written permission before testing any system you don't own. See [LICENSE](LICENSE) for the MIT license.
|
|
347
|
+
|
|
348
|
+
---
|
|
349
|
+
|
|
350
|
+
<p align="center">
|
|
351
|
+
Built by <a href="https://github.com/0xSteph">0xSteph</a> ·
|
|
352
|
+
<a href="https://pentestai.xyz">pentestai.xyz</a> ·
|
|
353
|
+
<a href="https://github.com/0xSteph/pentest-ai-agents">Claude Code Agents</a>
|
|
354
|
+
</p>
|
ptai-0.8.0/README.md
ADDED
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/transparentbanner.png" alt="pentest-ai">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">pentest-ai</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<strong>MCP server + 10 AI agents + 150+ security tools. One command.</strong>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://github.com/0xSteph/pentest-ai/blob/main/LICENSE"><img src="https://img.shields.io/github/license/0xSteph/pentest-ai?color=blue" alt="License"></a>
|
|
13
|
+
<a href="https://pypi.org/project/pentest-ai/"><img src="https://img.shields.io/badge/python-3.10%2B-blue" alt="Python"></a>
|
|
14
|
+
<a href="https://github.com/0xSteph/pentest-ai/releases"><img src="https://img.shields.io/badge/version-1.0.0-green" alt="Version"></a>
|
|
15
|
+
<a href="https://github.com/0xSteph/pentest-ai/stargazers"><img src="https://img.shields.io/github/stars/0xSteph/pentest-ai?style=social" alt="Stars"></a>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<p align="center">
|
|
19
|
+
<a href="https://pentestai.xyz">Website</a> ·
|
|
20
|
+
<a href="#quick-start">Quick Start</a> ·
|
|
21
|
+
<a href="#agents">Agents</a> ·
|
|
22
|
+
<a href="#tools">150+ Tools</a> ·
|
|
23
|
+
<a href="https://github.com/0xSteph/pentest-ai-agents">Claude Code Agents</a>
|
|
24
|
+
</p>
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
pentest-ai connects AI to 150+ real security tools through the [Model Context Protocol](https://modelcontextprotocol.io). It works with Claude Desktop, Cursor, VS Code Copilot, Windsurf, or any MCP-compatible client.
|
|
29
|
+
|
|
30
|
+
Point it at a target. It runs recon, finds vulnerabilities, chains them into full compromise paths, validates every finding with a working proof of concept, and generates professional reports with detection rules for your blue team.
|
|
31
|
+
|
|
32
|
+
No vendor lock-in. No cloud dependency. Runs locally.
|
|
33
|
+
|
|
34
|
+
## How It Works
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
You: "Run a full assessment against staging.example.com"
|
|
38
|
+
|
|
39
|
+
pentest-ai:
|
|
40
|
+
1. Recon > nmap, subfinder, amass, DNS enum, OSINT
|
|
41
|
+
2. Web scan > nuclei, sqlmap, nikto, ffuf, dalfox
|
|
42
|
+
3. Cloud audit > prowler, ScoutSuite, pacu
|
|
43
|
+
4. AD attack > BloodHound, Impacket, CrackMapExec
|
|
44
|
+
5. Chaining > Links 3 medium findings into domain admin
|
|
45
|
+
6. Validation > Generates safe PoC for each finding
|
|
46
|
+
7. Detection > Sigma + SPL + KQL rules for every attack
|
|
47
|
+
8. Report > Professional markdown/HTML/PDF with CVSS scores
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Quick Start
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pip install -e .
|
|
54
|
+
pentest-ai start target.example.com
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
That starts the MCP server. Connect from your AI client and start talking to it.
|
|
58
|
+
|
|
59
|
+
### Connect to Claude Desktop
|
|
60
|
+
|
|
61
|
+
Add this to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`):
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"mcpServers": {
|
|
66
|
+
"pentest-ai": {
|
|
67
|
+
"command": "pentest-ai",
|
|
68
|
+
"args": ["server", "start"]
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Connect to Cursor / VS Code Copilot
|
|
75
|
+
|
|
76
|
+
Add the same MCP server config in your editor's settings. Any client that speaks MCP will work.
|
|
77
|
+
|
|
78
|
+
## Agents
|
|
79
|
+
|
|
80
|
+
10 specialist agents, each focused on a specific attack surface.
|
|
81
|
+
|
|
82
|
+
| Agent | What It Does |
|
|
83
|
+
|-------|-------------|
|
|
84
|
+
| **Recon** | Port scanning, service fingerprinting, subdomain enum, OSINT |
|
|
85
|
+
| **Web** | SQLi, XSS, SSRF, IDOR, auth bypass, API testing, business logic |
|
|
86
|
+
| **AD** | BloodHound, Kerberoasting, AS-REP, delegation abuse, DCSync |
|
|
87
|
+
| **Cloud** | AWS/Azure/GCP misconfigs, IAM escalation, exposed services |
|
|
88
|
+
| **Mobile** | Android/iOS app analysis, API interception, SSL pinning bypass |
|
|
89
|
+
| **Wireless** | WPA/WPA2/WPA3, evil twin, rogue AP, Bluetooth |
|
|
90
|
+
| **Social Engineer** | Phishing campaign design, pretexting, vishing frameworks |
|
|
91
|
+
| **Exploit Chain** | Correlates findings across agents into multi-step attack paths |
|
|
92
|
+
| **PoC Validator** | Auto-generates safe, non-destructive proofs of concept |
|
|
93
|
+
| **Report + Detection** | Professional reports with Sigma, SPL, and KQL rules |
|
|
94
|
+
|
|
95
|
+
Every agent stores findings in a local SQLite database. Findings persist across sessions and feed into the chaining engine.
|
|
96
|
+
|
|
97
|
+
## Tools
|
|
98
|
+
|
|
99
|
+
158 security tools organized into 6 categories. pentest-ai wraps each tool with structured output parsing so findings flow directly into the database.
|
|
100
|
+
|
|
101
|
+
<details>
|
|
102
|
+
<summary><strong>Network (30+ tools)</strong></summary>
|
|
103
|
+
|
|
104
|
+
nmap, masscan, rustscan, netcat, hping3, arping, tcpdump, Wireshark (tshark), responder, mitm6, bettercap, ettercap, arpwatch, nbtscan, enum4linux, smbclient, rpcclient, ldapsearch, snmpwalk, onesixtyone, fierce, dnsrecon, dnsenum, dig, whois, traceroute, mtr, ping, netdiscover, fping
|
|
105
|
+
|
|
106
|
+
</details>
|
|
107
|
+
|
|
108
|
+
<details>
|
|
109
|
+
<summary><strong>Web (40+ tools)</strong></summary>
|
|
110
|
+
|
|
111
|
+
nuclei, sqlmap, nikto, gobuster, ffuf, feroxbuster, dirb, dirbuster, wfuzz, dalfox, xsstrike, commix, ssrfmap, tplmap, arjun, paramspider, waybackurls, gau, httpx, httprobe, whatweb, wappalyzer, wafw00f, burpsuite, zaproxy, w3af, arachni, skipfish, wpscan, joomscan, droopescan, cmsmap, testssl, sslscan, sslyze, jwt_tool, graphqlmap, postman, curl, wget
|
|
112
|
+
|
|
113
|
+
</details>
|
|
114
|
+
|
|
115
|
+
<details>
|
|
116
|
+
<summary><strong>Password (20+ tools)</strong></summary>
|
|
117
|
+
|
|
118
|
+
hydra, hashcat, john, medusa, ncrack, patator, cewl, crunch, cupp, mentalist, ophcrack, fcrackzip, pdfcrack, rarcrack, aircrack-ng, cowpatty, hash-identifier, haiti, name-that-hash, kerbrute
|
|
119
|
+
|
|
120
|
+
</details>
|
|
121
|
+
|
|
122
|
+
<details>
|
|
123
|
+
<summary><strong>Binary (15+ tools)</strong></summary>
|
|
124
|
+
|
|
125
|
+
checksec, gdb, radare2, ghidra, objdump, strace, ltrace, file, strings, binwalk, foremost, volatility, ropper, ROPgadget, pwntools
|
|
126
|
+
|
|
127
|
+
</details>
|
|
128
|
+
|
|
129
|
+
<details>
|
|
130
|
+
<summary><strong>Cloud (20+ tools)</strong></summary>
|
|
131
|
+
|
|
132
|
+
prowler, ScoutSuite, pacu, enumerate-iam, cloudfox, cloudsplaining, pmapper, steampipe, trivy, grype, syft, kube-hunter, kubeaudit, kubectl, docker, crane, cosign, falco, tracee, tetragon
|
|
133
|
+
|
|
134
|
+
</details>
|
|
135
|
+
|
|
136
|
+
<details>
|
|
137
|
+
<summary><strong>OSINT (25+ tools)</strong></summary>
|
|
138
|
+
|
|
139
|
+
theHarvester, sherlock, recon-ng, maltego, spiderfoot, amass, subfinder, assetfinder, findomain, massdns, puredns, shuffledns, crt.sh, shodan, censys, zoomeye, hunter.io, phonebook, dehashed, h8mail, trufflehog, gitleaks, git-secrets, gitrob, shhgit
|
|
140
|
+
|
|
141
|
+
</details>
|
|
142
|
+
|
|
143
|
+
### Built-in Scanners (Zero Dependencies)
|
|
144
|
+
|
|
145
|
+
Don't have nmap installed? pentest-ai includes built-in scanners that work immediately:
|
|
146
|
+
|
|
147
|
+
- **Port scanner** (async TCP connect)
|
|
148
|
+
- **HTTP header analyzer** (missing security headers, CORS, cookies)
|
|
149
|
+
- **SSL/TLS checker** (expiry, weak ciphers, deprecated protocols)
|
|
150
|
+
- **Path discovery** (admin panels, backups, .env files, .git exposure)
|
|
151
|
+
- **DNS enumerator** (A records, subdomain brute-force)
|
|
152
|
+
- **Secret scanner** (AWS keys, GitHub tokens, JWTs, connection strings in responses)
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
# Works with zero external tools installed
|
|
156
|
+
pentest-ai start target.example.com --scope recon
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Exploit Chaining
|
|
160
|
+
|
|
161
|
+
Most scanners give you a list of isolated findings. pentest-ai connects them.
|
|
162
|
+
|
|
163
|
+
Example: 5 medium-severity findings individually look minor. The chaining engine discovers they connect into a path from unauthenticated user to domain admin.
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
SSRF in /api/internal > Read cloud metadata > AWS keys
|
|
167
|
+
> Lateral move to staging DB > Extract AD service account creds
|
|
168
|
+
> Kerberoast > Crack hash > Domain Admin
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Each chain is validated with a working PoC before it shows up in your report.
|
|
172
|
+
|
|
173
|
+
## Architecture
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
pentest-ai/
|
|
177
|
+
├── mcp_server/ # FastMCP server, exposes all tools via MCP protocol
|
|
178
|
+
├── agents/ # 10 specialist Python agents
|
|
179
|
+
├── tools/ # 158 tool wrappers with output parsers
|
|
180
|
+
├── engine/ # Orchestrator + findings DB + built-in scanners
|
|
181
|
+
├── cli/ # CLI interface (Typer + Rich)
|
|
182
|
+
├── config/ # YAML config
|
|
183
|
+
└── tests/ # Test suite
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Configuration
|
|
187
|
+
|
|
188
|
+
```yaml
|
|
189
|
+
# config/pentest-ai.yaml
|
|
190
|
+
llm:
|
|
191
|
+
provider: openai # or anthropic, ollama
|
|
192
|
+
model: gpt-4o
|
|
193
|
+
temperature: 0.0
|
|
194
|
+
|
|
195
|
+
agent:
|
|
196
|
+
auto_chain: true
|
|
197
|
+
auto_validate_pocs: true
|
|
198
|
+
auto_generate_detections: true
|
|
199
|
+
hitl_mode: true # Human approval before exploitation
|
|
200
|
+
|
|
201
|
+
scope:
|
|
202
|
+
allowed_targets: []
|
|
203
|
+
excluded_targets: []
|
|
204
|
+
max_depth: 3
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## MCP Tools Reference
|
|
208
|
+
|
|
209
|
+
| Tool | Description |
|
|
210
|
+
|------|-------------|
|
|
211
|
+
| `start_engagement` | Begin a full pentest against a target |
|
|
212
|
+
| `run_recon` | Reconnaissance (passive, standard, deep) |
|
|
213
|
+
| `test_web_app` | Web application security testing |
|
|
214
|
+
| `test_active_directory` | AD security assessment |
|
|
215
|
+
| `test_cloud` | Cloud provider security audit |
|
|
216
|
+
| `run_tool` | Run any of the 158 tools directly |
|
|
217
|
+
| `discover_attack_chains` | Find exploit chains from existing findings |
|
|
218
|
+
| `validate_finding` | Generate a safe PoC for a specific finding |
|
|
219
|
+
| `generate_detection_rules` | Create Sigma/SPL/KQL rules |
|
|
220
|
+
| `generate_report` | Professional report (markdown, HTML, PDF, JSON) |
|
|
221
|
+
| `builtin_scan` | Run built-in scans (no external tools needed) |
|
|
222
|
+
| `get_findings` | Query findings by severity, status, engagement |
|
|
223
|
+
|
|
224
|
+
## Claude Code Agents
|
|
225
|
+
|
|
226
|
+
Looking for the Claude Code version? **[pentest-ai-agents](https://github.com/0xSteph/pentest-ai-agents)** has 28 specialized Claude Code subagents for penetration testing. No server, no dependencies. Copy `.md` files into Claude Code and go.
|
|
227
|
+
|
|
228
|
+
| | pentest-ai (this repo) | pentest-ai-agents |
|
|
229
|
+
|---|---|---|
|
|
230
|
+
| **Type** | MCP server + Python agents | Claude Code subagents |
|
|
231
|
+
| **Works with** | Any MCP client (Claude, Cursor, Copilot, etc.) | Claude Code only |
|
|
232
|
+
| **Tools** | 158 tool wrappers with output parsing | Uses whatever tools are on your system |
|
|
233
|
+
| **Install** | `pip install -e .` | Copy `.md` files |
|
|
234
|
+
| **Best for** | Automated assessments, CI/CD integration | Interactive pentesting, learning, CTFs |
|
|
235
|
+
|
|
236
|
+
## Requirements
|
|
237
|
+
|
|
238
|
+
- Python 3.10+
|
|
239
|
+
- An MCP-compatible AI client (Claude Desktop, Cursor, VS Code Copilot, etc.)
|
|
240
|
+
- Security tools you want to use (optional, built-in scanners work without any)
|
|
241
|
+
|
|
242
|
+
## Development
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
git clone https://github.com/0xSteph/pentest-ai.git
|
|
246
|
+
cd pentest-ai
|
|
247
|
+
pip install -e ".[dev]"
|
|
248
|
+
pytest tests/ -v
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
## FAQ
|
|
252
|
+
|
|
253
|
+
**Does this replace manual pentesting?**
|
|
254
|
+
No. It accelerates it. The agents handle recon, scanning, and correlation. You make the decisions about what to exploit and how deep to go. Human-in-the-loop is on by default.
|
|
255
|
+
|
|
256
|
+
**Is my data sent to the cloud?**
|
|
257
|
+
No. Everything runs locally. The only external calls are to whatever LLM provider you configure (OpenAI, Anthropic, or a local model via Ollama).
|
|
258
|
+
|
|
259
|
+
**Can I add my own tools?**
|
|
260
|
+
Yes. Add a `SecurityTool` entry in `tools/registry.py` with a command template and output parser. The tool is immediately available through the MCP server.
|
|
261
|
+
|
|
262
|
+
**What about false positives?**
|
|
263
|
+
The PoC validator generates a safe proof of concept for every finding. If the PoC fails, the finding is flagged as unconfirmed. Only validated findings appear in the final report.
|
|
264
|
+
|
|
265
|
+
## For Teams: pentest-ai Enterprise
|
|
266
|
+
|
|
267
|
+
pentest-ai is fully open source. Every feature runs locally, no auth required. If you're an individual or a small team comfortable with the CLI, you're done — you have everything.
|
|
268
|
+
|
|
269
|
+
**pentest-ai Enterprise** ($499/mo) is a hosted dashboard for security teams, MSSPs, and consultancies that need:
|
|
270
|
+
|
|
271
|
+
- Shared team workspace with role-based access (Owner, Admin, Member)
|
|
272
|
+
- SSO / OIDC (Okta, Azure AD, Google Workspace)
|
|
273
|
+
- Compliance mapping (SOC 2, ISO 27001, PCI DSS, HIPAA, NIST)
|
|
274
|
+
- Audit logs for regulated environments
|
|
275
|
+
- Scheduled and recurring scans
|
|
276
|
+
- Executive and technical PDF reports
|
|
277
|
+
- MITRE ATT&CK coverage dashboards
|
|
278
|
+
- Attack surface monitoring
|
|
279
|
+
- Integrations (Jira, Slack, GitHub, Teams)
|
|
280
|
+
- White-label branding
|
|
281
|
+
|
|
282
|
+
Everything the CLI does is free forever. Enterprise exists for teams that need to collaborate at scale.
|
|
283
|
+
|
|
284
|
+
[Start a trial at app.pentestai.xyz](https://app.pentestai.xyz) · [Contact sales](mailto:sales@pentestai.xyz)
|
|
285
|
+
|
|
286
|
+
## Legal
|
|
287
|
+
|
|
288
|
+
This tool is for **authorized security testing only**. Always get written permission before testing any system you don't own. See [LICENSE](LICENSE) for the MIT license.
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
<p align="center">
|
|
293
|
+
Built by <a href="https://github.com/0xSteph">0xSteph</a> ·
|
|
294
|
+
<a href="https://pentestai.xyz">pentestai.xyz</a> ·
|
|
295
|
+
<a href="https://github.com/0xSteph/pentest-ai-agents">Claude Code Agents</a>
|
|
296
|
+
</p>
|
|
File without changes
|
|
File without changes
|