pentesting 0.1.0

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 ADDED
@@ -0,0 +1,210 @@
1
+ # Pentest
2
+
3
+ Autonomous Penetration Testing AI Agent.
4
+
5
+ ```
6
+ ██████╗ ███████╗███╗ ██╗████████╗███████╗███████╗████████╗
7
+ ██╔══██╗██╔════╝████╗ ██║╚══██╔══╝██╔════╝██╔════╝╚══██╔══╝
8
+ ██████╔╝█████╗ ██╔██╗ ██║ ██║ █████╗ ███████╗ ██║
9
+ ██╔═══╝ ██╔══╝ ██║╚██╗██║ ██║ ██╔══╝ ╚════██║ ██║
10
+ ██║ ███████╗██║ ╚████║ ██║ ███████╗███████║ ██║
11
+ ╚═╝ ╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝╚══════╝ ╚═╝
12
+ ```
13
+
14
+ ## Features
15
+
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
22
+
23
+ ## Requirements
24
+
25
+ - Node.js 18+
26
+ - Anthropic API Key
27
+ - Kali Linux or macOS (for pentesting tools)
28
+
29
+ ## Installation
30
+
31
+ ### 1. Clone and Install
32
+
33
+ ```bash
34
+ git clone https://github.com/agnusdei1207/pentesting.git
35
+ cd pentesting
36
+ npm install
37
+ ```
38
+
39
+ ### 2. Install SecLists and Wordlists
40
+
41
+ ```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
51
+ ```
52
+
53
+ ### 3. Install Pentest Tools
54
+
55
+ ```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
71
+ ```
72
+
73
+ ### 4. Set API Key
74
+
75
+ ```bash
76
+ export ANTHROPIC_API_KEY="your-api-key"
77
+ ```
78
+
79
+ ## Build
80
+
81
+ ```bash
82
+ npm run build
83
+ ```
84
+
85
+ ## Global Installation
86
+
87
+ ```bash
88
+ npm run build
89
+ npm link
90
+ ```
91
+
92
+ Now you can run `pentesting` from anywhere.
93
+
94
+ ## Usage
95
+
96
+ ### Quick Start
97
+
98
+ ```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
107
+ ```
108
+
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 |
118
+
119
+ ### Interactive Commands
120
+
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 |
131
+
132
+ ### Keyboard Shortcuts
133
+
134
+ | Key | Action |
135
+ |-----|--------|
136
+ | `T` | Toggle thought display |
137
+ | `P` | Pause |
138
+ | `R` | Resume |
139
+ | `Ctrl+C` | Exit |
140
+
141
+ ### Examples
142
+
143
+ ```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
155
+
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
166
+
167
+ ## Project Structure
168
+
169
+ ```
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
+
200
+ ## Disclaimer
201
+
202
+ **This tool is for authorized penetration testing and security research only.**
203
+
204
+ - Always obtain written permission before testing
205
+ - Unauthorized testing is illegal
206
+ - Developers are not responsible for misuse
207
+
208
+ ## License
209
+
210
+ MIT License
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node