pentesting 0.6.1 → 0.7.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.
@@ -8,8 +8,8 @@ import {
8
8
  readVersionCache,
9
9
  semverTuple,
10
10
  writeVersionCache
11
- } from "./chunk-6MCOPWPF.js";
12
- import "./chunk-6RVVWSNN.js";
11
+ } from "./chunk-NHTHJVRJ.js";
12
+ import "./chunk-FWXRDTSB.js";
13
13
  import "./chunk-3RG5ZIWI.js";
14
14
  export {
15
15
  checkForUpdate,
@@ -109,6 +109,17 @@ var TOOL_NAME = {
109
109
  SUBFINDER: "subfinder",
110
110
  AMASS: "amass",
111
111
  DNSENUM: "dnsenum",
112
+ ZONE_TRANSFER: "zone_transfer",
113
+ // Service Enumeration
114
+ SNMP_WALK: "snmp_walk",
115
+ SNMP_CHECK: "snmp_check",
116
+ ONESIXTYONE: "onesixtyone",
117
+ FTP_ENUM: "ftp_enum",
118
+ FTP_ANON: "ftp_anon",
119
+ NBTSCAN: "nbtscan",
120
+ RPC_INFO: "rpc_info",
121
+ SHOWMOUNT: "showmount",
122
+ TELNET: "telnet",
112
123
  // Web Recon & Tech Identification
113
124
  WHATWEB: "whatweb",
114
125
  HTTPX: "httpx",
@@ -147,6 +158,7 @@ var TOOL_NAME = {
147
158
  BRUTEFORCE_LOGIN: "bruteforce_login",
148
159
  CRACK_HASH: "crack_hash",
149
160
  DUMP_CREDENTIALS: "dump_credentials",
161
+ HYDRA: "hydra",
150
162
  // Privilege Escalation
151
163
  CHECK_SUDO: "check_sudo",
152
164
  FIND_SUID: "find_suid",
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  APP_NAME,
3
3
  APP_VERSION
4
- } from "./chunk-6RVVWSNN.js";
4
+ } from "./chunk-FWXRDTSB.js";
5
5
 
6
6
  // src/core/update/auto-update.ts
7
7
  import { execSync } from "child_process";
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  PHASE_STATUS,
16
16
  THOUGHT_TYPE,
17
17
  TOOL_NAME
18
- } from "./chunk-6RVVWSNN.js";
18
+ } from "./chunk-FWXRDTSB.js";
19
19
  import {
20
20
  __require
21
21
  } from "./chunk-3RG5ZIWI.js";
@@ -365,6 +365,225 @@ Use for:
365
365
  }
366
366
  }
367
367
  ];
