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
# we do module arg parsing here so we can reference the module_list attribute below
@@ -64,9 +75,9 @@ def gen_cli_args():
64
75
module_parser.add_argument("--server-port", metavar="PORT", type=int, help="start the server on the specified port")
65
76
module_parser.add_argument("--connectback-host", type=str, metavar="CHOST", help="IP for the remote system to connect back to (default: same as server-host)")
std_parser.add_argument("target", nargs="+"ifnot (module_parser.parse_known_args()[0].list_modulesormodule_parser.parse_known_args()[0].show_module_options) else"*", type=str, help="the target IP(s), range(s), CIDR(s), hostname(s), FQDN(s), file(s) containing a list of targets, NMap XML or .Nessus file(s)")
71
82
std_parser.add_argument("-id", metavar="CRED_ID", nargs="+", default=[], type=str, dest="cred_id", help="database credential ID(s) to use for authentication")
72
83
std_parser.add_argument("-u", metavar="USERNAME", dest="username", nargs="+", default=[], help="username(s) or file(s) containing usernames")
@@ -76,7 +87,6 @@ def gen_cli_args():
76
87
std_parser.add_argument("--no-bruteforce", action="store_true", help="No spray when using file for username and password (user1 => password1, user2 => password2")
77
88
std_parser.add_argument("--continue-on-success", action="store_true", help="continues authentication attempts even after successes")
78
89
std_parser.add_argument("--use-kcache", action="store_true", help="Use Kerberos authentication from ccache file (KRB5CCNAME)")
79
-
std_parser.add_argument("--log", metavar="LOG", help="Export result into a custom file")
80
90
std_parser.add_argument("--aesKey", metavar="AESKEY", nargs="+", help="AES key to use for Kerberos Authentication (128 or 256 bits)")
81
91
std_parser.add_argument("--kdcHost", metavar="KDCHOST", help="FQDN of the domain controller. If omitted it will use the domain part (FQDN) specified in the target parameter")
delegate_arg=smb_parser.add_argument("--delegate", action="store", help="Impersonate user with S4U2Self + S4U2Proxy")
8
8
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)")
cgroup.add_argument("--lsa", action="store_true", help="dump LSA secrets from target systems")
23
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
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
-
26
-
ngroup=smb_parser.add_argument_group("Credential Gathering", "Options for gathering credentials")
27
-
ngroup.add_argument("--mkfile", action="store", help="DPAPI option. File with masterkeys in form of {GUID}:SHA1")
28
-
ngroup.add_argument("--pvk", action="store", help="DPAPI option. File with domain backupkey")
29
-
ngroup.add_argument("--enabled", action="store_true", help="Only dump enabled targets from DC")
30
-
ngroup.add_argument("--user", dest="userntds", type=str, help="Dump selected user from DC")
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")
31
29
32
30
egroup=smb_parser.add_argument_group("Mapping/Enumeration", "Options for Mapping/Enumerating")
33
31
egroup.add_argument("--shares", action="store_true", help="enumerate shares and access")
tgroup.add_argument("--append-host", action="store_true", help="append the host to the get-file filename")
65
63
66
-
cgroup=smb_parser.add_argument_group("Command Execution", "Options for executing commands")
67
-
cgroup.add_argument("--exec-method", choices={"wmiexec", "mmcexec", "smbexec", "atexec"}, default=None, help="method to execute the command. Ignored if in MSSQL mode (default: wmiexec)")
68
-
cgroup.add_argument("--dcom-timeout", help="DCOM connection timeout, default is 5 secondes", type=int, default=5)
69
-
cgroup.add_argument("--get-output-tries", help="Number of times atexec/smbexec/mmcexec tries to get results, default is 5", type=int, default=5)
70
-
cgroup.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")
71
-
cgroup.add_argument("--force-ps32", action="store_true", help="force the PowerShell command to run in a 32-bit process")
72
-
cgroup.add_argument("--no-output", action="store_true", help="do not retrieve command output")
73
-
cegroup=cgroup.add_mutually_exclusive_group()
74
-
cegroup.add_argument("-x", metavar="COMMAND", dest="execute", help="execute the specified CMD command")
75
-
cegroup.add_argument("-X", metavar="PS_COMMAND", dest="ps_execute", help="execute the specified PowerShell command")
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")
71
+
# command execution method
72
+
cemgroup=cgroup.add_mutually_exclusive_group()
73
+
cemgroup.add_argument("-x", metavar="COMMAND", dest="execute", help="execute the specified CMD command")
74
+
cemgroup.add_argument("-X", metavar="PS_COMMAND", dest="ps_execute", help="execute the specified PowerShell command")
75
+
76
76
psgroup=smb_parser.add_argument_group("Powershell Obfuscation", "Options for PowerShell script obfuscation")
Copy file name to clipboardExpand all lines: nxc/protocols/ssh/proto_args.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
fromargparseimport_StoreAction
2
2
3
-
defproto_args(parser, std_parser, module_parser):
4
-
ssh_parser=parser.add_parser("ssh", help="own stuff using SSH", parents=[std_parser, module_parser])
3
+
defproto_args(parser, parents):
4
+
ssh_parser=parser.add_parser("ssh", help="own stuff using SSH", parents=parents)
5
5
ssh_parser.add_argument("--key-file", type=str, help="Authenticate using the specified private key. Treats the password parameter as the key's passphrase.")
6
6
ssh_parser.add_argument("--port", type=int, default=22, help="SSH port (default: 22)")
7
7
ssh_parser.add_argument("--ssh-timeout", help="SSH connection timeout, default is %(default)s secondes", type=int, default=15)
0 commit comments