Android Mercury Browser Intent URI Scheme and Directory Traversal Vulnerability - Metasploit


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

Module Overview


Name: Android Mercury Browser Intent URI Scheme and Directory Traversal Vulnerability
Module: auxiliary/server/android_mercury_parseuri
Source code: modules/auxiliary/server/android_mercury_parseuri.rb
Disclosure date: -
Last modification time: 2017-07-24 06:26:21 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): -
List of CVEs: -

This module exploits an unsafe intent URI scheme and directory traversal found in Android Mercury Browser version 3.2.3. The intent allows the attacker to invoke a private wifi manager activity, which starts a web server for Mercury on port 8888. The webserver also suffers a directory traversal that allows remote access to sensitive files. By default, this module will go after webviewCookiesChromium.db, webviewCookiesChromiumPrivate.db, webview.db, and bookmarks.db. But if this isn't enough, you can also specify the ADDITIONAL_FILES datastore option to collect more files.

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/server/android_mercury_parseuri
msf auxiliary(android_mercury_parseuri) > exploit

Go back to menu.

Msfconsole Usage


Here is how the server/android_mercury_parseuri auxiliary module looks in the msfconsole:

msf6 > use auxiliary/server/android_mercury_parseuri

msf6 auxiliary(server/android_mercury_parseuri) > show info

       Name: Android Mercury Browser Intent URI Scheme and Directory Traversal Vulnerability
     Module: auxiliary/server/android_mercury_parseuri
    License: Metasploit Framework License (BSD)
       Rank: Normal

Provided by:
  rotlogix
  sinn3r <[email protected]>
  joev <[email protected]>

Check supported:
  No

Basic options:
  Name              Current Setting  Required  Description
  ----              ---------------  --------  -----------
  ADDITIONAL_FILES                   no        Additional files to steal from the device
  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)

Description:
  This module exploits an unsafe intent URI scheme and directory 
  traversal found in Android Mercury Browser version 3.2.3. The intent 
  allows the attacker to invoke a private wifi manager activity, which 
  starts a web server for Mercury on port 8888. The webserver also 
  suffers a directory traversal that allows remote access to sensitive 
  files. By default, this module will go after 
  webviewCookiesChromium.db, webviewCookiesChromiumPrivate.db, 
  webview.db, and bookmarks.db. But if this isn't enough, you can also 
  specify the ADDITIONAL_FILES datastore option to collect more files.

References:
  http://rotlogix.com/2015/08/23/exploiting-the-mercury-browser-for-android/
  http://versprite.com/og/multiple-vulnerabilities-in-mercury-browser-for-android-version-3-0-0/

Module Options


This is a complete list of options available in the server/android_mercury_parseuri auxiliary module:

msf6 auxiliary(server/android_mercury_parseuri) > show options

Module options (auxiliary/server/android_mercury_parseuri):

   Name              Current Setting  Required  Description
   ----              ---------------  --------  -----------
   ADDITIONAL_FILES                   no        Additional files to steal from the device
   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)

Advanced Options


Here is a complete list of advanced options supported by the server/android_mercury_parseuri auxiliary module:

msf6 auxiliary(server/android_mercury_parseuri) > show advanced

Module advanced options (auxiliary/server/android_mercury_parseuri):

   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 server/android_mercury_parseuri module can do:

msf6 auxiliary(server/android_mercury_parseuri) > show actions

Auxiliary actions:

   Name  Description
   ----  -----------

Evasion Options


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

msf6 auxiliary(server/android_mercury_parseuri) > 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.

Target is not Android


Here is a relevant code snippet related to the "Target is not Android" error message:

118:	
119:	  def on_request_uri(cli, req)
120:	    print_status("Requesting: #{req.uri}")
121:	
122:	    unless is_android?(req.headers['User-Agent'])
123:	      print_error('Target is not Android')
124:	      send_not_found(cli)
125:	      return
126:	    end
127:	
128:	    if req.method =~ /post/i

Go back to menu.


References


See Also


Check also the following modules related to this module:

Authors


  • rotlogix
  • sinn3r
  • joev

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.