From 8a3a92182e6f192112cc3eee945d4876a6fcbc9d Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Thu, 24 Feb 2022 19:04:57 +0100 Subject: [PATCH] Agent: Fix WebRCE windows target path --- monkey/infection_monkey/exploit/web_rce.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/monkey/infection_monkey/exploit/web_rce.py b/monkey/infection_monkey/exploit/web_rce.py index c87ed7405..cdb0ddce9 100644 --- a/monkey/infection_monkey/exploit/web_rce.py +++ b/monkey/infection_monkey/exploit/web_rce.py @@ -34,7 +34,7 @@ class WebRCE(HostExploiter): def __init__(self, monkey_target_paths=None): """ :param monkey_target_paths: Where to upload the monkey at the target host system. - Dict in format {'linux': '/tmp/monkey.sh', 'win32': './monkey32.exe', 'win64':... } + Dict in format {'linux': '/tmp/monkey.sh', 'win64':... } """ super(WebRCE, self).__init__() self.monkey_target_paths = monkey_target_paths @@ -410,7 +410,7 @@ class WebRCE(HostExploiter): """ Gets destination path from one of WEB_RCE predetermined paths(self.monkey_target_paths). :param url_to_monkey: Hosted monkey's url. egz : - http://localserver:9999/monkey/windows-32.exe + http://localserver:9999/monkey/windows-64.exe :return: Corresponding monkey path from self.monkey_target_paths """ if not url_to_monkey or ("linux" not in url_to_monkey and "windows" not in url_to_monkey): @@ -421,9 +421,7 @@ class WebRCE(HostExploiter): try: if "linux" in url_to_monkey: return self.monkey_target_paths["linux"] - elif "windows-32" in url_to_monkey: - return self.monkey_target_paths["win32"] - elif "windows-64" in url_to_monkey: + elif "windows" in url_to_monkey: return self.monkey_target_paths["win64"] else: logger.error( @@ -433,7 +431,7 @@ class WebRCE(HostExploiter): return False except KeyError: logger.error( - 'Unknown key was found. Please use "linux", "win32" and "win64" keys to ' + 'Unknown key was found. Please use "linux" and "win64" keys to ' "initialize " "custom dict of monkey's destination paths" )