From 1223e2acf3779156973a514428635f539e410249 Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Wed, 23 Feb 2022 17:06:07 +0100 Subject: [PATCH] Agent: Use exploiter options in WebRCE --- monkey/infection_monkey/exploit/web_rce.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/monkey/infection_monkey/exploit/web_rce.py b/monkey/infection_monkey/exploit/web_rce.py index f5ff4a246..2713f9009 100644 --- a/monkey/infection_monkey/exploit/web_rce.py +++ b/monkey/infection_monkey/exploit/web_rce.py @@ -43,9 +43,9 @@ class WebRCE(HostExploiter): self.monkey_target_paths = monkey_target_paths else: self.monkey_target_paths = { - "linux": self._config.dropper_target_path_linux, - "win32": self._config.dropper_target_path_win_32, - "win64": self._config.dropper_target_path_win_64, + "linux": self.options["dropper_target_path_linux"], + "win32": self.options["dropper_target_path_win_32"], + "win64": self.options["dropper_target_path_win_64"], } self.HTTP = [str(port) for port in self._config.HTTP_PORTS] self.vulnerable_urls = [] @@ -467,15 +467,15 @@ class WebRCE(HostExploiter): logger.error("Target's OS was either unidentified or not supported. Aborting") return False if self.host.os["type"] == "linux": - return self._config.dropper_target_path_linux + return self.options["dropper_target_path_linux"] if self.host.os["type"] == "windows": try: # remove now or when 32-bit binaries are removed? if self.host.os["machine"] == WIN_ARCH_64: - return self._config.dropper_target_path_win_64 + return self.options["dropper_target_path_win_64"] except KeyError: logger.debug("Target's machine type was not set. Using win-32 dropper path.") - return self._config.dropper_target_path_win_32 + return self.options["dropper_target_path_win_32"] def get_target_url(self): """