diff --git a/netexec.spec b/netexec.spec index d42488a14..67ff23459 100644 --- a/netexec.spec +++ b/netexec.spec @@ -38,6 +38,7 @@ a = Analysis( 'nxc.protocols.smb.smbspider', 'nxc.protocols.smb.passpol', 'nxc.protocols.mssql.mssqlexec', + 'nxc.parsers.ldap_results', 'nxc.helpers.bash', 'nxc.helpers.bloodhound', 'nxc.helpers.msada_guids', @@ -71,6 +72,7 @@ a = Analysis( 'dploot.lib.smb', 'pyasn1_modules.rfc5652', 'unicrypto.backends.pycryptodomex', + 'dateutil.relativedelta', 'sspilib.raw._text', ], hookspath=['./nxc/.hooks'], diff --git a/nxc/modules/msol.py b/nxc/modules/msol.py index 0daa3e6e1..0a2b44ccf 100644 --- a/nxc/modules/msol.py +++ b/nxc/modules/msol.py @@ -3,7 +3,7 @@ # Based on the article : https://blog.xpnsec.com/azuread-connect-for-redteam/ from sys import exit from os import path -import sys +from nxc.paths import TMP_PATH from nxc.helpers.powershell import get_ps_script @@ -49,14 +49,14 @@ def exec_script(self, _, connection): def on_admin_login(self, context, connection): if self.use_embedded: - file_to_upload = "/tmp/msol.ps1" + file_to_upload = f"{TMP_PATH}/msol.ps1" try: with open(file_to_upload, "w") as msol: msol.write(self.msol_embedded) except FileNotFoundError: context.log.fail(f"Impersonate file specified '{file_to_upload}' does not exist!") - sys.exit(1) + exit(1) else: if path.isfile(self.MSOL_PS1): diff --git a/nxc/modules/scuffy.py b/nxc/modules/scuffy.py index 900e25e6a..701995b27 100644 --- a/nxc/modules/scuffy.py +++ b/nxc/modules/scuffy.py @@ -1,5 +1,6 @@ import ntpath from sys import exit +from nxc.paths import TMP_PATH class NXCModule: @@ -44,7 +45,7 @@ def options(self, context, module_options): exit(1) self.scf_name = module_options["NAME"] - self.scf_path = f"/tmp/{self.scf_name}.scf" + self.scf_path = f"{TMP_PATH}/{self.scf_name}.scf" self.file_path = ntpath.join("\\", f"{self.scf_name}.scf") if not self.cleanup: