Class: Ronin::Exploits::OpenRedirect
- Inherits:
-
ClientSideWebVuln
- Object
- Exploit
- Web
- WebVuln
- ClientSideWebVuln
- Ronin::Exploits::OpenRedirect
- Defined in:
- lib/ronin/exploits/open_redirect.rb
Overview
Represents a Open Redirect exploit.
Example
require 'ronin/exploits/open_redirect'
module Ronin
module Exploits
class MyExploit < OpenRedirect
register 'my_exploit'
base_path '/path/to/page.php'
query_param 'url'
end
end
end
Constant Summary
Constants included from Mixins::HTTP
Mixins::HTTP::HTTP_USER_AGENT_ALIASES
Instance Attribute Summary
Attributes included from Mixins::HasPayload
Class Method Summary collapse
-
.exploit_type ⇒ Symbol
private
Returns the type or kind of exploit.
Instance Method Summary collapse
-
#initialize(payload: Payloads::Test::OpenRedirect.new, **kwargs) ⇒ OpenRedirect
constructor
Initializes the Open Redirect exploit and defaults the Mixins::HasPayload#payload to a Open Redirect test payload.
-
#vuln ⇒ Ronin::Vulns::OpenRedirect
The open redirect vulnerability to exploit.
Methods inherited from ClientSideWebVuln
Methods inherited from WebVuln
base_path, cookie, #cookie, cookie_param, form_data, #form_data, form_param, header_name, headers, #headers, query_param, referer, #referer, request_method, #test, #url, #web_vuln_kwargs
Methods included from Mixins::HasPayload
included, #perform_build, #perform_cleanup, #perform_launch, #perform_validate
Methods included from Mixins::HTTP
#http, #http_allowed_methods, #http_cookie, #http_copy, #http_delete, #http_get, #http_get_body, #http_get_cookies, #http_get_headers, #http_head, #http_headers, #http_lock, #http_mkcol, #http_move, #http_ok?, #http_options, #http_password, #http_patch, #http_post, #http_post_body, #http_post_headers, #http_powered_by_header, #http_propfind, #http_proppatch, #http_proxy, #http_put, #http_request, #http_response_body, #http_response_headers, #http_response_status, #http_server_header, #http_trace, #http_unlock, #http_user, #http_user_agent, included
Methods inherited from Exploit
#NotVulnerable, #Unknown, #Vulnerable, advisories, advisory, #build, #cleanup, disclosed?, disclosure_date, exploit, #exploit, #fail, #launch, #perform_build, #perform_cleanup, #perform_launch, #perform_test, #perform_validate, quality, register, release_date, released?, software, software_versions, #test, #validate
Constructor Details
#initialize(payload: Payloads::Test::OpenRedirect.new, **kwargs) ⇒ OpenRedirect
Initializes the Open Redirect exploit and defaults the Mixins::HasPayload#payload to a Open Redirect test payload.
74 75 76 |
# File 'lib/ronin/exploits/open_redirect.rb', line 74 def initialize(payload: Payloads::Test::OpenRedirect.new, **kwargs) super(payload: payload, **kwargs) end |
Class Method Details
.exploit_type ⇒ Symbol
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This is used internally to map an exploit class to a printable type.
Returns the type or kind of exploit.
88 89 90 |
# File 'lib/ronin/exploits/open_redirect.rb', line 88 def self.exploit_type :open_redirect end |
Instance Method Details
#vuln ⇒ Ronin::Vulns::OpenRedirect
The open redirect vulnerability to exploit.
97 98 99 100 |
# File 'lib/ronin/exploits/open_redirect.rb', line 97 def vuln @vuln ||= Vulns::OpenRedirect.new(url, test_url: params[:redirect_url], **web_vuln_kwargs) end |