Flash "Rosetta" JSONP GET/POST Response Disclosure - Metasploit


This page contains detailed information about how to use the auxiliary/gather/flash_rosetta_jsonp_url_disclosure metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.

Module Overview


Name: Flash "Rosetta" JSONP GET/POST Response Disclosure
Module: auxiliary/gather/flash_rosetta_jsonp_url_disclosure
Source code: modules/auxiliary/gather/flash_rosetta_jsonp_url_disclosure.rb
Disclosure date: 2014-07-08
Last modification time: 2022-01-23 15:28:32 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): -
List of CVEs: CVE-2014-4671

A website that serves a JSONP endpoint that accepts a custom alphanumeric callback of 1200 chars can be abused to serve an encoded swf payload that steals the contents of a same-domain URL. Flash < 14.0.0.145 is required. This module spins up a web server that, upon navigation from a user, attempts to abuse the specified JSONP endpoint URLs by stealing the response from GET requests to STEAL_URLS.

Module Ranking and Traits


Module Ranking:

  • normal: The exploit is otherwise reliable, but depends on a specific version and can't (or doesn't) reliably autodetect. More information about ranking can be found here.

Basic Usage


msf > use auxiliary/gather/flash_rosetta_jsonp_url_disclosure
msf auxiliary(flash_rosetta_jsonp_url_disclosure) > exploit

Go back to menu.

Msfconsole Usage


Here is how the gather/flash_rosetta_jsonp_url_disclosure auxiliary module looks in the msfconsole:

msf6 > use auxiliary/gather/flash_rosetta_jsonp_url_disclosure

msf6 auxiliary(gather/flash_rosetta_jsonp_url_disclosure) > show info

       Name: Flash "Rosetta" JSONP GET/POST Response Disclosure
     Module: auxiliary/gather/flash_rosetta_jsonp_url_disclosure
    License: Metasploit Framework License (BSD)
       Rank: Normal
  Disclosed: 2014-07-08

Provided by:
  Michele Spagnuolo
  joev <[email protected]>

Available actions:
  Name       Description
  ----       -----------
  WebServer  Serve exploit via web server

Check supported:
  Yes

Basic options:
  Name        Current Setting  Required  Description
  ----        ---------------  --------  -----------
  CALLBACK    callback         yes       The name of the callback paramater
  CHECK       true             yes       Check first that the JSONP endpoint works
  JSONP_URL                    yes       The URL of the vulnerable JSONP endpoint
  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)
  STEAL_URLS                   yes       A comma-separated list of URLs to steal
  URIPATH     /                yes       The URI path to serve the exploit under

Description:
  A website that serves a JSONP endpoint that accepts a custom 
  alphanumeric callback of 1200 chars can be abused to serve an 
  encoded swf payload that steals the contents of a same-domain URL. 
  Flash < 14.0.0.145 is required. This module spins up a web server 
  that, upon navigation from a user, attempts to abuse the specified 
  JSONP endpoint URLs by stealing the response from GET requests to 
  STEAL_URLS.

References:
  https://nvd.nist.gov/vuln/detail/CVE-2014-4671
  http://miki.it/blog/2014/7/8/abusing-jsonp-with-rosetta-flash/
  https://github.com/mikispag/rosettaflash
  http://quaxio.com/jsonp_handcrafted_flash_files/

Module Options


This is a complete list of options available in the gather/flash_rosetta_jsonp_url_disclosure auxiliary module:

msf6 auxiliary(gather/flash_rosetta_jsonp_url_disclosure) > show options

Module options (auxiliary/gather/flash_rosetta_jsonp_url_disclosure):

   Name        Current Setting  Required  Description
   ----        ---------------  --------  -----------
   CALLBACK    callback         yes       The name of the callback paramater
   CHECK       true             yes       Check first that the JSONP endpoint works
   JSONP_URL                    yes       The URL of the vulnerable JSONP endpoint
   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)
   STEAL_URLS                   yes       A comma-separated list of URLs to steal
   URIPATH     /                yes       The URI path to serve the exploit under

Auxiliary action:

   Name       Description
   ----       -----------
   WebServer  Serve exploit via web server

Advanced Options


Here is a complete list of advanced options supported by the gather/flash_rosetta_jsonp_url_disclosure auxiliary module:

msf6 auxiliary(gather/flash_rosetta_jsonp_url_disclosure) > show advanced

Module advanced options (auxiliary/gather/flash_rosetta_jsonp_url_disclosure):

   Name            Current Setting  Required  Description
   ----            ---------------  --------  -----------
   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

Auxiliary Actions


This is a list of all auxiliary actions that the gather/flash_rosetta_jsonp_url_disclosure module can do:

msf6 auxiliary(gather/flash_rosetta_jsonp_url_disclosure) > show actions

Auxiliary actions:

   Name       Description
   ----       -----------
   WebServer  Serve exploit via web server

Evasion Options


Here is the full list of possible evasion options supported by the gather/flash_rosetta_jsonp_url_disclosure auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):

msf6 auxiliary(gather/flash_rosetta_jsonp_url_disclosure) > 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.

Error Messages


This module may fail with the following error messages:

Error Messages

Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.

CHECK


Here is a relevant code snippet related to the "CHECK" error message:

48:	      ],
49:	      self.class)
50:	  end
51:	
52:	  def run
53:	    if datastore['CHECK'] && check == Msf::Exploit::CheckCode::Safe
54:	      raise "JSONP endpoint does not allow sufficiently long callback names."
55:	    end
56:	
57:	    unless datastore['URIPATH'] == '/'
58:	      raise "URIPATH must be set to '/' to intercept crossdomain.xml request."

Go back to menu.


References


See Also


Check also the following modules related to this module:

Authors


  • Michele Spagnuolo
  • joev

Version


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

Go back to menu.