pentesting 0.7.44 β 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 +55 -130
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -189,48 +189,27 @@ Complete
|
|
|
189
189
|
|
|
190
190
|
---
|
|
191
191
|
|
|
192
|
-
## π€
|
|
193
|
-
|
|
194
|
-
### YAML-Based Agents (Primary)
|
|
195
|
-
New agents defined in `src/agents/specs/*.yaml` with auto-switching:
|
|
196
|
-
|
|
197
|
-
| YAML Agent | Phase | Description |
|
|
198
|
-
|------------|-------|-------------|
|
|
199
|
-
| `recon` | RECON, SCAN | Information gathering, port scanning |
|
|
200
|
-
| `web` | ENUM | Web application security, OWASP Top 10 |
|
|
201
|
-
| `exploit` | VULN, EXPLOIT | CVE research, exploit execution |
|
|
202
|
-
| `privesc` | PRIVESC, PIVOT, PERSIST | Privilege escalation techniques |
|
|
203
|
-
| `crypto` | EXFIL | Hash cracking, encryption analysis |
|
|
204
|
-
|
|
205
|
-
### Built-in Agents (Fallback)
|
|
206
|
-
|
|
207
|
-
| Agent | Specialty |
|
|
208
|
-
|-------|-----------|
|
|
209
|
-
| `target-explorer` | Network reconnaissance, service enumeration |
|
|
210
|
-
| `exploit-researcher` | CVE research, exploit development |
|
|
211
|
-
| `privesc-master` | Linux/Windows privilege escalation |
|
|
212
|
-
| `web-hacker` | OWASP Top 10, SQLi, XSS, SSRF |
|
|
213
|
-
| `crypto-solver` | Hash cracking, cipher analysis |
|
|
214
|
-
| `forensics-analyst` | Memory forensics, file carving |
|
|
215
|
-
| `reverse-engineer` | Binary analysis, exploit development |
|
|
216
|
-
| `attack-architect` | Attack strategy planning |
|
|
217
|
-
| `finding-reviewer` | Vulnerability validation |
|
|
218
|
-
|
|
219
|
-
### Agent Orchestration Flow
|
|
192
|
+
## π€ AI Agents
|
|
220
193
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
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.
|
|
234
213
|
|
|
235
214
|
---
|
|
236
215
|
|
|
@@ -249,44 +228,15 @@ LLM Call with Specialized Context
|
|
|
249
228
|
|
|
250
229
|
> **Note**: `ANTHROPIC_API_KEY` is also accepted as fallback for `PENTEST_API_KEY`.
|
|
251
230
|
|
|
252
|
-
---
|
|
253
|
-
|
|
254
|
-
## π» Programmatic Usage
|
|
255
|
-
|
|
256
|
-
```typescript
|
|
257
|
-
import { AutonomousHackingAgent, AGENT_EVENT } from 'pentesting';
|
|
258
|
-
|
|
259
|
-
const agent = new AutonomousHackingAgent(undefined, {
|
|
260
|
-
autoApprove: false, // Require approval for dangerous tools
|
|
261
|
-
maxIterations: 100, // Max loop iterations
|
|
262
|
-
});
|
|
263
|
-
|
|
264
|
-
// Multi-target setup
|
|
265
|
-
agent.addTarget('example1.com');
|
|
266
|
-
agent.addTarget('example2.com');
|
|
267
|
-
agent.setTarget('example1.com');
|
|
268
231
|
|
|
269
|
-
|
|
270
|
-
agent.on(AGENT_EVENT.FINDING, (finding) => {
|
|
271
|
-
console.log(`Found: ${finding.title} (${finding.severity})`);
|
|
272
|
-
});
|
|
273
|
-
|
|
274
|
-
agent.on(AGENT_EVENT.TARGET_SET, (target) => {
|
|
275
|
-
console.log(`Target set: ${target}`);
|
|
276
|
-
});
|
|
232
|
+
---
|
|
277
233
|
|
|
278
|
-
|
|
279
|
-
console.log(`Tool: ${name}`);
|
|
280
|
-
});
|
|
234
|
+
## π» For Developers
|
|
281
235
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
agent.pause(); // Pause (ESC key equivalent)
|
|
287
|
-
agent.resume(); // Resume
|
|
288
|
-
agent.abort(); // Complete stop
|
|
289
|
-
```
|
|
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
|
|
290
240
|
|
|
291
241
|
---
|
|
292
242
|
|
|
@@ -332,63 +282,39 @@ docker pull agnusdei1207/pentesting-tools:latest
|
|
|
332
282
|
|
|
333
283
|
## π MCP Integration
|
|
334
284
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
```typescript
|
|
338
|
-
const agent = new AutonomousHackingAgent();
|
|
339
|
-
|
|
340
|
-
// Add filesystem access
|
|
341
|
-
await agent.addMCPServer('filesystem', 'npx', [
|
|
342
|
-
'-y', '@modelcontextprotocol/server-filesystem', '/'
|
|
343
|
-
]);
|
|
344
|
-
|
|
345
|
-
// Add custom security tools
|
|
346
|
-
await agent.addMCPServer('security-tools', 'docker', [
|
|
347
|
-
'exec', '-i', 'pentesting-tools', '/bin/bash'
|
|
348
|
-
]);
|
|
349
|
-
```
|
|
285
|
+
Pentesting supports MCP (Model Context Protocol) for extending capabilities with additional tools and servers. See [Architecture Docs](./docs/architecture.md) for integration details.
|
|
350
286
|
|
|
351
287
|
---
|
|
352
288
|
|
|
353
|
-
## ποΈ
|
|
289
|
+
## ποΈ How It Works
|
|
354
290
|
|
|
355
291
|
```
|
|
356
|
-
|
|
357
|
-
β
|
|
358
|
-
β
|
|
359
|
-
β β
|
|
360
|
-
β β
|
|
361
|
-
β
|
|
362
|
-
β
|
|
363
|
-
β
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
β
|
|
370
|
-
β
|
|
371
|
-
β β
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
β
|
|
376
|
-
β
|
|
377
|
-
β
|
|
378
|
-
β
|
|
379
|
-
β
|
|
380
|
-
β β
|
|
381
|
-
|
|
382
|
-
β β web-hacker β’ crypto-solver β’ forensics-analyst β β
|
|
383
|
-
β β reverse-engineer β’ attack-architect β’ finding-reviewer β β
|
|
384
|
-
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
|
|
385
|
-
ββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
|
|
386
|
-
β
|
|
387
|
-
ββββββββββββββββββββΌβββββββββββββββββββ
|
|
388
|
-
ββββββΌβββββ ββββββΌβββββ ββββββΌβββββ
|
|
389
|
-
β Tool β β Bash β β MCP β
|
|
390
|
-
βExecutor β βCommands β β Servers β
|
|
391
|
-
βββββββββββ βββββββββββ βββββββββββ
|
|
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
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
392
318
|
```
|
|
393
319
|
|
|
394
320
|
---
|
|
@@ -410,7 +336,6 @@ npm run build
|
|
|
410
336
|
npm run dev
|
|
411
337
|
```
|
|
412
338
|
|
|
413
|
-
## π License
|
|
414
339
|
## Documentation
|
|
415
340
|
|
|
416
341
|
- [Architecture](./docs/ARCHITECTURE.md) - System design and components
|
|
@@ -418,6 +343,6 @@ npm run dev
|
|
|
418
343
|
|
|
419
344
|
---
|
|
420
345
|
|
|
421
|
-
##
|
|
346
|
+
## π License
|
|
422
347
|
|
|
423
348
|
MIT
|