pentesting 0.1.0 → 0.1.2

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.
package/README.md CHANGED
@@ -1,210 +1,167 @@
1
- # Pentest
1
+ # Pentesting
2
2
 
3
- Autonomous Penetration Testing AI Agent.
3
+ > 🎯 DEF CON-level Autonomous Penetration Testing AI Agent
4
4
 
5
- ```
6
- ██████╗ ███████╗███╗ ██╗████████╗███████╗███████╗████████╗
7
- ██╔══██╗██╔════╝████╗ ██║╚══██╔══╝██╔════╝██╔════╝╚══██╔══╝
8
- ██████╔╝█████╗ ██╔██╗ ██║ ██║ █████╗ ███████╗ ██║
9
- ██╔═══╝ ██╔══╝ ██║╚██╗██║ ██║ ██╔══╝ ╚════██║ ██║
10
- ██║ ███████╗██║ ╚████║ ██║ ███████╗███████║ ██║
11
- ╚═╝ ╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝╚══════╝ ╚═╝
12
- ```
13
-
14
- ## Features
5
+ <p align="center">
6
+ <img src="assets/logo.png" alt="Pentesting Logo" width="200"/>
7
+ </p>
15
8
 
16
- - **Autonomous AI Agent**: Analyzes, plans, executes tools, and interprets results automatically
17
- - **PTES Methodology**: Systematic penetration testing following industry standards
18
- - **30+ Integrated Tools**: Nmap, SQLmap, Metasploit, Burp Suite, and more
19
- - **Privilege Escalation**: Built-in Linux/Windows rooting techniques
20
- - **Rabbit Hole Detection**: Self-reflection when stuck, tries alternative approaches
21
- - **Real-time Thinking Display**: Watch the agent's thought process in TUI
9
+ [![npm version](https://badge.fury.io/js/pentesting.svg)](https://www.npmjs.com/package/pentesting)
10
+ [![Docker](https://img.shields.io/badge/Docker-pentesting--tools-blue)](https://hub.docker.com/r/agnusdei1207/pentesting-tools)
22
11
 
23
- ## Requirements
12
+ ## Features
24
13
 
25
- - Node.js 18+
26
- - Anthropic API Key
27
- - Kali Linux or macOS (for pentesting tools)
14
+ - **7-Phase Workflow**: Recon → Enum → Vuln Analysis → Exploitation → PrivEsc → Lateral → Reporting
15
+ - **Parallel Agent Orchestration**: 2-4 specialized agents working simultaneously
16
+ - **Ralph-Style Loops**: Self-referential iteration until objective completion
17
+ - **Confidence Scoring**: Findings rated 0-100 to filter false positives
18
+ - **MCP Integration**: Model Context Protocol for extended tool capabilities
19
+ - **Docker Toolkit**: 50+ pre-installed pentesting tools
28
20
 
29
- ## Installation
21
+ ## Quick Start
30
22
 
31
- ### 1. Clone and Install
23
+ ### Install
32
24
 
33
25
  ```bash
34
- git clone https://github.com/agnusdei1207/pentesting.git
35
- cd pentesting
36
- npm install
26
+ npm install -g pentesting
37
27
  ```
38
28
 
39
- ### 2. Install SecLists and Wordlists
29
+ ### Configure
40
30
 
41
31
  ```bash
42
- # SecLists (required for directory bruteforce, fuzzing, etc.)
43
- git clone --depth 1 https://github.com/danielmiessler/SecLists.git /opt/SecLists
44
-
45
- # Alternative: Using apt (Kali/Debian)
46
- sudo apt install -y seclists
47
-
48
- # RockYou wordlist (for password cracking)
49
- sudo apt install -y wordlists
50
- sudo gunzip /usr/share/wordlists/rockyou.txt.gz 2>/dev/null || true
32
+ export ANTHROPIC_API_KEY=your_api_key
51
33
  ```
52
34
 
53
- ### 3. Install Pentest Tools
35
+ ### Run
54
36
 
55
37
  ```bash
56
- # Core tools
57
- sudo apt install -y nmap masscan gobuster nikto sqlmap hydra john hashcat
58
-
59
- # Web tools
60
- sudo apt install -y ffuf nuclei whatweb wfuzz
61
-
62
- # Exploitation
63
- sudo apt install -y metasploit-framework exploitdb
64
-
65
- # Post-exploitation
66
- sudo apt install -y crackmapexec evil-winrm impacket-scripts chisel
67
-
68
- # Browser automation
69
- npm install -g playwright
70
- npx playwright install chromium
38
+ pentesting
39
+ # or
40
+ npx pentesting
71
41
  ```
72
42
 
73
- ### 4. Set API Key
43
+ ## Docker Environment
74
44
 
75
45
  ```bash
76
- export ANTHROPIC_API_KEY="your-api-key"
77
- ```
46
+ # Pull pre-built toolkit (50+ tools)
47
+ docker pull agnusdei1207/pentesting-tools:latest
78
48
 
79
- ## Build
49
+ # Run with host network (required for target access)
50
+ docker run -d --name pentesting-tools --network host \
51
+ -v $(pwd)/workspace:/pentest \
52
+ agnusdei1207/pentesting-tools:latest
80
53
 
81
- ```bash
82
- npm run build
54
+ # Execute tools
55
+ docker exec -it pentesting-tools nmap -sCV 10.0.0.1
83
56
  ```
84
57
 
85
- ## Global Installation
58
+ ## Plugin System
59
+
60
+ Based on Claude-Code plugin architecture:
86
61
 
87
- ```bash
88
- npm run build
89
- npm link
62
+ ```
63
+ plugins/pentesting-core/
64
+ ├── agents/ # 9 specialized AI agents
65
+ ├── commands/ # 5 slash commands
66
+ ├── hooks/ # Event handlers
67
+ └── skills/ # 9 domain skills
90
68
  ```
91
69
 
92
- Now you can run `pentesting` from anywhere.
70
+ ### Agents
93
71
 
94
- ## Usage
72
+ | Agent | Specialty |
73
+ |-------|-----------|
74
+ | target-explorer | Reconnaissance |
75
+ | exploit-researcher | CVE/Exploit research |
76
+ | privesc-master | Privilege escalation |
77
+ | web-hacker | OWASP Top 10 |
78
+ | crypto-solver | Cryptography |
79
+ | forensics-analyst | Digital forensics |
80
+ | reverse-engineer | Binary analysis |
81
+ | attack-architect | Strategy planning |
82
+ | finding-reviewer | Validation |
95
83
 
96
- ### Quick Start
84
+ ### Commands
97
85
 
98
86
  ```bash
99
- # Interactive mode
100
- pentesting
101
-
102
- # With target
103
- pentesting -t 192.168.1.1
104
-
105
- # Auto-approve all tools (dangerous!)
106
- pentesting --dangerously-skip-permissions
87
+ /pentest-loop <target> <objective> # Autonomous attack loop
88
+ /scan <target> # Quick enumeration
89
+ /exploit <query> # Search/run exploits
90
+ /vuln-review # Review findings
107
91
  ```
108
92
 
109
- ### CLI Commands
110
-
111
- | Command | Description |
112
- |---------|-------------|
113
- | `pentesting` | Start interactive TUI |
114
- | `pentesting -t <ip>` | Start with target |
115
- | `pentesting --dangerously-skip-permissions` | Auto-approve all tool executions |
116
- | `pentesting run <objective>` | Run single objective |
117
- | `pentesting scan <target>` | Quick scan target |
93
+ ## Architecture
118
94
 
119
- ### Interactive Commands
95
+ ```
96
+ ┌──────────────────────────────────────────────────────────────┐
97
+ │ AutonomousHackingAgent │
98
+ ├──────────────────────────────────────────────────────────────┤
99
+ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
100
+ │ │ Claude │ │ Plugin │ │ MCP │ │
101
+ │ │ API │ │ System │ │ Client │ │
102
+ │ └─────────────┘ └─────────────┘ └─────────────┘ │
103
+ │ │ │ │ │
104
+ │ ┌──────┴────────────────┴────────────────┴───────┐ │
105
+ │ │ Tool Executor │ │
106
+ │ │ (bash, nmap, sqlmap, msfconsole, etc.) │ │
107
+ │ └─────────────────────────────────────────────────┘ │
108
+ ├──────────────────────────────────────────────────────────────┤
109
+ │ Hook System │ Command Parser │ Web Search │ Agents │
110
+ └──────────────────────────────────────────────────────────────┘
111
+ ```
120
112
 
121
- | Command | Description |
122
- |---------|-------------|
123
- | `/target <ip>` | Set target IP or hostname |
124
- | `/start` | Start autonomous mode |
125
- | `/start <objective>` | Start with specific objective |
126
- | `/hint <text>` | Provide hint to agent |
127
- | `/pause` | Pause execution |
128
- | `/resume` | Resume execution |
129
- | `/findings` | Show discovered vulnerabilities |
130
- | `/reset` | Reset session |
113
+ ## Configuration
114
+
115
+ ### MCP Servers
116
+
117
+ Create `.pentest/mcp.json`:
118
+
119
+ ```json
120
+ {
121
+ "mcpServers": {
122
+ "filesystem": {
123
+ "command": "npx",
124
+ "args": ["-y", "@modelcontextprotocol/server-filesystem", "/"]
125
+ },
126
+ "pentesting-tools": {
127
+ "command": "docker",
128
+ "args": ["exec", "-i", "pentesting-tools", "/bin/bash"]
129
+ }
130
+ }
131
+ }
132
+ ```
131
133
 
132
- ### Keyboard Shortcuts
134
+ ### Environment Variables
133
135
 
134
- | Key | Action |
135
- |-----|--------|
136
- | `T` | Toggle thought display |
137
- | `P` | Pause |
138
- | `R` | Resume |
139
- | `Ctrl+C` | Exit |
136
+ | Variable | Description | Default |
137
+ |----------|-------------|---------|
138
+ | ANTHROPIC_API_KEY | Claude API key | Required |
139
+ | PENTEST_MODEL | Claude model | claude-sonnet-4-20250514 |
140
+ | PENTEST_MAX_TOKENS | Max response tokens | 8192 |
140
141
 
141
- ### Examples
142
+ ## Development
142
143
 
143
144
  ```bash
144
- # Full autonomous mode (auto-approve everything)
145
- pentesting --dangerously-skip-permissions -t 10.10.10.5
146
-
147
- # Run specific objective
148
- pentesting run "Find SQL injection vulnerabilities" -t http://target.com -o report.json
149
-
150
- # Quick vulnerability scan
151
- pentesting scan 192.168.1.1 -s vuln
152
- ```
153
-
154
- ## Attack Phases
145
+ # Clone
146
+ git clone https://github.com/agnusdei1207/pentesting.git
147
+ cd pentesting
155
148
 
156
- 1. **Reconnaissance** - OSINT, DNS, subdomain enumeration
157
- 2. **Scanning** - Port scanning, service detection
158
- 3. **Enumeration** - Deep service enumeration, user discovery
159
- 4. **Vulnerability Analysis** - CVE mapping, vulnerability scanning
160
- 5. **Exploitation** - Initial access, web attacks
161
- 6. **Privilege Escalation** - Linux/Windows rooting
162
- 7. **Pivoting** - Internal network discovery, tunneling
163
- 8. **Persistence** - Backdoor installation
164
- 9. **Data Exfiltration** - Sensitive data extraction
165
- 10. **Reporting** - Findings documentation
149
+ # Install
150
+ npm install
166
151
 
167
- ## Project Structure
152
+ # Build
153
+ npm run build
168
154
 
155
+ # Dev mode
156
+ npm run dev
169
157
  ```
170
- pentesting/
171
- ├── src/
172
- │ ├── cli/ # TUI components
173
- │ ├── config/ # Constants, theme
174
- │ ├── core/
175
- │ │ ├── agent/ # Autonomous agent
176
- │ │ ├── prompts/ # AI prompts
177
- │ │ └── tools/ # Tool definitions
178
- │ └── mcp/ # MCP server config
179
- ├── skills/ # Pentest skill files
180
- └── dist/ # Build output
181
- ```
182
-
183
- ## Integrated Tools
184
-
185
- | Category | Tools |
186
- |----------|-------|
187
- | Reconnaissance | nmap, masscan, rustscan, theHarvester, amass |
188
- | Web | gobuster, ffuf, nikto, sqlmap, nuclei |
189
- | Exploitation | metasploit, searchsploit, hydra |
190
- | PrivEsc | linpeas, winpeas, mimikatz, bloodhound |
191
- | Post-Exploit | chisel, impacket, crackmapexec |
192
-
193
- ## Environment Variables
194
-
195
- | Variable | Description |
196
- |----------|-------------|
197
- | `ANTHROPIC_API_KEY` | Anthropic API key (required) |
198
- | `PENTEST_MODEL` | Model override (default: claude-sonnet-4-20250514) |
199
158
 
200
- ## Disclaimer
159
+ ## Legal
201
160
 
202
- **This tool is for authorized penetration testing and security research only.**
161
+ ⚠️ **Only use on systems you own or have explicit permission to test.**
203
162
 
204
- - Always obtain written permission before testing
205
- - Unauthorized testing is illegal
206
- - Developers are not responsible for misuse
163
+ This tool is for authorized penetration testing and CTF competitions only.
207
164
 
208
165
  ## License
209
166
 
210
- MIT License
167
+ MIT