pentesting 0.7.43 β†’ 0.7.45

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.
Files changed (2) hide show
  1. package/README.md +56 -102
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -189,19 +189,27 @@ Complete
189
189
 
190
190
  ---
191
191
 
192
- ## πŸ€– Built-in Agents
193
-
194
- | Agent | Specialty |
195
- |-------|-----------|
196
- | `target-explorer` | Network reconnaissance, service enumeration |
197
- | `exploit-researcher` | CVE research, exploit development |
198
- | `privesc-master` | Linux/Windows privilege escalation |
199
- | `web-hacker` | OWASP Top 10, SQLi, XSS, SSRF |
200
- | `crypto-solver` | Hash cracking, cipher analysis |
201
- | `forensics-analyst` | Memory forensics, file carving |
202
- | `reverse-engineer` | Binary analysis, exploit development |
203
- | `attack-architect` | Attack strategy planning |
204
- | `finding-reviewer` | Vulnerability validation |
192
+ ## πŸ€– AI Agents
193
+
194
+ Pentesting automatically switches between specialized AI agents based on the current attack phase:
195
+
196
+ | Phase | Agent | What it does |
197
+ |-------|-------|--------------|
198
+ | Reconnaissance | **Recon Agent** | Discovers hosts, ports, services, subdomains |
199
+ | Web Scanning | **Web Agent** | Tests for OWASP Top 10, SQLi, XSS, SSRF |
200
+ | Exploitation | **Exploit Agent** | Researches CVEs, selects and runs exploits |
201
+ | Privilege Escalation | **PrivEsc Agent** | Finds SUID, sudo misconfigs, kernel exploits |
202
+ | Data Extraction | **Crypto Agent** | Cracks hashes, analyzes encryption |
203
+
204
+ ### How it works
205
+
206
+ 1. **You set a target** β†’ Agent starts in Recon mode
207
+ 2. **Finds web services** β†’ Automatically switches to Web Agent
208
+ 3. **Discovers vulnerability** β†’ Switches to Exploit Agent
209
+ 4. **Gets shell access** β†’ Switches to PrivEsc Agent
210
+ 5. **Finds password hashes** β†’ Crypto Agent takes over
211
+
212
+ > No manual agent switching needed. The system automatically picks the best agent for each situation.
205
213
 
206
214
  ---
207
215
 
@@ -220,44 +228,15 @@ Complete
220
228
 
221
229
  > **Note**: `ANTHROPIC_API_KEY` is also accepted as fallback for `PENTEST_API_KEY`.
222
230
 
223
- ---
224
-
225
- ## πŸ’» Programmatic Usage
226
-
227
- ```typescript
228
- import { AutonomousHackingAgent, AGENT_EVENT } from 'pentesting';
229
-
230
- const agent = new AutonomousHackingAgent(undefined, {
231
- autoApprove: false, // Require approval for dangerous tools
232
- maxIterations: 100, // Max loop iterations
233
- });
234
-
235
- // Multi-target setup
236
- agent.addTarget('example1.com');
237
- agent.addTarget('example2.com');
238
- agent.setTarget('example1.com');
239
231
 
240
- // Listen for events
241
- agent.on(AGENT_EVENT.FINDING, (finding) => {
242
- console.log(`Found: ${finding.title} (${finding.severity})`);
243
- });
244
-
245
- agent.on(AGENT_EVENT.TARGET_SET, (target) => {
246
- console.log(`Target set: ${target}`);
247
- });
232
+ ---
248
233
 
249
- agent.on(AGENT_EVENT.TOOL_CALL, ({ name, input }) => {
250
- console.log(`Tool: ${name}`);
251
- });
234
+ ## πŸ’» For Developers
252
235
 
253
- // Start pentesting
254
- await agent.runAutonomous('Get root access');
255
-
256
- // Control execution
257
- agent.pause(); // Pause (ESC key equivalent)
258
- agent.resume(); // Resume
259
- agent.abort(); // Complete stop
260
- ```
236
+ Pentesting can be used as a library in your own projects. See [Architecture Docs](./docs/architecture.md) for:
237
+ - API Reference
238
+ - Event System
239
+ - Custom Agent Integration
261
240
 
262
241
  ---
263
242
 
@@ -303,63 +282,39 @@ docker pull agnusdei1207/pentesting-tools:latest
303
282
 
304
283
  ## πŸ”Œ MCP Integration
305
284
 
306
- Extend with additional MCP servers:
307
-
308
- ```typescript
309
- const agent = new AutonomousHackingAgent();
310
-
311
- // Add filesystem access
312
- await agent.addMCPServer('filesystem', 'npx', [
313
- '-y', '@modelcontextprotocol/server-filesystem', '/'
314
- ]);
315
-
316
- // Add custom security tools
317
- await agent.addMCPServer('security-tools', 'docker', [
318
- 'exec', '-i', 'pentesting-tools', '/bin/bash'
319
- ]);
320
- ```
285
+ Pentesting supports MCP (Model Context Protocol) for extending capabilities with additional tools and servers. See [Architecture Docs](./docs/architecture.md) for integration details.
321
286
 
