You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
delegate_arg=smb_parser.add_argument("--delegate", action="store", help="Impersonate user with S4U2Self + S4U2Proxy")
8
10
self_delegate_arg=smb_parser.add_argument("--self", dest="no_s4u2proxy", action=get_conditional_action(_StoreTrueAction), make_required=[], help="Only do S4U2Self, no S4U2Proxy (use with delegate)")
11
+
9
12
dgroup=smb_parser.add_mutually_exclusive_group()
10
13
dgroup.add_argument("-d", metavar="DOMAIN", dest="domain", type=str, help="domain to authenticate to")
11
14
dgroup.add_argument("--local-auth", action="store_true", help="authenticate locally to each target")
15
+
12
16
smb_parser.add_argument("--port", type=int, choices={445, 139}, default=445, help="SMB port (default: 445)")
13
17
smb_parser.add_argument("--share", metavar="SHARE", default="C$", help="specify a share (default: C$)")
14
18
smb_parser.add_argument("--smb-server-port", default="445", help="specify a server port for SMB", type=int)
cgroup=smb_parser.add_argument_group("Credential Gathering", "Options for gathering credentials")
21
-
cgroup.add_argument("--sam", action="store_true", help="dump SAM hashes from target systems")
22
-
cgroup.add_argument("--lsa", action="store_true", help="dump LSA secrets from target systems")
23
-
cgroup.add_argument("--ntds", choices={"vss", "drsuapi"}, nargs="?", const="drsuapi", help="dump the NTDS.dit from target DCs using the specifed method\n(default: drsuapi)")
24
-
cgroup.add_argument("--dpapi", choices={"cookies", "nosystem"}, nargs="*", help='dump DPAPI secrets from target systems, can dump cookies if you add "cookies", will not dump SYSTEM dpapi if you add nosystem\n')
25
-
cgroup.add_argument("--mkfile", action="store", help="DPAPI option. File with masterkeys in form of {GUID}:SHA1")
26
-
cgroup.add_argument("--pvk", action="store", help="DPAPI option. File with domain backupkey")
27
-
cgroup.add_argument("--enabled", action="store_true", help="Only dump enabled targets from DC")
28
-
cgroup.add_argument("--user", dest="userntds", type=str, help="Dump selected user from DC")
24
+
cred_gathering_group=smb_parser.add_argument_group("Credential Gathering", "Options for gathering credentials")
25
+
cred_gathering_group.add_argument("--sam", action="store_true", help="dump SAM hashes from target systems")
26
+
cred_gathering_group.add_argument("--lsa", action="store_true", help="dump LSA secrets from target systems")
27
+
cred_gathering_group.add_argument("--ntds", choices={"vss", "drsuapi"}, nargs="?", const="drsuapi", help="dump the NTDS.dit from target DCs using the specifed method\n(default: drsuapi)")
28
+
cred_gathering_group.add_argument("--dpapi", choices={"cookies", "nosystem"}, nargs="*", help='dump DPAPI secrets from target systems, can dump cookies if you add "cookies", will not dump SYSTEM dpapi if you add nosystem\n')
29
+
cred_gathering_group.add_argument("--mkfile", action="store", help="DPAPI option. File with masterkeys in form of {GUID}:SHA1")
30
+
cred_gathering_group.add_argument("--pvk", action="store", help="DPAPI option. File with domain backupkey")
31
+
cred_gathering_group.add_argument("--enabled", action="store_true", help="Only dump enabled targets from DC")
32
+
cred_gathering_group.add_argument("--user", dest="userntds", type=str, help="Dump selected user from DC")
29
33
30
-
egroup=smb_parser.add_argument_group("Mapping/Enumeration", "Options for Mapping/Enumerating")
31
-
egroup.add_argument("--shares", action="store_true", help="enumerate shares and access")
32
-
egroup.add_argument("--no-write-check", action="store_true", help="Skip write check on shares (avoid leaving traces when missing delete permissions)")
33
-
34
-
egroup.add_argument("--filter-shares", nargs="+", help="Filter share by access, option 'read' 'write' or 'read,write'")
35
-
egroup.add_argument("--sessions", action="store_true", help="enumerate active sessions")
egroup.add_argument("--loggedon-users-filter", action="store", help="only search for specific user, works with regex")
38
-
egroup.add_argument("--loggedon-users", action="store_true", help="enumerate logged on users")
39
-
egroup.add_argument("--users", nargs="*", metavar="USER", help="enumerate domain users, if a user is specified than only its information is queried.")
40
-
egroup.add_argument("--groups", nargs="?", const="", metavar="GROUP", help="enumerate domain groups, if a group is specified than its members are enumerated")
egroup.add_argument("--local-groups", nargs="?", const="", metavar="GROUP", help="enumerate local groups, if a group is specified then its members are enumerated")
mapping_enum_group.add_argument("--loggedon-users-filter", action="store", help="only search for specific user, works with regex")
41
+
mapping_enum_group.add_argument("--loggedon-users", action="store_true", help="enumerate logged on users")
42
+
mapping_enum_group.add_argument("--users", nargs="*", metavar="USER", help="enumerate domain users, if a user is specified than only its information is queried.")
43
+
mapping_enum_group.add_argument("--groups", nargs="?", const="", metavar="GROUP", help="enumerate domain groups, if a group is specified than its members are enumerated")
mapping_enum_group.add_argument("--local-groups", nargs="?", const="", metavar="GROUP", help="enumerate local groups, if a group is specified then its members are enumerated")
tgroup=smb_parser.add_argument_group("Files", "Options for put and get remote files")
60
-
tgroup.add_argument("--put-file", action="append", nargs=2, metavar="FILE", help="Put a local file into remote target, ex: whoami.txt \\\\Windows\\\\Temp\\\\whoami.txt")
tgroup.add_argument("--append-host", action="store_true", help="append the host to the get-file filename")
64
+
files_group=smb_parser.add_argument_group("Files", "Options for remote file interaction")
65
+
files_group.add_argument("--put-file", action="append", nargs=2, metavar="FILE", help="Put a local file into remote target, ex: whoami.txt \\\\Windows\\\\Temp\\\\whoami.txt")
files_group.add_argument("--append-host", action="store_true", help="append the host to the get-file filename")
63
68
64
-
cegroup=smb_parser.add_argument_group("Command Execution", "Options for executing commands")
65
-
cegroup.add_argument("--exec-method", choices={"wmiexec", "mmcexec", "smbexec", "atexec"}, default=None, help="method to execute the command. Ignored if in MSSQL mode (default: wmiexec)")
66
-
cegroup.add_argument("--dcom-timeout", help="DCOM connection timeout, default is 5 secondes", type=int, default=5)
67
-
cegroup.add_argument("--get-output-tries", help="Number of times atexec/smbexec/mmcexec tries to get results, default is 5", type=int, default=5)
68
-
cegroup.add_argument("--codec", default="utf-8", help="Set encoding used (codec) from the target's output (default: utf-8). If errors are detected, run chcp.com at the target & map the result with https://docs.python.org/3/library/codecs.html#standard-encodings and then execute again with --codec and the corresponding codec")
69
-
cegroup.add_argument("--force-ps32", action="store_true", help="force the PowerShell command to run in a 32-bit process")
70
-
cegroup.add_argument("--no-output", action="store_true", help="do not retrieve command output")
69
+
cmd_exec_group=smb_parser.add_argument_group("Command Execution", "Options for executing commands")
70
+
cmd_exec_group.add_argument("--exec-method", choices={"wmiexec", "mmcexec", "smbexec", "atexec"}, default=None, help="method to execute the command. Ignored if in MSSQL mode (default: wmiexec)")
71
+
cmd_exec_group.add_argument("--dcom-timeout", help="DCOM connection timeout, default is 5 secondes", type=int, default=5)
72
+
cmd_exec_group.add_argument("--get-output-tries", help="Number of times atexec/smbexec/mmcexec tries to get results, default is 5", type=int, default=5)
73
+
cmd_exec_group.add_argument("--codec", default="utf-8", help="Set encoding used (codec) from the target's output (default: utf-8). If errors are detected, run chcp.com at the target & map the result with https://docs.python.org/3/library/codecs.html#standard-encodings and then execute again with --codec and the corresponding codec")
74
+
cmd_exec_group.add_argument("--no-output", action="store_true", help="do not retrieve command output")
0 commit comments