pentesting 0.6.0 → 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.
- package/dist/{auto-update-QFDCCKMW.js → auto-update-NF5LOTTR.js} +2 -2
- package/dist/{chunk-CJOLRYUP.js → chunk-FWXRDTSB.js} +36 -2
- package/dist/{chunk-LP7NNB7C.js → chunk-NHTHJVRJ.js} +1 -1
- package/dist/index.js +467 -11
- package/dist/{update-OI7M5ERV.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,
|
|
@@ -93,11 +93,41 @@ var TOOL_NAME = {
|
|
|
93
93
|
READ_FILE: "read_file",
|
|
94
94
|
WRITE_FILE: "write_file",
|
|
95
95
|
LIST_DIRECTORY: "list_directory",
|
|
96
|
-
// Network - Basic
|
|
96
|
+
// Network - Basic Connectivity
|
|
97
|
+
PING: "ping",
|
|
98
|
+
TRACEROUTE: "traceroute",
|
|
97
99
|
RUSTSCAN: "rustscan",
|
|
98
100
|
NMAP_SCAN: "nmap_scan",
|
|
101
|
+
MASSCAN: "masscan",
|
|
99
102
|
TCPDUMP_CAPTURE: "tcpdump_capture",
|
|
100
103
|
NETCAT: "netcat",
|
|
104
|
+
// DNS & Subdomain
|
|
105
|
+
DIG: "dig",
|
|
106
|
+
HOST: "host",
|
|
107
|
+
NSLOOKUP: "nslookup",
|
|
108
|
+
WHOIS: "whois",
|
|
109
|
+
SUBFINDER: "subfinder",
|
|
110
|
+
AMASS: "amass",
|
|
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",
|
|
123
|
+
// Web Recon & Tech Identification
|
|
124
|
+
WHATWEB: "whatweb",
|
|
125
|
+
HTTPX: "httpx",
|
|
126
|
+
NUCLEI: "nuclei",
|
|
127
|
+
NIKTO: "nikto",
|
|
128
|
+
FFUF: "ffuf",
|
|
129
|
+
FEROXBUSTER: "feroxbuster",
|
|
130
|
+
WAYBACKURLS: "waybackurls",
|
|
101
131
|
// Windows/SMB/AD
|
|
102
132
|
SMB_ENUM: "smb_enum",
|
|
103
133
|
ENUM4LINUX: "enum4linux",
|
|
@@ -109,9 +139,12 @@ var TOOL_NAME = {
|
|
|
109
139
|
LDAP_SEARCH: "ldap_search",
|
|
110
140
|
KERBRUTE: "kerbrute",
|
|
111
141
|
BLOODHOUND: "bloodhound",
|
|
112
|
-
// Database
|
|
142
|
+
// Database Clients
|
|
113
143
|
MSSQL_CLIENT: "mssql_client",
|
|
114
144
|
MYSQL_CLIENT: "mysql_client",
|
|
145
|
+
PSQL_CLIENT: "psql_client",
|
|
146
|
+
REDIS_CLI: "redis_cli",
|
|
147
|
+
MONGO_CLIENT: "mongo_client",
|
|
115
148
|
// Web
|
|
116
149
|
WEB_REQUEST: "web_request",
|
|
117
150
|
DIRECTORY_BRUTEFORCE: "directory_bruteforce",
|
|
@@ -125,6 +158,7 @@ var TOOL_NAME = {
|
|
|
125
158
|
BRUTEFORCE_LOGIN: "bruteforce_login",
|
|
126
159
|
CRACK_HASH: "crack_hash",
|
|
127
160
|
DUMP_CREDENTIALS: "dump_credentials",
|
|
161
|
+
HYDRA: "hydra",
|
|
128
162
|
// Privilege Escalation
|
|
129
163
|
CHECK_SUDO: "check_sudo",
|
|
130
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,
|
|
@@ -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";
|
|
@@ -2303,23 +2649,133 @@ var HIGH_RISK_PATTERNS = [
|
|
|
2303
2649
|
/meterpreter/i,
|
|
2304
2650
|
/mimikatz/i
|
|
2305
2651
|
];
|
|
2652
|
+
var LOW_RISK_TOOLS = [
|
|
2653
|
+
"ping",
|
|
2654
|
+
"traceroute",
|
|
2655
|
+
"tracert",
|
|
2656
|
+
"mtr",
|
|
2657
|
+
"dig",
|
|
2658
|
+
"host",
|
|
2659
|
+
"nslookup",
|
|
2660
|
+
"whois",
|
|
2661
|
+
"dnsenum",
|
|
2662
|
+
"zone_transfer",
|
|
2663
|
+
"curl",
|
|
2664
|
+
"wget",
|
|
2665
|
+
"httpx",
|
|
2666
|
+
"whatweb",
|
|
2667
|
+
"rustscan",
|
|
2668
|
+
"nmap_scan",
|
|
2669
|
+
"nmap",
|
|
2670
|
+
"masscan",
|
|
2671
|
+
"subfinder",
|
|
2672
|
+
"amass",
|
|
2673
|
+
"assetfinder",
|
|
2674
|
+
"ffuf",
|
|
2675
|
+
"gobuster",
|
|
2676
|
+
"feroxbuster",
|
|
2677
|
+
"dirsearch",
|
|
2678
|
+
"smbclient",
|
|
2679
|
+
"rpcclient",
|
|
2680
|
+
"enum4linux",
|
|
2681
|
+
"ldapsearch",
|
|
2682
|
+
"netcat",
|
|
2683
|
+
"nc",
|
|
2684
|
+
"telnet",
|
|
2685
|
+
"ftp",
|
|
2686
|
+
"ftp_enum",
|
|
2687
|
+
"ftp_anon",
|
|
2688
|
+
"snmp_walk",
|
|
2689
|
+
"snmp_check",
|
|
2690
|
+
"onesixtyone",
|
|
2691
|
+
"nbtscan",
|
|
2692
|
+
"rpc_info",
|
|
2693
|
+
"showmount",
|
|
2694
|
+
"read_file",
|
|
2695
|
+
"list_directory",
|
|
2696
|
+
"cat",
|
|
2697
|
+
"ls",
|
|
2698
|
+
"find",
|
|
2699
|
+
"grep",
|
|
2700
|
+
"searchsploit",
|
|
2701
|
+
"nikto",
|
|
2702
|
+
"nuclei",
|
|
2703
|
+
"web_request",
|
|
2704
|
+
"directory_bruteforce"
|
|
2705
|
+
];
|
|
2706
|
+
var LOW_RISK_PATTERNS = [
|
|
2707
|
+
/^ping\s/i,
|
|
2708
|
+
/^traceroute\s/i,
|
|
2709
|
+
/^tracert\s/i,
|
|
2710
|
+
/^mtr\s/i,
|
|
2711
|
+
/^dig\s/i,
|
|
2712
|
+
/^host\s/i,
|
|
2713
|
+
/^nslookup\s/i,
|
|
2714
|
+
/^whois\s/i,
|
|
2715
|
+
/^curl\s/i,
|
|
2716
|
+
/^wget\s/i,
|
|
2717
|
+
/^nmap\s/i,
|
|
2718
|
+
/^rustscan\s/i,
|
|
2719
|
+
/^masscan\s/i,
|
|
2720
|
+
/^subfinder/i,
|
|
2721
|
+
/^amass\s/i,
|
|
2722
|
+
/^ffuf\s/i,
|
|
2723
|
+
/^gobuster\s/i,
|
|
2724
|
+
/^feroxbuster\s/i,
|
|
2725
|
+
/^whatweb\s/i,
|
|
2726
|
+
/^httpx\s/i,
|
|
2727
|
+
/^nikto\s/i,
|
|
2728
|
+
/^nuclei\s/i,
|
|
2729
|
+
/^smbclient\s/i,
|
|
2730
|
+
/^rpcclient\s/i,
|
|
2731
|
+
/^enum4linux\s/i,
|
|
2732
|
+
/^ldapsearch\s/i,
|
|
2733
|
+
/^crackmapexec\s.*--shares/i,
|
|
2734
|
+
/^crackmapexec\s.*--users/i,
|
|
2735
|
+
/^searchsploit\s/i,
|
|
2736
|
+
/^cat\s/i,
|
|
2737
|
+
/^ls\s/i,
|
|
2738
|
+
/^find\s/i,
|
|
2739
|
+
/^grep\s/i,
|
|
2740
|
+
/^head\s/i,
|
|
2741
|
+
/^tail\s/i,
|
|
2742
|
+
/^file\s/i,
|
|
2743
|
+
/^strings\s/i,
|
|
2744
|
+
/^netstat/i,
|
|
2745
|
+
/^ss\s/i,
|
|
2746
|
+
/^arp\s/i,
|
|
2747
|
+
/^ip\s+a/i,
|
|
2748
|
+
/^ifconfig/i,
|
|
2749
|
+
/^id$/i,
|
|
2750
|
+
/^whoami$/i,
|
|
2751
|
+
/^uname/i,
|
|
2752
|
+
/^hostname/i,
|
|
2753
|
+
/^pwd$/i,
|
|
2754
|
+
/^env$/i,
|
|
2755
|
+
/^echo\s/i
|
|
2756
|
+
];
|
|
2306
2757
|
function assessRisk(toolName, toolInput) {
|
|
2307
2758
|
const inputStr = JSON.stringify(toolInput).toLowerCase();
|
|
2759
|
+
const command = toolInput.command || "";
|
|
2308
2760
|
for (const pattern of HIGH_RISK_PATTERNS) {
|
|
2309
|
-
if (pattern.test(inputStr)) {
|
|
2761
|
+
if (pattern.test(inputStr) || pattern.test(command)) {
|
|
2310
2762
|
return "critical";
|
|
2311
2763
|
}
|
|
2312
2764
|
}
|
|
2313
|
-
if (
|
|
2314
|
-
return "
|
|
2765
|
+
if (LOW_RISK_TOOLS.includes(toolName)) {
|
|
2766
|
+
return "low";
|
|
2315
2767
|
}
|
|
2316
|
-
if (toolName
|
|
2317
|
-
|
|
2768
|
+
if (toolName === "bash" && command) {
|
|
2769
|
+
for (const pattern of LOW_RISK_PATTERNS) {
|
|
2770
|
+
if (pattern.test(command.trim())) {
|
|
2771
|
+
return "low";
|
|
2772
|
+
}
|
|
2773
|
+
}
|
|
2318
2774
|
}
|
|
2319
|
-
if (
|
|
2320
|
-
return "
|
|
2775
|
+
if (CRITICAL_TOOLS.includes(toolName)) {
|
|
2776
|
+
return "high";
|
|
2321
2777
|
}
|
|
2322
|
-
return "
|
|
2778
|
+
return "medium";
|
|
2323
2779
|
}
|
|
2324
2780
|
function generateRequestId() {
|
|
2325
2781
|
return `approval_${Date.now()}_${Math.random().toString(36).substring(2, 8)}`;
|
|
@@ -5951,7 +6407,7 @@ var App = ({ autoApprove = false, target }) => {
|
|
|
5951
6407
|
setCheckpointCount(contextManagerRef.current?.getCheckpoints().length || 0);
|
|
5952
6408
|
}
|
|
5953
6409
|
});
|
|
5954
|
-
import("./auto-update-
|
|
6410
|
+
import("./auto-update-NF5LOTTR.js").then(({ checkForUpdateAsync, formatUpdateNotification }) => {
|
|
5955
6411
|
checkForUpdateAsync().then((result) => {
|
|
5956
6412
|
if (result.hasUpdate) {
|
|
5957
6413
|
const notification = formatUpdateNotification(result);
|
|
@@ -6545,7 +7001,7 @@ ${list}`);
|
|
|
6545
7001
|
return;
|
|
6546
7002
|
case "update":
|
|
6547
7003
|
try {
|
|
6548
|
-
const { checkForUpdate, formatUpdateNotification, doUpdate } = await import("./update-
|
|
7004
|
+
const { checkForUpdate, formatUpdateNotification, doUpdate } = await import("./update-WBBD5QMK.js");
|
|
6549
7005
|
const result = checkForUpdate(true);
|
|
6550
7006
|
if (result.hasUpdate) {
|
|
6551
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,
|