Class: Metasploit::Framework::LoginScanner::Smh
- Defined in:
- lib/metasploit/framework/login_scanner/smh.rb
Overview
HP System Management login scanner tested on v6.3.1.24 upto v7.2.1.3 and 7.4
Constant Summary collapse
- DEFAULT_PORT =
4848
- PRIVATE_TYPES =
[ :password ]
- CAN_GET_SESSION =
true
Constants inherited from HTTP
HTTP::AUTHORIZATION_HEADER, HTTP::DEFAULT_HTTP_NOT_AUTHED_CODES, HTTP::DEFAULT_HTTP_SUCCESS_CODES, HTTP::DEFAULT_REALM, HTTP::DEFAULT_SSL_PORT, HTTP::LIKELY_PORTS, HTTP::LIKELY_SERVICE_NAMES, HTTP::REALM_KEY
Instance Attribute Summary
Attributes inherited from HTTP
#digest_auth_iis, #evade_header_folding, #evade_method_random_case, #evade_method_random_invalid, #evade_method_random_valid, #evade_pad_fake_headers, #evade_pad_fake_headers_count, #evade_pad_get_params, #evade_pad_get_params_count, #evade_pad_method_uri_count, #evade_pad_method_uri_type, #evade_pad_post_params, #evade_pad_post_params_count, #evade_pad_uri_version_count, #evade_pad_uri_version_type, #evade_shuffle_get_params, #evade_shuffle_post_params, #evade_uri_dir_fake_relative, #evade_uri_dir_self_reference, #evade_uri_encode_mode, #evade_uri_fake_end, #evade_uri_fake_params_start, #evade_uri_full_url, #evade_uri_use_backslashes, #evade_version_random_invalid, #evade_version_random_valid, #http_password, #http_success_codes, #http_username, #keep_connection_alive, #kerberos_authenticator_factory, #method, #ntlm_domain, #ntlm_send_lm, #ntlm_send_ntlm, #ntlm_send_spn, #ntlm_use_lm_key, #ntlm_use_ntlmv2, #ntlm_use_ntlmv2_session, #uri, #user_agent, #vhost
Instance Method Summary collapse
Methods inherited from HTTP
#authentication_required?, #check_setup, #send_request
Instance Method Details
#attempt_login(credential) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/metasploit/framework/login_scanner/smh.rb', line 17 def attempt_login(credential) result_opts = { credential: credential } req_opts = { 'method' => 'POST', 'uri' => uri, 'vars_post' => { 'redirecturl' => '', 'redirectquerystring' => '', 'user' => credential.public, 'password' => credential.private } } res = nil begin res = send_request(req_opts) rescue ::Rex::ConnectionError, Errno::ECONNREFUSED, ::EOFError, ::Timeout::Error => e result_opts.merge!(status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT, proof: e) return Result.new(result_opts) end if res && res.headers['CpqElm-Login'].to_s =~ /success/ result_opts.merge!(status: Metasploit::Model::Login::Status::SUCCESSFUL) else result_opts.merge!(status: Metasploit::Model::Login::Status::INCORRECT) end Result.new(result_opts) end |