Android Open Source Platform (AOSP) Browser UXSS - Metasploit


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

Module Overview


Name: Android Open Source Platform (AOSP) Browser UXSS
Module: auxiliary/gather/android_stock_browser_uxss
Source code: modules/auxiliary/gather/android_stock_browser_uxss.rb
Disclosure date: -
Last modification time: 2017-08-24 21:38:44 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): -
List of CVEs: CVE-2014-6041

This module exploits a Universal Cross-Site Scripting (UXSS) vulnerability present in all versions of Android's open source stock browser before 4.4, and Android apps running on < 4.4 that embed the WebView component. If successful, an attacker can leverage this bug to scrape both cookie data and page contents from a vulnerable browser window. If your target URLs use X-Frame-Options, you can enable the "BYPASS_XFO" option, which will cause a popup window to be used. This requires a click from the user and is much less stealthy, but is generally harmless-looking. By supplying a CUSTOM_JS parameter and ensuring CLOSE_POPUP is set to false, this module also allows running aribtrary javascript in the context of the targeted URL. Some sample UXSS scripts are provided in data/exploits/uxss.

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

Go back to menu.

Msfconsole Usage


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

msf6 > use auxiliary/gather/android_stock_browser_uxss

msf6 auxiliary(gather/android_stock_browser_uxss) > show info

       Name: Android Open Source Platform (AOSP) Browser UXSS
     Module: auxiliary/gather/android_stock_browser_uxss
    License: Metasploit Framework License (BSD)
       Rank: Normal

Provided by:
  Rafay Baloch
  joev <[email protected]>

Available actions:
  Name       Description
  ----       -----------
  WebServer

Check supported:
  No

Basic options:
  Name         Current Setting     Required  Description
  ----         ---------------     --------  -----------
  BYPASS_XFO   false               no        Bypass URLs that have X-Frame-Options by using a one-click popup exploit.
  CLOSE_POPUP  true                no        When BYPASS_XFO is enabled, this closes the popup window after exfiltration.
  CUSTOM_JS                        no        A string of javascript to execute in the context of the target URLs.
  REMOTE_JS                        no        A URL to inject into a script tag in the context of the target URLs.
  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)
  TARGET_URLS  http://example.com  yes       The comma-separated list of URLs to steal.
  URIPATH                          no        The URI to use for this exploit (default is random)

Description:
  This module exploits a Universal Cross-Site Scripting (UXSS) 
  vulnerability present in all versions of Android's open source stock 
  browser before 4.4, and Android apps running on < 4.4 that embed the 
  WebView component. If successful, an attacker can leverage this bug 
  to scrape both cookie data and page contents from a vulnerable 
  browser window. If your target URLs use X-Frame-Options, you can 
  enable the "BYPASS_XFO" option, which will cause a popup window to 
  be used. This requires a click from the user and is much less 
  stealthy, but is generally harmless-looking. By supplying a 
  CUSTOM_JS parameter and ensuring CLOSE_POPUP is set to false, this 
  module also allows running aribtrary javascript in the context of 
  the targeted URL. Some sample UXSS scripts are provided in 
  data/exploits/uxss.

References:
  http://1337day.com/exploit/description/22581
  OSVDB (110664)
  https://nvd.nist.gov/vuln/detail/CVE-2014-6041

Module Options


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

msf6 auxiliary(gather/android_stock_browser_uxss) > show options

Module options (auxiliary/gather/android_stock_browser_uxss):

   Name         Current Setting     Required  Description
   ----         ---------------     --------  -----------
   BYPASS_XFO   false               no        Bypass URLs that have X-Frame-Options by using a one-click popup exploit.
   CLOSE_POPUP  true                no        When BYPASS_XFO is enabled, this closes the popup window after exfiltration.
   CUSTOM_JS                        no        A string of javascript to execute in the context of the target URLs.
   REMOTE_JS                        no        A URL to inject into a script tag in the context of the target URLs.
   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)
   TARGET_URLS  http://example.com  yes       The comma-separated list of URLs to steal.
   URIPATH                          no        The URI to use for this exploit (default is random)

Auxiliary action:

   Name       Description
   ----       -----------
   WebServer

Advanced Options


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

msf6 auxiliary(gather/android_stock_browser_uxss) > show advanced

Module advanced options (auxiliary/gather/android_stock_browser_uxss):

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

msf6 auxiliary(gather/android_stock_browser_uxss) > show actions

Auxiliary actions:

   Name       Description
   ----       -----------
   WebServer

Evasion Options


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

msf6 auxiliary(gather/android_stock_browser_uxss) > 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:

Authors


  • Rafay Baloch
  • joev

Version


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

Go back to menu.