From aee3566a0c1885dc3455b75aba12f498b9039125 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Mon, 7 Mar 2022 14:11:09 +0530 Subject: [PATCH] Agent: Remove WormConfiguration references in Zerologon exploiter --- monkey/infection_monkey/exploit/zerologon.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/monkey/infection_monkey/exploit/zerologon.py b/monkey/infection_monkey/exploit/zerologon.py index 6f55ff106..43b872635 100644 --- a/monkey/infection_monkey/exploit/zerologon.py +++ b/monkey/infection_monkey/exploit/zerologon.py @@ -269,7 +269,7 @@ class ZerologonExploiter(HostExploiter): self._extracted_creds[user]["lm_hash"], self._extracted_creds[user]["nt_hash"], ) - self.add_extracted_creds_to_monkey_config( + self.add_extracted_creds_to_exploiter_options( user, self._extracted_creds[user]["lm_hash"], self._extracted_creds[user]["nt_hash"], @@ -290,15 +290,15 @@ class ZerologonExploiter(HostExploiter): ) # so other exploiters can use these creds - def add_extracted_creds_to_monkey_config(self, user: str, lmhash: str, nthash: str) -> None: - if user not in self._config.exploit_user_list: - self._config.exploit_user_list.append(user) + def add_extracted_creds_to_exploiter_options(self, user: str, lmhash: str, nthash: str) -> None: + if user not in self.options["credentials"]["exploit_user_list"]: + self.options["credentials"]["exploit_user_list"].append(user) - if lmhash not in self._config.exploit_lm_hash_list: - self._config.exploit_lm_hash_list.append(lmhash) + if lmhash not in self.options["credentials"]["exploit_lm_hash_list"]: + self.options["credentials"]["exploit_lm_hash_list"].append(lmhash) - if nthash not in self._config.exploit_ntlm_hash_list: - self._config.exploit_ntlm_hash_list.append(nthash) + if nthash not in self.options["credentials"]["exploit_ntlm_hash_list"]: + self.options["credentials"]["exploit_ntlm_hash_list"].append(nthash) def get_original_pwd_nthash(self, username: str, user_pwd_hashes: List[str]) -> str: if not self.save_HKLM_keys_locally(username, user_pwd_hashes):