forked from p15670423/monkey
Merge pull request #1512 from guardicore/mimikatz_collector_fix
Mimikatz collector fix
This commit is contained in:
commit
0a4973a66e
|
@ -46,6 +46,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
- Some of the gathered credentials no longer appear in database plaintext. #1454
|
- Some of the gathered credentials no longer appear in database plaintext. #1454
|
||||||
- Encryptor breaking with UTF-8 characters. (Passwords in different languages can be submitted in
|
- Encryptor breaking with UTF-8 characters. (Passwords in different languages can be submitted in
|
||||||
the config successfully now.) #1490
|
the config successfully now.) #1490
|
||||||
|
- Mimikatz collector no longer fails if Azure credential collector is disabled. #1512 #1493
|
||||||
|
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
|
@ -59,7 +59,7 @@ class InfoCollector(object):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.info = {}
|
self.info = {"credentials": {}}
|
||||||
|
|
||||||
def get_info(self):
|
def get_info(self):
|
||||||
# Collect all hardcoded
|
# Collect all hardcoded
|
||||||
|
@ -96,8 +96,6 @@ class InfoCollector(object):
|
||||||
return
|
return
|
||||||
logger.debug("Harvesting creds if on an Azure machine")
|
logger.debug("Harvesting creds if on an Azure machine")
|
||||||
azure_collector = AzureCollector()
|
azure_collector = AzureCollector()
|
||||||
if "credentials" not in self.info:
|
|
||||||
self.info["credentials"] = {}
|
|
||||||
azure_creds = azure_collector.extract_stored_credentials()
|
azure_creds = azure_collector.extract_stored_credentials()
|
||||||
for cred in azure_creds:
|
for cred in azure_creds:
|
||||||
username = cred[0]
|
username = cred[0]
|
||||||
|
|
|
@ -45,8 +45,7 @@ class WindowsInfoCollector(InfoCollector):
|
||||||
try:
|
try:
|
||||||
credentials = MimikatzCredentialCollector.get_creds()
|
credentials = MimikatzCredentialCollector.get_creds()
|
||||||
if credentials:
|
if credentials:
|
||||||
if "credentials" in self.info:
|
self.info["credentials"].update(credentials)
|
||||||
self.info["credentials"].update(credentials)
|
|
||||||
logger.info("Mimikatz info gathered successfully")
|
logger.info("Mimikatz info gathered successfully")
|
||||||
else:
|
else:
|
||||||
logger.info("No mimikatz info was gathered")
|
logger.info("No mimikatz info was gathered")
|
||||||
|
|
Loading…
Reference in New Issue