From 4e7e4a9eee7a3fa49157a578f005b8e1c660519a Mon Sep 17 00:00:00 2001 From: vakarisz Date: Wed, 9 Mar 2022 12:56:41 +0200 Subject: [PATCH] Agent: replace get_monkey_depth with self.current_depth --- monkey/infection_monkey/exploit/wmiexec.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/monkey/infection_monkey/exploit/wmiexec.py b/monkey/infection_monkey/exploit/wmiexec.py index 43d3058b6..7c92a082d 100644 --- a/monkey/infection_monkey/exploit/wmiexec.py +++ b/monkey/infection_monkey/exploit/wmiexec.py @@ -7,7 +7,6 @@ from impacket.dcerpc.v5.rpcrt import DCERPCException from common.utils.exploit_enum import ExploitType from infection_monkey.exploit.HostExploiter import HostExploiter -from infection_monkey.exploit.tools.helpers import get_monkey_depth from infection_monkey.exploit.tools.smb_tools import SmbTools from infection_monkey.exploit.tools.wmi_tools import AccessDeniedException, WmiTools from infection_monkey.i_puppet import ExploiterResultData @@ -97,13 +96,13 @@ class WmiExploiter(HostExploiter): "dropper_path": remote_full_path } + build_monkey_commandline( self.host, - get_monkey_depth() - 1, + self.current_depth, self.options["dropper_target_path_win_64"], ) else: cmdline = MONKEY_CMDLINE_WINDOWS % { "monkey_path": remote_full_path - } + build_monkey_commandline(self.host, get_monkey_depth() - 1) + } + build_monkey_commandline(self.host, self.current_depth) # execute the remote monkey result = WmiTools.get_object(wmi_connection, "Win32_Process").Create(