Agent: Remove dropper_target_path_win_32 from config

This commit is contained in:
Ilija Lazoroski 2022-02-24 18:13:59 +01:00
parent 8c304e809d
commit 2c76c6de3c
4 changed files with 1 additions and 13 deletions

View File

@ -89,7 +89,6 @@ class Configuration(object):
dropper_set_date = True dropper_set_date = True
dropper_date_reference_path_windows = r"%windir%\system32\kernel32.dll" dropper_date_reference_path_windows = r"%windir%\system32\kernel32.dll"
dropper_date_reference_path_linux = "/bin/sh" dropper_date_reference_path_linux = "/bin/sh"
dropper_target_path_win_32 = r"C:\Windows\temp\monkey32.exe"
dropper_target_path_win_64 = r"C:\Windows\temp\monkey64.exe" dropper_target_path_win_64 = r"C:\Windows\temp\monkey64.exe"
dropper_target_path_linux = "/tmp/monkey" dropper_target_path_linux = "/tmp/monkey"

View File

@ -19,7 +19,6 @@
"dropper_log_path_windows": "%temp%\\~df1562.tmp", "dropper_log_path_windows": "%temp%\\~df1562.tmp",
"dropper_log_path_linux": "/tmp/user-1562", "dropper_log_path_linux": "/tmp/user-1562",
"dropper_set_date": true, "dropper_set_date": true,
"dropper_target_path_win_32": "C:\\Windows\\temp\\monkey32.exe",
"dropper_target_path_win_64": "C:\\Windows\\temp\\monkey64.exe", "dropper_target_path_win_64": "C:\\Windows\\temp\\monkey64.exe",
"dropper_target_path_linux": "/tmp/monkey", "dropper_target_path_linux": "/tmp/monkey",

View File

@ -65,8 +65,6 @@ def get_monkey_dest_path(url_to_monkey):
try: try:
if "linux" in url_to_monkey: if "linux" in url_to_monkey:
return WormConfiguration.dropper_target_path_linux return WormConfiguration.dropper_target_path_linux
elif "windows-32" in url_to_monkey:
return WormConfiguration.dropper_target_path_win_32
elif "windows-64" in url_to_monkey: elif "windows-64" in url_to_monkey:
return WormConfiguration.dropper_target_path_win_64 return WormConfiguration.dropper_target_path_win_64
else: else:

View File

@ -4,7 +4,6 @@ from posixpath import join
from typing import List, Tuple from typing import List, Tuple
from common.utils.attack_utils import BITS_UPLOAD_STRING, ScanStatus from common.utils.attack_utils import BITS_UPLOAD_STRING, ScanStatus
from infection_monkey.exploit.consts import WIN_ARCH_64
from infection_monkey.exploit.HostExploiter import HostExploiter from infection_monkey.exploit.HostExploiter import HostExploiter
from infection_monkey.exploit.tools.helpers import get_monkey_depth, get_target_monkey from infection_monkey.exploit.tools.helpers import get_monkey_depth, get_target_monkey
from infection_monkey.exploit.tools.http_tools import HTTPTools from infection_monkey.exploit.tools.http_tools import HTTPTools
@ -117,7 +116,6 @@ class WebRCE(HostExploiter):
if not self.monkey_target_paths: if not self.monkey_target_paths:
self.monkey_target_paths = { self.monkey_target_paths = {
"linux": self.options["dropper_target_path_linux"], "linux": self.options["dropper_target_path_linux"],
"win32": self.options["dropper_target_path_win_32"],
"win64": self.options["dropper_target_path_win_64"], "win64": self.options["dropper_target_path_win_64"],
} }
self.HTTP = [str(port) for port in self.options["http_ports"]] self.HTTP = [str(port) for port in self.options["http_ports"]]
@ -470,13 +468,7 @@ class WebRCE(HostExploiter):
if self.host.os["type"] == "linux": if self.host.os["type"] == "linux":
return self.options["dropper_target_path_linux"] return self.options["dropper_target_path_linux"]
if self.host.os["type"] == "windows": 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.options["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.options["dropper_target_path_win_32"]
def get_target_url(self): def get_target_url(self):
""" """