Skip to content

Commit

Permalink
update module
Browse files Browse the repository at this point in the history
  • Loading branch information
mpgn committed Jan 13, 2025
1 parent f999da0 commit 5e04926
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nxc/modules/backup_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ def parse_sam(secret):
context.log.fail(f"Fail to dump the sam and lsa: {e!s}")

if self.domain_admin:
context.log.display(f"Cleaning dump with user {self.domain_admin} and hash {self.domain_admin_hash} on domain {connection.domain}")
connection.conn.logoff()
connection.create_conn_obj()
if connection.hash_login(connection.domain, self.domain_admin, self.domain_admin_hash):
Expand All @@ -92,6 +91,7 @@ def parse_sam(secret):
except Exception as e:
context.log.fail(f"Fail to dump the NTDS: {e!s}")

context.log.display(f"Cleaning dump with user {self.domain_admin} and hash {self.domain_admin_hash} on domain {connection.domain}")
connection.execute("del C:\\Windows\\sysvol\\sysvol\\SECURITY && del C:\\Windows\\sysvol\\sysvol\\SAM && del C:\\Windows\\sysvol\\sysvol\\SYSTEM")
for hive in ["SAM", "SECURITY", "SYSTEM"]:
try:
Expand Down

0 comments on commit 5e04926

Please sign in to comment.