Now suppressing exceptions in cloud info collection as well
This commit is contained in:
parent
74dbb053a6
commit
177e1ea990
|
@ -122,9 +122,11 @@ class InfoCollector(object):
|
||||||
def get_azure_info(self):
|
def get_azure_info(self):
|
||||||
"""
|
"""
|
||||||
Adds credentials possibly stolen from an Azure VM instance (if we're on one)
|
Adds credentials possibly stolen from an Azure VM instance (if we're on one)
|
||||||
Updates the credentials structure, creating it if neccesary (compat with mimikatz)
|
Updates the credentials structure, creating it if necessary (compat with mimikatz)
|
||||||
:return: None. Updates class information
|
:return: None. Updates class information
|
||||||
"""
|
"""
|
||||||
|
# noinspection PyBroadException
|
||||||
|
try:
|
||||||
from infection_monkey.config import WormConfiguration
|
from infection_monkey.config import WormConfiguration
|
||||||
if not WormConfiguration.extract_azure_creds:
|
if not WormConfiguration.extract_azure_creds:
|
||||||
return
|
return
|
||||||
|
@ -144,6 +146,14 @@ class InfoCollector(object):
|
||||||
if len(azure_creds) != 0:
|
if len(azure_creds) != 0:
|
||||||
self.info["Azure"] = {}
|
self.info["Azure"] = {}
|
||||||
self.info["Azure"]['usernames'] = [cred[0] for cred in azure_creds]
|
self.info["Azure"]['usernames'] = [cred[0] for cred in azure_creds]
|
||||||
|
except Exception:
|
||||||
|
# If we failed to collect azure info, no reason to fail all the collection. Log and continue.
|
||||||
|
LOG.error("Failed collecting Azure info.", exc_info=True)
|
||||||
|
|
||||||
def get_aws_info(self):
|
def get_aws_info(self):
|
||||||
|
# noinspection PyBroadException
|
||||||
|
try:
|
||||||
self.info['aws'] = AwsCollector().get_aws_info()
|
self.info['aws'] = AwsCollector().get_aws_info()
|
||||||
|
except Exception:
|
||||||
|
# If we failed to collect aws info, no reason to fail all the collection. Log and continue.
|
||||||
|
LOG.error("Failed collecting AWS info.", exc_info=True)
|
||||||
|
|
Loading…
Reference in New Issue