368
+ var SERVICE_TOOLS = [
369
+ {
370
+ name: TOOL_NAME.ZONE_TRANSFER,
371
+ description: `DNS Zone Transfer (AXFR) - Extract all DNS records from a nameserver.
372
+
373
+ PORT: 53/TCP
374
+
375
+ USAGE:
376
+ - dig axfr @ns.target.com target.com
377
+ - host -l target.com ns.target.com
378
+ - dnsrecon -d target.com -t axfr
379
+
380
+ REVEALS: All subdomains, A records, MX, NS, TXT records`,
381
+ input_schema: {
382
+ type: "object",
383
+ properties: {
384
+ domain: { type: "string", description: "Target domain" },
385
+ nameserver: { type: "string", description: "Nameserver to query" }
386
+ },
387
+ required: ["domain", "nameserver"]
388
+ }
389
+ },
390
+ {
391
+ name: TOOL_NAME.SNMP_WALK,
392
+ description: `SNMP enumeration - Walk through SNMP MIB tree.
393
+
394
+ PORT: 161/UDP
395
+
396
+ COMMON COMMUNITY STRINGS: public, private, manager, cisco
397
+
398
+ USAGE:
399
+ - snmpwalk -v1 -c public target
400
+ - snmpwalk -v2c -c public target
401
+ - snmpbulkwalk -v2c -c public target
402
+
403
+ EXTRACTS: Users, Processes, Network config, Installed software, ARP table`,
404
+ input_schema: {
405
+ type: "object",
406
+ properties: {
407
+ target: { type: "string", description: "Target IP" },
408
+ community: { type: "string", description: "Community string (default: public)" },
409
+ version: { type: "string", enum: ["1", "2c", "3"], description: "SNMP version" },
410
+ oid: { type: "string", description: "OID to walk (default: all)" }
411
+ },
412
+ required: ["target"]
413
+ }
414
+ },
415
+ {
416
+ name: TOOL_NAME.SNMP_CHECK,
417
+ description: `snmp-check - Enumerate SNMP devices for information.
418
+
419
+ Extracts: System info, User accounts, Network info, Routing, TCP/UDP connections`,
420
+ input_schema: {
421
+ type: "object",
422
+ properties: {
423
+ target: { type: "string", description: "Target IP" },
424
+ community: { type: "string", description: "Community string" }
425
+ },
426
+ required: ["target"]
427
+ }
428
+ },
429
+ {
430
+ name: TOOL_NAME.ONESIXTYONE,
431
+ description: `onesixtyone - Fast SNMP community string bruteforcer.
432
+
433
+ PORT: 161/UDP
434
+
435
+ USAGE: onesixtyone -c community_list.txt target`,
436
+ input_schema: {
437
+ type: "object",
438
+ properties: {
439
+ target: { type: "string", description: "Target IP/range" },
440
+ wordlist: { type: "string", description: "Community strings wordlist" }
441
+ },
442
+ required: ["target"]
443
+ }
444
+ },
445
+ {
446
+ name: TOOL_NAME.FTP_ENUM,
447
+ description: `FTP enumeration and testing.
448
+
449
+ PORT: 21/TCP
450
+
451
+ CHECKS:
452
+ - Version detection (nmap -sV -p21)
453
+ - Anonymous login
454
+ - User enumeration
455
+ - Known vulnerabilities`,
456
+ input_schema: {
457
+ type: "object",
458
+ properties: {
459
+ target: { type: "string", description: "Target IP" },
460
+ username: { type: "string", description: "Username to test" },
461
+ password: { type: "string", description: "Password to test" },
462
+ check_anon: { type: "boolean", description: "Check anonymous login" }
463
+ },
464
+ required: ["target"]
465
+ }
466
+ },
467
+ {
468
+ name: TOOL_NAME.FTP_ANON,
469
+ description: `Test FTP anonymous login and list files.
470
+
471
+ USAGE: ftp -n target << EOF
472
+ user anonymous anonymous@
473
+ ls -la
474
+ bye
475
+ EOF`,
476
+ input_schema: {
477
+ type: "object",
478
+ properties: {
479
+ target: { type: "string", description: "Target IP" },
480
+ download: { type: "string", description: "File to download" }
481
+ },
482
+ required: ["target"]
483
+ }
484
+ },
485
+ {
486
+ name: TOOL_NAME.NBTSCAN,
487
+ description: `NetBIOS enumeration - Scan for NetBIOS name information.
488
+
489
+ PORTS: 137-139/TCP,UDP
490
+
491
+ EXTRACTS: Computer names, Workgroup/Domain, MAC addresses, Logged-in users
492
+
493
+ USAGE: nbtscan -r target/24`,
494
+ input_schema: {
495
+ type: "object",
496
+ properties: {
497
+ target: { type: "string", description: "Target IP/range" },
498
+ verbose: { type: "boolean", description: "Verbose output" }
499
+ },
500
+ required: ["target"]
501
+ }
502
+ },
503
+ {
504
+ name: TOOL_NAME.RPC_INFO,
505
+ description: `RPC enumeration - Query RPC services.
506
+
507
+ PORT: 111/TCP,UDP (portmapper), 135/TCP (Windows)
508
+
509
+ USAGE:
510
+ - rpcinfo -p target
511
+ - rpcdump.py target
512
+
513
+ REVEALS: Available RPC services and their ports`,
514
+ input_schema: {
515
+ type: "object",
516
+ properties: {
517
+ target: { type: "string", description: "Target IP" }
518
+ },
519
+ required: ["target"]
520
+ }
521
+ },
522
+ {
523
+ name: TOOL_NAME.SHOWMOUNT,
524
+ description: `NFS enumeration - Show NFS exports.
525
+
526
+ PORT: 2049/TCP,UDP (NFS), 111 (portmapper)
527
+
528
+ USAGE: showmount -e target
529
+
530
+ MOUNT: mount -t nfs target:/share /mnt/nfs`,
531
+ input_schema: {
532
+ type: "object",
533
+ properties: {
534
+ target: { type: "string", description: "Target IP" },
535
+ all: { type: "boolean", description: "Show all info (-a)" }
536
+ },
537
+ required: ["target"]
538
+ }
539
+ },
540
+ {
541
+ name: TOOL_NAME.TELNET,
542
+ description: `Telnet connection - Banner grab and service interaction.
543
+
544
+ USAGE for banner grab: echo "quit" | timeout 5 telnet target port`,
545
+ input_schema: {
546
+ type: "object",
547
+ properties: {
548
+ target: { type: "string", description: "Target IP" },
549
+ port: { type: "number", description: "Port number" }
550
+ },
551
+ required: ["target", "port"]
552
+ }
553
+ },
554
+ {
555
+ name: TOOL_NAME.HYDRA,
556
+ description: `Hydra - Fast network logon cracker.
557
+
558
+ PROTOCOLS: ssh, ftp, telnet, http-get, http-post, smb, rdp, mysql, mssql, vnc, etc.
559
+
560
+ USAGE:
561
+ - hydra -l user -P wordlist.txt target ssh
562
+ - hydra -L users.txt -p password target ftp
563
+ - hydra -l admin -P rockyou.txt target http-post-form "/login:user=^USER^&pass=^PASS^:F=failed"
564
+
565
+ OPTIONS:
566
+ - -t 4: Number of parallel tasks
567
+ - -V: Verbose
568
+ - -f: Exit after first found
569
+ - -s PORT: Specify port`,
570
+ input_schema: {
571
+ type: "object",
572
+ properties: {
573
+ target: { type: "string", description: "Target IP/hostname" },
574
+ protocol: { type: "string", description: "Protocol (ssh, ftp, http-post-form, etc.)" },
575
+ username: { type: "string", description: "Username or -L for file" },
576
+ password: { type: "string", description: "Password or -P for wordlist" },
577
+ userlist: { type: "string", description: "Username wordlist file" },
578
+ passlist: { type: "string", description: "Password wordlist file" },
579
+ port: { type: "number", description: "Target port" },
580
+ threads: { type: "number", description: "Parallel tasks (default: 16)" },
581
+ extra: { type: "string", description: "Extra options (e.g., http form data)" }
582
+ },
583
+ required: ["target", "protocol"]
584
+ }
585
+ }
586
+ ];
368
587
  var WINDOWS_TOOLS = [
369
588
  {
370
589
  name: TOOL_NAME.NETCAT,
@@ -1061,6 +1280,7 @@ var REPORT_TOOLS = [
1061
1280
  var ALL_TOOLS = [
1062
1281
  ...SYSTEM_TOOLS,
1063
1282
  ...NETWORK_TOOLS,
1283
+ ...SERVICE_TOOLS,
1064
1284
  ...WINDOWS_TOOLS,
1065
1285
  ...WEB_TOOLS,
1066
1286
  ...EXPLOIT_TOOLS,
@@ -1282,6 +1502,40 @@ async function executeToolCall(toolName, input) {
1282
1502
  case "reverse_shell":
1283
1503
  result = await executeReverseShell(input);
1284
1504
  break;
1505
+ // Service Enumeration Tools
1506
+ case "zone_transfer":
1507
+ result = await executeZoneTransfer(input);
1508
+ break;
1509
+ case "snmp_walk":
1510
+ result = await executeSnmpWalk(input);
1511
+ break;
1512
+ case "snmp_check":
1513
+ result = await executeSnmpCheck(input);
1514
+ break;
1515
+ case "onesixtyone":
1516
+ result = await executeOnesixtyone(input);
1517
+ break;
1518
+ case "ftp_enum":
1519
+ result = await executeFtpEnum(input);
1520
+ break;
1521
+ case "ftp_anon":
1522
+ result = await executeFtpAnon(input);
1523
+ break;
1524
+ case "nbtscan":
1525
+ result = await executeNbtscan(input);
1526
+ break;
1527
+ case "rpc_info":
1528
+ result = await executeRpcInfo(input);
1529
+ break;
1530
+ case "showmount":
1531
+ result = await executeShowmount(input);
1532
+ break;
1533
+ case "telnet":
1534
+ result = await executeTelnet(input);
1535
+ break;
1536
+ case "hydra":
1537
+ result = await executeHydra(input);
1538
+ break;
1285
1539
  // report
1286
1540
  case "report_finding":
1287
1541
  result = await reportFinding(input);
@@ -1933,6 +2187,98 @@ Listener: nc -lvnp ${lport}`,
1933
2187
  duration: 0
1934
2188
  };
1935
2189
  }
2190
+ async function executeZoneTransfer(input) {
2191
+ const { domain, nameserver } = input;
2192
+ return executeBash(`dig axfr @${nameserver} ${domain}`, { timeout: 6e4 });
2193
+ }
2194
+ async function executeSnmpWalk(input) {
2195
+ const { target, community = "public", version = "2c", oid } = input;
2196
+ let cmd = `snmpwalk -v${version} -c "${community}" ${target}`;
2197
+ if (oid) cmd += ` ${oid}`;
2198
+ return executeBash(cmd, { timeout: 12e4 });
2199
+ }
2200
+ async function executeSnmpCheck(input) {
2201
+ const { target, community = "public" } = input;
2202
+ return executeBash(`snmp-check -c "${community}" ${target}`, { timeout: 12e4 });
2203
+ }
2204
+ async function executeOnesixtyone(input) {
2205
+ const { target, wordlist } = input;
2206
+ const wl = wordlist || "/usr/share/seclists/Discovery/SNMP/common-snmp-community-strings.txt";
2207
+ return executeBash(`onesixtyone -c "${wl}" ${target}`, { timeout: 12e4 });
2208
+ }
2209
+ async function executeFtpEnum(input) {
2210
+ const { target, username, password, check_anon } = input;
2211
+ const commands = [];
2212
+ commands.push(`nmap -sV -p21 --script=ftp-anon,ftp-bounce,ftp-syst ${target}`);
2213
+ if (check_anon) {
2214
+ commands.push(`echo -e "open ${target}\\nuser anonymous anonymous@\\nls\\nbye" | ftp -n 2>/dev/null || echo "Anonymous login failed"`);
2215
+ }
2216
+ if (username && password) {
2217
+ commands.push(`echo -e "open ${target}\\nuser ${username} ${password}\\nls\\nbye" | ftp -n 2>/dev/null`);
2218
+ }
2219
+ return executeBash(commands.join(' && echo "---" && '), { timeout: 6e4 });
2220
+ }
2221
+ async function executeFtpAnon(input) {
2222
+ const { target, download } = input;
2223
+ let cmd = `ftp -n ${target} << 'EOF'
2224
+ user anonymous anonymous@
2225
+ binary
2226
+ ls -la
2227
+ `;
2228
+ if (download) {
2229
+ cmd += `get ${download}
2230
+ `;
2231
+ }
2232
+ cmd += `bye
2233
+ EOF`;
2234
+ return executeBash(cmd, { timeout: 6e4 });
2235
+ }
2236
+ async function executeNbtscan(input) {
2237
+ const { target, verbose } = input;
2238
+ let cmd = "nbtscan";
2239
+ if (verbose) cmd += " -v";
2240
+ cmd += ` -r ${target}`;
2241
+ return executeBash(cmd, { timeout: 6e4 });
2242
+ }
2243
+ async function executeRpcInfo(input) {
2244
+ const { target } = input;
2245
+ return executeBash(`rpcinfo -p ${target}`, { timeout: 3e4 });
2246
+ }
2247
+ async function executeShowmount(input) {
2248
+ const { target, all } = input;
2249
+ let cmd = "showmount";
2250
+ if (all) {
2251
+ cmd += " -a";
2252
+ } else {
2253
+ cmd += " -e";
2254
+ }
2255
+ cmd += ` ${target}`;
2256
+ return executeBash(cmd, { timeout: 3e4 });
2257
+ }
2258
+ async function executeTelnet(input) {
2259
+ const { target, port } = input;
2260
+ return executeBash(`echo "quit" | timeout 10 telnet ${target} ${port} 2>&1 || true`, { timeout: 15e3 });
2261
+ }
2262
+ async function executeHydra(input) {
2263
+ const { target, protocol, username, password, userlist, passlist, port, threads = 16, extra } = input;
2264
+ let cmd = "hydra";
2265
+ if (threads) cmd += ` -t ${threads}`;
2266
+ if (port) cmd += ` -s ${port}`;
2267
+ if (userlist) {
2268
+ cmd += ` -L "${userlist}"`;
2269
+ } else if (username) {
2270
+ cmd += ` -l "${username}"`;
2271
+ }
2272
+ if (passlist) {
2273
+ cmd += ` -P "${passlist}"`;
2274
+ } else if (password) {
2275
+ cmd += ` -p "${password}"`;
2276
+ }
2277
+ cmd += ` ${target} ${protocol}`;
2278
+ if (extra) cmd += ` "${extra}"`;
2279
+ cmd += " -V -f";
2280
+ return executeBash(cmd, { timeout: 6e5 });
2281
+ }
1936
2282
 
1937
2283
  // src/core/hooks/hook-executor.ts
1938
2284
  import { spawn as spawn2 } from "child_process";
@@ -2313,6 +2659,7 @@ var LOW_RISK_TOOLS = [
2313
2659
  "nslookup",
2314
2660
  "whois",
2315
2661
  "dnsenum",
2662
+ "zone_transfer",
2316
2663
  "curl",
2317
2664
  "wget",
2318
2665
  "httpx",
@@ -2336,6 +2683,14 @@ var LOW_RISK_TOOLS = [
2336
2683
  "nc",
2337
2684
  "telnet",
2338
2685
  "ftp",
2686
+ "ftp_enum",
2687
+ "ftp_anon",
2688
+ "snmp_walk",
2689
+ "snmp_check",
2690
+ "onesixtyone",
2691
+ "nbtscan",
2692
+ "rpc_info",
2693
+ "showmount",
2339
2694
  "read_file",
2340
2695
  "list_directory",
2341
2696
  "cat",
@@ -6052,7 +6407,7 @@ var App = ({ autoApprove = false, target }) => {
6052
6407
  setCheckpointCount(contextManagerRef.current?.getCheckpoints().length || 0);
6053
6408
  }
6054
6409
  });
6055
- import("./auto-update-23RX6SWZ.js").then(({ checkForUpdateAsync, formatUpdateNotification }) => {
6410
+ import("./auto-update-NF5LOTTR.js").then(({ checkForUpdateAsync, formatUpdateNotification }) => {
6056
6411
  checkForUpdateAsync().then((result) => {
6057
6412
  if (result.hasUpdate) {
6058
6413
  const notification = formatUpdateNotification(result);
@@ -6646,7 +7001,7 @@ ${list}`);
6646
7001
  return;
6647
7002
  case "update":
6648
7003
  try {
6649
- const { checkForUpdate, formatUpdateNotification, doUpdate } = await import("./update-6I3E5PSP.js");
7004
+ const { checkForUpdate, formatUpdateNotification, doUpdate } = await import("./update-WBBD5QMK.js");
6650
7005
  const result = checkForUpdate(true);
6651
7006
  if (result.hasUpdate) {
6652
7007
  const notification = formatUpdateNotification(result);
@@ -8,8 +8,8 @@ import {
8
8
  readVersionCache,
9
9
  semverTuple,
10
10
  writeVersionCache
11
- } from "./chunk-6MCOPWPF.js";
12
- import "./chunk-6RVVWSNN.js";
11
+ } from "./chunk-NHTHJVRJ.js";
12
+ import "./chunk-FWXRDTSB.js";
13
13
  import "./chunk-3RG5ZIWI.js";
14
14
  export {
15
15
  checkForUpdate,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pentesting",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "description": "Autonomous Penetration Testing AI Agent",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",