pentesting 0.6.1 → 0.7.1
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/dist/{auto-update-23RX6SWZ.js → auto-update-NF5LOTTR.js} +2 -2
- package/dist/{chunk-6RVVWSNN.js → chunk-FWXRDTSB.js} +12 -0
- package/dist/{chunk-6MCOPWPF.js → chunk-NHTHJVRJ.js} +1 -1
- package/dist/index.js +396 -41
- package/dist/{update-6I3E5PSP.js → update-WBBD5QMK.js} +2 -2
- package/package.json +1 -1
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
readVersionCache,
|
|
9
9
|
semverTuple,
|
|
10
10
|
writeVersionCache
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
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",
|
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-
|
|
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,
|
|
@@ -1152,27 +1372,27 @@ async function executeToolCall(toolName, input) {
|
|
|
1152
1372
|
let result;
|
|
1153
1373
|
switch (toolName) {
|
|
1154
1374
|
// system tool
|
|
1155
|
-
case
|
|
1375
|
+
case TOOL_NAME.BASH:
|
|
1156
1376
|
result = await executeBash(input.command, {
|
|
1157
1377
|
timeout: input.timeout || 6e4,
|
|
1158
1378
|
background: input.background
|
|
1159
1379
|
});
|
|
1160
1380
|
break;
|
|
1161
|
-
case
|
|
1381
|
+
case TOOL_NAME.READ_FILE:
|
|
1162
1382
|
result = await readFile2(
|
|
1163
1383
|
input.path,
|
|
1164
1384
|
input.start_line,
|
|
1165
1385
|
input.end_line
|
|
1166
1386
|
);
|
|
1167
1387
|
break;
|
|
1168
|
-
case
|
|
1388
|
+
case TOOL_NAME.WRITE_FILE:
|
|
1169
1389
|
result = await writeFile2(
|
|
1170
1390
|
input.path,
|
|
1171
1391
|
input.content,
|
|
1172
1392
|
input.overwrite
|
|
1173
1393
|
);
|
|
1174
1394
|
break;
|
|
1175
|
-
case
|
|
1395
|
+
case TOOL_NAME.LIST_DIRECTORY:
|
|
1176
1396
|
result = await listDirectory(
|
|
1177
1397
|
input.path,
|
|
1178
1398
|
input.recursive,
|
|
@@ -1180,113 +1400,147 @@ async function executeToolCall(toolName, input) {
|
|
|
1180
1400
|
);
|
|
1181
1401
|
break;
|
|
1182
1402
|
// network scanning
|
|
1183
|
-
case
|
|
1403
|
+
case TOOL_NAME.RUSTSCAN:
|
|
1184
1404
|
result = await executeRustscan(input);
|
|
1185
1405
|
break;
|
|
1186
|
-
case
|
|
1406
|
+
case TOOL_NAME.NMAP_SCAN:
|
|
1187
1407
|
result = await executeNmapScan(input);
|
|
1188
1408
|
break;
|
|
1189
|
-
case
|
|
1409
|
+
case TOOL_NAME.TCPDUMP_CAPTURE:
|
|
1190
1410
|
result = await executeTcpdump(input);
|
|
1191
1411
|
break;
|
|
1192
1412
|
// Web Tools
|
|
1193
|
-
case
|
|
1413
|
+
case TOOL_NAME.WEB_REQUEST:
|
|
1194
1414
|
result = await executeWebRequest(input);
|
|
1195
1415
|
break;
|
|
1196
|
-
case
|
|
1416
|
+
case TOOL_NAME.DIRECTORY_BRUTEFORCE:
|
|
1197
1417
|
result = await executeDirBruteforce(input);
|
|
1198
1418
|
break;
|
|
1199
|
-
case
|
|
1419
|
+
case TOOL_NAME.SQL_INJECTION:
|
|
1200
1420
|
result = await executeSqlmap(input);
|
|
1201
1421
|
break;
|
|
1202
|
-
case
|
|
1422
|
+
case TOOL_NAME.BROWSER_AUTOMATION:
|
|
1203
1423
|
result = await executeBrowserAutomation(input);
|
|
1204
1424
|
break;
|
|
1205
1425
|
// Exploitation Tools
|
|
1206
|
-
case
|
|
1426
|
+
case TOOL_NAME.SEARCHSPLOIT:
|
|
1207
1427
|
result = await executeSearchsploit(input);
|
|
1208
1428
|
break;
|
|
1209
|
-
case
|
|
1429
|
+
case TOOL_NAME.METASPLOIT:
|
|
1210
1430
|
result = await executeMetasploit(input);
|
|
1211
1431
|
break;
|
|
1212
|
-
case
|
|
1432
|
+
case TOOL_NAME.GENERATE_PAYLOAD:
|
|
1213
1433
|
result = await generatePayload(input);
|
|
1214
1434
|
break;
|
|
1215
1435
|
// Credential Tools
|
|
1216
|
-
case
|
|
1436
|
+
case TOOL_NAME.BRUTEFORCE_LOGIN:
|
|
1217
1437
|
result = await executeBruteforce(input);
|
|
1218
1438
|
break;
|
|
1219
|
-
case
|
|
1439
|
+
case TOOL_NAME.CRACK_HASH:
|
|
1220
1440
|
result = await executeCrackHash(input);
|
|
1221
1441
|
break;
|
|
1222
1442
|
// permission escalation
|
|
1223
|
-
case
|
|
1443
|
+
case TOOL_NAME.RUN_PRIVESC_ENUM:
|
|
1224
1444
|
result = await executePrivescEnum(input);
|
|
1225
1445
|
break;
|
|
1226
|
-
case
|
|
1446
|
+
case TOOL_NAME.CHECK_SUDO:
|
|
1227
1447
|
result = await checkSudo(input);
|
|
1228
1448
|
break;
|
|
1229
|
-
case
|
|
1449
|
+
case TOOL_NAME.FIND_SUID:
|
|
1230
1450
|
result = await findSuid(input);
|
|
1231
1451
|
break;
|
|
1232
1452
|
// Post-Exploitation
|
|
1233
|
-
case
|
|
1453
|
+
case TOOL_NAME.SETUP_TUNNEL:
|
|
1234
1454
|
result = await setupTunnel(input);
|
|
1235
1455
|
break;
|
|
1236
|
-
case
|
|
1456
|
+
case TOOL_NAME.DUMP_CREDENTIALS:
|
|
1237
1457
|
result = await dumpCredentials(input);
|
|
1238
1458
|
break;
|
|
1239
|
-
case
|
|
1459
|
+
case TOOL_NAME.LATERAL_MOVEMENT:
|
|
1240
1460
|
result = await executeLateralMovement(input);
|
|
1241
1461
|
break;
|
|
1242
1462
|
// Windows / SMB / AD Tools
|
|
1243
|
-
case
|
|
1463
|
+
case TOOL_NAME.NETCAT:
|
|
1244
1464
|
result = await executeNetcat(input);
|
|
1245
1465
|
break;
|
|
1246
|
-
case
|
|
1466
|
+
case TOOL_NAME.SMB_ENUM:
|
|
1247
1467
|
result = await executeSmbEnum(input);
|
|
1248
1468
|
break;
|
|
1249
|
-
case
|
|
1469
|
+
case TOOL_NAME.ENUM4LINUX:
|
|
1250
1470
|
result = await executeEnum4linux(input);
|
|
1251
1471
|
break;
|
|
1252
|
-
case
|
|
1472
|
+
case TOOL_NAME.CRACKMAPEXEC:
|
|
1253
1473
|
result = await executeCrackmapexec(input);
|
|
1254
1474
|
break;
|
|
1255
|
-
case
|
|
1475
|
+
case TOOL_NAME.SMBCLIENT:
|
|
1256
1476
|
result = await executeSmbclient(input);
|
|
1257
1477
|
break;
|
|
1258
|
-
case
|
|
1478
|
+
case TOOL_NAME.RPCCLIENT:
|
|
1259
1479
|
result = await executeRpcclient(input);
|
|
1260
1480
|
break;
|
|
1261
|
-
case
|
|
1481
|
+
case TOOL_NAME.WINRM:
|
|
1262
1482
|
result = await executeWinrm(input);
|
|
1263
1483
|
break;
|
|
1264
|
-
case
|
|
1484
|
+
case TOOL_NAME.RDP_CHECK:
|
|
1265
1485
|
result = await executeRdpCheck(input);
|
|
1266
1486
|
break;
|
|
1267
|
-
case
|
|
1487
|
+
case TOOL_NAME.LDAP_SEARCH:
|
|
1268
1488
|
result = await executeLdapSearch(input);
|
|
1269
1489
|
break;
|
|
1270
|
-
case
|
|
1490
|
+
case TOOL_NAME.KERBRUTE:
|
|
1271
1491
|
result = await executeKerbrute(input);
|
|
1272
1492
|
break;
|
|
1273
|
-
case
|
|
1493
|
+
case TOOL_NAME.BLOODHOUND:
|
|
1274
1494
|
result = await executeBloodhound(input);
|
|
1275
1495
|
break;
|
|
1276
|
-
case
|
|
1496
|
+
case TOOL_NAME.MSSQL_CLIENT:
|
|
1277
1497
|
result = await executeMssqlClient(input);
|
|
1278
1498
|
break;
|
|
1279
|
-
case
|
|
1499
|
+
case TOOL_NAME.MYSQL_CLIENT:
|
|
1280
1500
|
result = await executeMysqlClient(input);
|
|
1281
1501
|
break;
|
|
1282
|
-
case
|
|
1502
|
+
case TOOL_NAME.REVERSE_SHELL:
|
|
1283
1503
|
result = await executeReverseShell(input);
|
|
1284
1504
|
break;
|
|
1505
|
+
// Service Enumeration Tools
|
|
1506
|
+
case TOOL_NAME.ZONE_TRANSFER:
|
|
1507
|
+
result = await executeZoneTransfer(input);
|
|
1508
|
+
break;
|
|
1509
|
+
case TOOL_NAME.SNMP_WALK:
|
|
1510
|
+
result = await executeSnmpWalk(input);
|
|
1511
|
+
break;
|
|
1512
|
+
case TOOL_NAME.SNMP_CHECK:
|
|
1513
|
+
result = await executeSnmpCheck(input);
|
|
1514
|
+
break;
|
|
1515
|
+
case TOOL_NAME.ONESIXTYONE:
|
|
1516
|
+
result = await executeOnesixtyone(input);
|
|
1517
|
+
break;
|
|
1518
|
+
case TOOL_NAME.FTP_ENUM:
|
|
1519
|
+
result = await executeFtpEnum(input);
|
|
1520
|
+
break;
|
|
1521
|
+
case TOOL_NAME.FTP_ANON:
|
|
1522
|
+
result = await executeFtpAnon(input);
|
|
1523
|
+
break;
|
|
1524
|
+
case TOOL_NAME.NBTSCAN:
|
|
1525
|
+
result = await executeNbtscan(input);
|
|
1526
|
+
break;
|
|
1527
|
+
case TOOL_NAME.RPC_INFO:
|
|
1528
|
+
result = await executeRpcInfo(input);
|
|
1529
|
+
break;
|
|
1530
|
+
case TOOL_NAME.SHOWMOUNT:
|
|
1531
|
+
result = await executeShowmount(input);
|
|
1532
|
+
break;
|
|
1533
|
+
case TOOL_NAME.TELNET:
|
|
1534
|
+
result = await executeTelnet(input);
|
|
1535
|
+
break;
|
|
1536
|
+
case TOOL_NAME.HYDRA:
|
|
1537
|
+
result = await executeHydra(input);
|
|
1538
|
+
break;
|
|
1285
1539
|
// report
|
|
1286
|
-
case
|
|
1540
|
+
case TOOL_NAME.REPORT_FINDING:
|
|
1287
1541
|
result = await reportFinding(input);
|
|
1288
1542
|
break;
|
|
1289
|
-
case
|
|
1543
|
+
case TOOL_NAME.TAKE_SCREENSHOT:
|
|
1290
1544
|
result = await takeScreenshot(input);
|
|
1291
1545
|
break;
|
|
1292
1546
|
default:
|
|
@@ -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-
|
|
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-
|
|
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-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-NHTHJVRJ.js";
|
|
12
|
+
import "./chunk-FWXRDTSB.js";
|
|
13
13
|
import "./chunk-3RG5ZIWI.js";
|
|
14
14
|
export {
|
|
15
15
|
checkForUpdate,
|