Fix registry stacktrace

This commit is contained in:
zblurx 2023-07-29 11:46:01 +02:00
parent 158c263d31
commit be27cbaeba
2 changed files with 3 additions and 2 deletions

View File

@ -297,7 +297,7 @@ class RemoteFile:
def __init__(self, smbConnection, fileName):
self.__smbConnection = smbConnection
self.__fileName = fileName
self.__tid = self.__smbConnection.connectTree('ADMIN$')
self.__tid = self.__smbConnection.connectTree('C$')
self.__fid = None
self.__currentOffset = 0
@ -335,7 +335,7 @@ class RemoteFile:
def close(self):
if self.__fid is not None:
self.__smbConnection.closeFile(self.__tid, self.__fid)
self.__smbConnection.deleteFile('ADMIN$', self.__fileName)
self.__smbConnection.deleteFile('C$$', self.__fileName)
self.__fid = None
def tell(self):

View File

@ -2052,6 +2052,7 @@ class MySeatBelt:
self.__LSASecrets.dumpCachedHashes()
self.logging.debug("dump cached hashes")
self.__LSASecrets.dumpSecrets()
self.__LSASecrets.finish()
filedest = os.path.join(os.path.join(self.options.output_directory, self.options.target_ip), 'LSA')
Path(os.path.split(filedest.replace('\\', '/'))[0]).mkdir(parents=True, exist_ok=True)