Opera historysearch XSS - Metasploit


This page contains detailed information about how to use the exploit/multi/browser/opera_historysearch metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.

Module Overview


Name: Opera historysearch XSS
Module: exploit/multi/browser/opera_historysearch
Source code: modules/exploits/multi/browser/opera_historysearch.rb
Disclosure date: 2008-10-23
Last modification time: 2020-10-02 17:38:06 +0000
Supported architecture(s): -
Supported platform(s): Unix
Target service / protocol: -
Target network port(s): -
List of CVEs: CVE-2008-4696

Certain constructs are not escaped correctly by Opera's History Search results. These can be used to inject scripts into the page, which can then be used to modify configuration settings and execute arbitrary commands. Affects Opera versions between 9.50 and 9.61.

Module Ranking and Traits


Module Ranking:

  • excellent: The exploit will never crash the service. This is the case for SQL Injection, CMD execution, RFI, LFI, etc. No typical memory corruption exploits should be given this ranking unless there are extraordinary circumstances. More information about ranking can be found here.

Basic Usage


msf > use exploit/multi/browser/opera_historysearch
msf exploit(opera_historysearch) > exploit

Go back to menu.

Msfconsole Usage


Here is how the multi/browser/opera_historysearch exploit module looks in the msfconsole:

msf6 > use exploit/multi/browser/opera_historysearch

msf6 exploit(multi/browser/opera_historysearch) > show info

       Name: Opera historysearch XSS
     Module: exploit/multi/browser/opera_historysearch
   Platform: Unix
       Arch: 
 Privileged: No
    License: BSD License
       Rank: Excellent
  Disclosed: 2008-10-23

Provided by:
  Roberto Suggi
  Aviv Raff <[email protected]>
  egypt <[email protected]>

Available targets:
  Id  Name
  --  ----
  0   Opera < 9.61 Unix Cmd

Check supported:
  No

Basic options:
  Name     Current Setting  Required  Description
  ----     ---------------  --------  -----------
  SRVHOST  0.0.0.0          yes       The local host or network interface to listen on. This must be an address on the local machine or 0.0.0.0 to listen on all addresses.
  SRVPORT  8080             yes       The local port to listen on.
  SSL      false            no        Negotiate SSL for incoming connections
  SSLCert                   no        Path to a custom SSL certificate (default is randomly generated)
  URIPATH                   no        The URI to use for this exploit (default is random)

Payload information:
  Space: 4000
  Avoid: 4 characters

Description:
  Certain constructs are not escaped correctly by Opera's History 
  Search results. These can be used to inject scripts into the page, 
  which can then be used to modify configuration settings and execute 
  arbitrary commands. Affects Opera versions between 9.50 and 9.61.

References:
  https://nvd.nist.gov/vuln/detail/CVE-2008-4696
  OSVDB (49472)
  http://www.securityfocus.com/bid/31869
  http://www.opera.com/support/kb/view/903/

Module Options


This is a complete list of options available in the multi/browser/opera_historysearch exploit:

msf6 exploit(multi/browser/opera_historysearch) > show options

Module options (exploit/multi/browser/opera_historysearch):

   Name     Current Setting  Required  Description
   ----     ---------------  --------  -----------
   SRVHOST  0.0.0.0          yes       The local host or network interface to listen on. This must be an address on the local machine or 0.0.0.0 to listen on all addresses.
   SRVPORT  8080             yes       The local port to listen on.
   SSL      false            no        Negotiate SSL for incoming connections
   SSLCert                   no        Path to a custom SSL certificate (default is randomly generated)
   URIPATH                   no        The URI to use for this exploit (default is random)

Exploit target:

   Id  Name
   --  ----
   0   Opera < 9.61 Unix Cmd

Advanced Options


Here is a complete list of advanced options supported by the multi/browser/opera_historysearch exploit:

msf6 exploit(multi/browser/opera_historysearch) > show advanced

Module advanced options (exploit/multi/browser/opera_historysearch):

   Name                    Current Setting  Required  Description
   ----                    ---------------  --------  -----------
   ContextInformationFile                   no        The information file that contains context information
   DisablePayloadHandler   false            no        Disable the handler code for the selected payload
   EnableContextEncoding   false            no        Use transient context when encoding payloads
   ListenerComm                             no        The specific communication channel to use for this service
   SSLCipher                                no        String for SSL cipher spec - "DHE-RSA-AES256-SHA" or "ADH"
   SSLCompression          false            no        Enable SSL/TLS-level compression
   SendRobots              false            no        Return a robots.txt file if asked for one
   URIHOST                                  no        Host to use in URI (useful for tunnels)
   URIPORT                                  no        Port to use in URI (useful for tunnels)
   VERBOSE                 false            no        Enable detailed status messages
   WORKSPACE                                no        Specify the workspace for this module

Exploit Targets


Here is a list of targets (platforms and systems) which the multi/browser/opera_historysearch module can exploit:

msf6 exploit(multi/browser/opera_historysearch) > show targets

Exploit targets:

   Id  Name
   --  ----
   0   Opera < 9.61 Unix Cmd

Compatible Payloads


This is a list of possible payloads which can be delivered and executed on the target system using the multi/browser/opera_historysearch exploit:

msf6 exploit(multi/browser/opera_historysearch) > show payloads

Compatible Payloads
===================

   #   Name                                        Disclosure Date  Rank    Check  Description
   -   ----                                        ---------------  ----    -----  -----------
   0   payload/cmd/unix/bind_perl                                   normal  No     Unix Command Shell, Bind TCP (via Perl)
   1   payload/cmd/unix/bind_perl_ipv6                              normal  No     Unix Command Shell, Bind TCP (via perl) IPv6
   2   payload/cmd/unix/bind_ruby                                   normal  No     Unix Command Shell, Bind TCP (via Ruby)
   3   payload/cmd/unix/bind_ruby_ipv6                              normal  No     Unix Command Shell, Bind TCP (via Ruby) IPv6
   4   payload/cmd/unix/generic                                     normal  No     Unix Command, Generic Command Execution
   5   payload/cmd/unix/reverse                                     normal  No     Unix Command Shell, Double Reverse TCP (telnet)
   6   payload/cmd/unix/reverse_bash_telnet_ssl                     normal  No     Unix Command Shell, Reverse TCP SSL (telnet)
   7   payload/cmd/unix/reverse_perl                                normal  No     Unix Command Shell, Reverse TCP (via Perl)
   8   payload/cmd/unix/reverse_perl_ssl                            normal  No     Unix Command Shell, Reverse TCP SSL (via perl)
   9   payload/cmd/unix/reverse_ruby                                normal  No     Unix Command Shell, Reverse TCP (via Ruby)
   10  payload/cmd/unix/reverse_ruby_ssl                            normal  No     Unix Command Shell, Reverse TCP SSL (via Ruby)
   11  payload/cmd/unix/reverse_ssl_double_telnet                   normal  No     Unix Command Shell, Double Reverse TCP SSL (telnet)

Evasion Options


Here is the full list of possible evasion options supported by the multi/browser/opera_historysearch exploit in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):

msf6 exploit(multi/browser/opera_historysearch) > show evasion

Module evasion options:

   Name                      Current Setting  Required  Description
   ----                      ---------------  --------  -----------
   HTML::base64              none             no        Enable HTML obfuscation via an embeded base64 html object (IE not supported) (Accepted: none, plain, single_pad, double_pad, random_space_injection)
   HTML::javascript::escape  0                no        Enable HTML obfuscation via HTML escaping (number of iterations)
   HTML::unicode             none             no        Enable HTTP obfuscation via unicode (Accepted: none, utf-16le, utf-16be, utf-16be-marker, utf-32le, utf-32be)
   HTTP::chunked             false            no        Enable chunking of HTTP responses via "Transfer-Encoding: chunked"
   HTTP::compression         none             no        Enable compression of HTTP responses via content encoding (Accepted: none, gzip, deflate)
   HTTP::header_folding      false            no        Enable folding of HTTP headers
   HTTP::junk_headers        false            no        Enable insertion of random junk HTTP headers
   HTTP::no_cache            false            no        Disallow the browser to cache HTTP content
   HTTP::server_name         Apache           yes       Configures the Server header of all outgoing replies
   TCP::max_send_size        0                no        Maximum tcp segment size.  (0 = disable)
   TCP::send_delay           0                no        Delays inserted before every send.  (0 = disable)

Go back to menu.


References


See Also


Check also the following modules related to this module:

Related Nessus plugins:

Authors


  • Roberto Suggi
  • Aviv Raff <avivra[at]gmail.com>
  • egypt

Version


This page has been produced using Metasploit Framework version 6.1.24-dev. For more modules, visit the Metasploit Module Library.

Go back to menu.