diff --git a/nxc/modules/backup_operator.py b/nxc/modules/backup_operator.py index 88550dc17..0eb777f51 100644 --- a/nxc/modules/backup_operator.py +++ b/nxc/modules/backup_operator.py @@ -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): @@ -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: