From be0f85c344a1910d450aace758e7c3e32fac29f1 Mon Sep 17 00:00:00 2001 From: vakarisz Date: Tue, 11 Jun 2024 17:26:22 +0300 Subject: [PATCH] Hadoop: Use build_permission_change_command --- .../exploiters/hadoop/src/hadoop_command_builder.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/monkey/agent_plugins/exploiters/hadoop/src/hadoop_command_builder.py b/monkey/agent_plugins/exploiters/hadoop/src/hadoop_command_builder.py index 81218077926..47e30a17967 100644 --- a/monkey/agent_plugins/exploiters/hadoop/src/hadoop_command_builder.py +++ b/monkey/agent_plugins/exploiters/hadoop/src/hadoop_command_builder.py @@ -7,6 +7,7 @@ IWindowsAgentCommandBuilder, LinuxDownloadMethod, LinuxDownloadOptions, + LinuxPermissionChangeOptions, LinuxRunOptions, TargetHost, WindowsDownloadMethod, @@ -78,11 +79,14 @@ def _build_linux_hadoop_command( download_url=agent_download_url, ) + chmod_options = LinuxPermissionChangeOptions(file_path=agent_destination_path) + run_options = LinuxRunOptions( agent_destination_path=agent_destination_path, dropper_execution_mode=DropperExecutionMode.NONE, ) agent_command_builder.build_download_command(download_options) + agent_command_builder.build_permission_change_command(chmod_options) agent_command_builder.build_run_command(run_options) return agent_command_builder.get_command()