Skip to content

Commit

Permalink
Merge branch 'main' into neff-putty
Browse files Browse the repository at this point in the history
  • Loading branch information
NeffIsBack authored Apr 5, 2024
2 parents a03e772 + 2f62e1c commit b123a4d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions netexec.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -71,6 +72,7 @@ a = Analysis(
'dploot.lib.smb',
'pyasn1_modules.rfc5652',
'unicrypto.backends.pycryptodomex',
'dateutil.relativedelta',
'sspilib.raw._text',
],
hookspath=['./nxc/.hooks'],
Expand Down
6 changes: 3 additions & 3 deletions nxc/modules/msol.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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):
Expand Down
3 changes: 2 additions & 1 deletion nxc/modules/scuffy.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import ntpath
from sys import exit
from nxc.paths import TMP_PATH


class NXCModule:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit b123a4d

Please sign in to comment.