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.
- package/README.md +56 -102
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -189,19 +189,27 @@ Complete
|
|
|
189
189
|
|
|
190
190
|
---
|
|
191
191
|
|
|
192
|
-
## π€
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
|
197
|
-
|
|
198
|
-
|
|
|
199
|
-
|
|
|
200
|
-
|
|
|
201
|
-
|
|
|
202
|
-
|
|
|
203
|
-
|
|
204
|
-
|
|
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
|
-
|
|
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
|
-
|
|
250
|
-
console.log(`Tool: ${name}`);
|
|
251
|
-
});
|
|
234
|
+
## π» For Developers
|
|
252
235
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
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
|
-
|
|
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
|
-
## ποΈ
|
|
289
|
+
## ποΈ How It Works
|
|
325
290
|
|
|
326
291
|
```
|
|
327
|
-
|
|
328
|
-
β
|
|
329
|
-
β
|
|
330
|
-
β β
|
|
331
|
-
β β
|
|
332
|
-
β
|
|
333
|
-
β
|
|
334
|
-
β
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
β
|
|
341
|
-
β
|
|
342
|
-
β β
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
β
|
|
347
|
-
β
|
|
348
|
-
β
|
|
349
|
-
β
|
|
350
|
-
β
|
|
351
|
-
β β
|
|
352
|
-
|
|
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
|
-
##
|
|
346
|
+
## π License
|
|
393
347
|
|
|
394
348
|
MIT
|