Try to make a better check
parent
6e2d297e0c
commit
3538b84693
|
@ -58,9 +58,24 @@ class Metasploit4 < Msf::Auxiliary
|
|||
:refs => self.references
|
||||
)
|
||||
Exploit::CheckCode::Vulnerable
|
||||
elsif res
|
||||
injected_res_code = res.code
|
||||
else
|
||||
Exploit::CheckCode::Safe
|
||||
Exploit::CheckCode::Unknown
|
||||
end
|
||||
|
||||
res = send_request_cgi({
|
||||
'method' => datastore['METHOD'],
|
||||
'uri' => normalize_uri(target_uri.path.to_s)
|
||||
})
|
||||
|
||||
if res && injected_res_code == res.code
|
||||
return Exploit::CheckCode::Safe
|
||||
elsif res && injected_res_code != res.code
|
||||
return Exploit::CheckCode::Appears
|
||||
end
|
||||
|
||||
Exploit::CheckCode::Unknown
|
||||
end
|
||||
|
||||
def run_host(ip)
|
||||
|
|
|
@ -69,10 +69,25 @@ class Metasploit4 < Msf::Exploit::Remote
|
|||
res = req("echo #{marker}")
|
||||
|
||||
if res && res.body.include?(marker * 3)
|
||||
Exploit::CheckCode::Vulnerable
|
||||
return Exploit::CheckCode::Vulnerable
|
||||
elsif res
|
||||
injected_res_code = res.code
|
||||
else
|
||||
Exploit::CheckCode::Safe
|
||||
return Exploit::CheckCode::Unknown
|
||||
end
|
||||
|
||||
res = send_request_cgi({
|
||||
'method' => datastore['METHOD'],
|
||||
'uri' => normalize_uri(target_uri.path.to_s)
|
||||
})
|
||||
|
||||
if res && injected_res_code == res.code
|
||||
return Exploit::CheckCode::Safe
|
||||
elsif res && injected_res_code != res.code
|
||||
return Exploit::CheckCode::Appears
|
||||
end
|
||||
|
||||
Exploit::CheckCode::Unknown
|
||||
end
|
||||
|
||||
def exploit
|
||||
|
|
Loading…
Reference in New Issue