From 36bd9834a67282e4967277b48ad7ac6a3169b9ec Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Wed, 24 Feb 2021 15:07:42 -0500 Subject: [PATCH] agent: add zerologon password restore success/failure to telemetry --- monkey/infection_monkey/exploit/zerologon.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/monkey/infection_monkey/exploit/zerologon.py b/monkey/infection_monkey/exploit/zerologon.py index dee5c349a..b9ee1a1ff 100644 --- a/monkey/infection_monkey/exploit/zerologon.py +++ b/monkey/infection_monkey/exploit/zerologon.py @@ -38,6 +38,7 @@ class ZerologonExploiter(HostExploiter): super().__init__(host) self.vulnerable_port = None self.exploit_info["credentials"] = {} + self.exploit_info["password_restore_success"] = None self._extracted_creds = {} def _exploit_host(self) -> bool: @@ -62,9 +63,11 @@ class ZerologonExploiter(HostExploiter): # Restore DC's original password. if _exploited: if self.restore_password(): + self.exploit_info["password_restore_success"] = True self.store_extracted_creds_for_exploitation() LOG.info("System exploited and password restored successfully.") else: + self.exploit_info["password_restore_success"] = False LOG.info("System exploited but couldn't restore password!") else: LOG.info("System was not exploited.")