Agent: Remove WormConfiguration references in Zerologon exploiter

This commit is contained in:
Shreya Malviya 2022-03-07 14:11:09 +05:30 committed by Mike Salvatore
parent 08cbf75b5f
commit aee3566a0c
1 changed files with 8 additions and 8 deletions

View File

@ -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):