diff --git a/donpapi/lib/secretsdump.py b/donpapi/lib/secretsdump.py index 1ec3645..9c4682a 100644 --- a/donpapi/lib/secretsdump.py +++ b/donpapi/lib/secretsdump.py @@ -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): diff --git a/donpapi/myseatbelt.py b/donpapi/myseatbelt.py index bb43053..9ad3dc4 100644 --- a/donpapi/myseatbelt.py +++ b/donpapi/myseatbelt.py @@ -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)