From 16535e06c7d8c636e6891f1291465e91d257cfa4 Mon Sep 17 00:00:00 2001 From: vakaris_zilius Date: Wed, 9 Mar 2022 12:35:45 +0000 Subject: [PATCH] Agent: fix a bug in WMI exploiter related to depth --- monkey/infection_monkey/exploit/wmiexec.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monkey/infection_monkey/exploit/wmiexec.py b/monkey/infection_monkey/exploit/wmiexec.py index 7fa7cd95b..de7ab58c7 100644 --- a/monkey/infection_monkey/exploit/wmiexec.py +++ b/monkey/infection_monkey/exploit/wmiexec.py @@ -95,13 +95,13 @@ class WmiExploiter(HostExploiter): "dropper_path": remote_full_path } + build_monkey_commandline( self.host, - self.current_depth, + self.current_depth-1, self.options["dropper_target_path_win_64"], ) else: cmdline = MONKEY_CMDLINE_WINDOWS % { "monkey_path": remote_full_path - } + build_monkey_commandline(self.host, self.current_depth) + } + build_monkey_commandline(self.host, self.current_depth-1) # execute the remote monkey result = WmiTools.get_object(wmi_connection, "Win32_Process").Create(