Try to make a better check

bug/bundler_fix
jvazquez-r7 2014-09-26 15:55:26 -05:00
parent 6e2d297e0c
commit 3538b84693
2 changed files with 33 additions and 3 deletions

View File

@ -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)

View File

@ -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