diff --git a/lib/msf/base/sessions/command_shell.rb b/lib/msf/base/sessions/command_shell.rb index 357c32556e..96150a4373 100644 --- a/lib/msf/base/sessions/command_shell.rb +++ b/lib/msf/base/sessions/command_shell.rb @@ -243,7 +243,10 @@ class CommandShell script_path = binary_exists("script") if script_path != nil print_status("Using `script` to pop up an interactive shell") - shell_command(script_path) + # Payload: script /dev/null + # Using /dev/null to make sure there is no log file on the target machine + # Prevent being detected by the admin or antivirus softwares + shell_command("#{script_path} /dev/null") return end