322
287
  ---
323
288
 
324
- ## πŸ—οΈ Architecture
289
+ ## πŸ—οΈ How It Works
325
290
 
326
291
  ```
327
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
328
- β”‚ TUI (app.tsx) β”‚
329
- β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
330
- β”‚ β”‚ WireLogger β”‚ β”‚ContextMgr β”‚ β”‚ Multi-Target Handler β”‚ β”‚
331
- β”‚ β”‚ (Recording) β”‚ β”‚(Checkpoints)β”‚ β”‚ (add/list/rm/clear/all) β”‚ β”‚
332
- β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
333
- β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
334
- β”‚ β”‚ KeyboardLstn β”‚ β”‚ ForceUpdate β”‚ β”‚ SlashCommandRegistry β”‚ β”‚
335
- β”‚ β”‚ (ESC/Ctrl+C) β”‚ β”‚ (UI Refresh) β”‚ β”‚ (Command Handling) β”‚ β”‚
336
- β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
337
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
338
- β”‚ Events
339
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
340
- β”‚ AutonomousHackingAgent (Core Engine) β”‚
341
- β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
342
- β”‚ β”‚ HookExecutor β”‚ β”‚ MCPManager β”‚ β”‚ApprovalMgr β”‚ β”‚
343
- β”‚ β”‚ (Lifecycle) β”‚ β”‚ (Extensions) β”‚ β”‚(Tool Safety) β”‚ β”‚
344
- β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
345
- β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
346
- β”‚ β”‚ TargetMgr β”‚ β”‚ PauseMgr β”‚ β”‚ContextMgr β”‚ β”‚
347
- β”‚ β”‚ (Multi-Tgt) β”‚ β”‚ (ESC/Abort) β”‚ β”‚ (Compaction) β”‚ β”‚
348
- β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
349
- β”‚ β”‚
350
- β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
351
- β”‚ β”‚ 9 Built-in Specialized Agents β”‚ β”‚
352
- β”‚ β”‚ target-explorer β€’ exploit-researcher β€’ privesc-master β”‚ β”‚
353
- β”‚ β”‚ web-hacker β€’ crypto-solver β€’ forensics-analyst β”‚ β”‚
354
- β”‚ β”‚ reverse-engineer β€’ attack-architect β€’ finding-reviewer β”‚ β”‚
355
- β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
356
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
357
- β”‚
358
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
359
- β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”
360
- β”‚ Tool β”‚ β”‚ Bash β”‚ β”‚ MCP β”‚
361
- β”‚Executor β”‚ β”‚Commands β”‚ β”‚ Servers β”‚
362
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
292
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
293
+ β”‚ Your Terminal β”‚
294
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
295
+ β”‚ β”‚ pentesting CLI (Interactive TUI) β”‚ β”‚
296
+ β”‚ β”‚ - Target management β”‚ β”‚
297
+ β”‚ β”‚ - Session recording β”‚ β”‚
298
+ β”‚ β”‚ - Real-time output β”‚ β”‚
299
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
300
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
301
+ β–Ό
302
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
303
+ β”‚ AI Agent Core β”‚
304
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
305
+ β”‚ β”‚ 5 Specialized Agents (auto-switching) β”‚ β”‚
306
+ β”‚ β”‚ Recon β†’ Web β†’ Exploit β†’ PrivEsc β†’ Cryptoβ”‚
307
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
308
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
309
+ β–Ό
310
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
311
+ β”‚ Tool Execution β”‚
312
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
313
+ β”‚ β”‚ Docker β”‚ β”‚ Local β”‚ β”‚ MCP β”‚ β”‚
314
+ β”‚ β”‚ (50+ β”‚ β”‚ Tools β”‚ β”‚ Servers β”‚ β”‚
315
+ β”‚ β”‚ tools) β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
316
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
317
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
363
318
  ```
364
319
 
365
320
  ---
@@ -381,7 +336,6 @@ npm run build
381
336
  npm run dev
382
337
  ```
383
338
 
384
- ## πŸ“„ License
385
339
  ## Documentation
386
340
 
387
341
  - [Architecture](./docs/ARCHITECTURE.md) - System design and components
@@ -389,6 +343,6 @@ npm run dev
389
343
 
390
344
  ---
391
345
 
392
- ## οΏ½πŸ“„ License
346
+ ## πŸ“„ License
393
347
 
394
348
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pentesting",
3
- "version": "0.7.43",
3
+ "version": "0.7.45",
4
4
  "description": "Autonomous Penetration Testing AI Agent",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",