From 9262832b86b0d5764fae7a30bf048b566299d754 Mon Sep 17 00:00:00 2001 From: byt3bl33d3r Date: Wed, 30 Mar 2016 11:37:34 -0600 Subject: [PATCH] Fixed missing imports when dumping NTDS via vss --- core/credentials/commonstructs.py | 1 + core/credentials/ntds.py | 3 +++ core/credentials/secretsdump.py | 6 +----- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/credentials/commonstructs.py b/core/credentials/commonstructs.py index 12283b62..937eb62b 100644 --- a/core/credentials/commonstructs.py +++ b/core/credentials/commonstructs.py @@ -1,4 +1,5 @@ from impacket.structure import Structure +from struct import unpack # Structures # Taken from http://insecurety.net/?p=768 diff --git a/core/credentials/ntds.py b/core/credentials/ntds.py index 57f81d61..e91f8b02 100644 --- a/core/credentials/ntds.py +++ b/core/credentials/ntds.py @@ -7,8 +7,11 @@ from binascii import hexlify, unhexlify from struct import unpack from datetime import datetime from core.credentials.cryptocommon import CryptoCommon +from Crypto.Cipher import DES, ARC4 +from core.credentials.commonstructs import SAMR_RPC_SID from impacket.ese import ESENT_DB import logging +import hashlib import random import string import os diff --git a/core/credentials/secretsdump.py b/core/credentials/secretsdump.py index 2f73b183..7a88d026 100644 --- a/core/credentials/secretsdump.py +++ b/core/credentials/secretsdump.py @@ -157,11 +157,7 @@ class DumpSecrets: def cleanup(self): logging.info('Cleaning up... ') if self.__remoteOps: - try: - self.__remoteOps.finish() - except DCERPCException: - sleep(5) - self.__remoteOps.finish() + self.__remoteOps.finish() if self.__SAMHashes: self.__SAMHashes.finish() if self.__LSASecrets: