diff --git a/monkey/infection_monkey/exploit/wmiexec.py b/monkey/infection_monkey/exploit/wmiexec.py index bfa428856..4adce62d9 100644 --- a/monkey/infection_monkey/exploit/wmiexec.py +++ b/monkey/infection_monkey/exploit/wmiexec.py @@ -68,21 +68,6 @@ class WmiExploiter(HostExploiter): self.report_login_attempt(True, user, password, lm_hash, ntlm_hash) self.exploit_result.exploitation_success = True - # TODO: This check is racey at best. Is it really necessary? If we execute an agent on - # the victim and there's one already running, it will stop itself. - # query process list and check if monkey already running on victim - process_list = WmiTools.list_object( - wmi_connection, - "Win32_Process", - fields=("Caption",), - where=f"Name='{ntpath.split(self.options['dropper_target_path_win_64'])[-1]}'", - ) - if process_list: - wmi_connection.close() - - logger.debug("Skipping %r - already infected", self.host) - return self.exploit_result - downloaded_agent = self.agent_repository.get_agent_binary(self.host.os["type"]) remote_full_path = SmbTools.copy_file(