Safari Archive Metadata Command Execution - Metasploit
This page contains detailed information about how to use the exploit/osx/browser/safari_metadata_archive metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Safari Archive Metadata Command Execution
Module: exploit/osx/browser/safari_metadata_archive
Source code: modules/exploits/osx/browser/safari_metadata_archive.rb
Disclosure date: 2006-02-21
Last modification time: 2020-10-02 17:38:06 +0000
Supported architecture(s): -
Supported platform(s): Unix
Target service / protocol: -
Target network port(s): -
List of CVEs: CVE-2006-0848
This module exploits a vulnerability in Safari's "Safe file" feature, which will automatically open any file with one of the allowed extensions. This can be abused by supplying a zip file, containing a shell script, with a metafile indicating that the file should be opened by Terminal.app. This module depends on the 'zip' command-line utility.
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/osx/browser/safari_metadata_archive
msf exploit(safari_metadata_archive) > exploit
Go back to menu.
Msfconsole Usage
Here is how the osx/browser/safari_metadata_archive exploit module looks in the msfconsole:
msf6 > use exploit/osx/browser/safari_metadata_archive
msf6 exploit(osx/browser/safari_metadata_archive) > show info
Name: Safari Archive Metadata Command Execution
Module: exploit/osx/browser/safari_metadata_archive
Platform: Unix
Arch:
Privileged: No
License: Metasploit Framework License (BSD)
Rank: Excellent
Disclosed: 2006-02-21
Provided by:
hdm <[email protected]>
Available targets:
Id Name
-- ----
0 Automatic
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
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:
Space: 1024
Avoid: 0 characters
Description:
This module exploits a vulnerability in Safari's "Safe file"
feature, which will automatically open any file with one of the
allowed extensions. This can be abused by supplying a zip file,
containing a shell script, with a metafile indicating that the file
should be opened by Terminal.app. This module depends on the 'zip'
command-line utility.
References:
https://nvd.nist.gov/vuln/detail/CVE-2006-0848
OSVDB (23510)
http://www.securityfocus.com/bid/16736
Module Options
This is a complete list of options available in the osx/browser/safari_metadata_archive exploit:
msf6 exploit(osx/browser/safari_metadata_archive) > show options
Module options (exploit/osx/browser/safari_metadata_archive):
Name Current Setting Required Description
---- --------------- -------- -----------
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)
Exploit target:
Id Name
-- ----
0 Automatic
Advanced Options
Here is a complete list of advanced options supported by the osx/browser/safari_metadata_archive exploit:
msf6 exploit(osx/browser/safari_metadata_archive) > show advanced
Module advanced options (exploit/osx/browser/safari_metadata_archive):
Name Current Setting Required Description
---- --------------- -------- -----------
ContextInformationFile no The information file that contains context information
DisablePayloadHandler false no Disable the handler code for the selected payload
EnableContextEncoding false no Use transient context when encoding payloads
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
Exploit Targets
Here is a list of targets (platforms and systems) which the osx/browser/safari_metadata_archive module can exploit:
msf6 exploit(osx/browser/safari_metadata_archive) > show targets
Exploit targets:
Id Name
-- ----
0 Automatic
Compatible Payloads
This is a list of possible payloads which can be delivered and executed on the target system using the osx/browser/safari_metadata_archive exploit:
msf6 exploit(osx/browser/safari_metadata_archive) > show payloads
Compatible Payloads
===================
# Name Disclosure Date Rank Check Description
- ---- --------------- ---- ----- -----------
0 payload/cmd/unix/bind_perl normal No Unix Command Shell, Bind TCP (via Perl)
1 payload/cmd/unix/bind_perl_ipv6 normal No Unix Command Shell, Bind TCP (via perl) IPv6
2 payload/cmd/unix/bind_ruby normal No Unix Command Shell, Bind TCP (via Ruby)
3 payload/cmd/unix/bind_ruby_ipv6 normal No Unix Command Shell, Bind TCP (via Ruby) IPv6
4 payload/cmd/unix/generic normal No Unix Command, Generic Command Execution
5 payload/cmd/unix/reverse normal No Unix Command Shell, Double Reverse TCP (telnet)
6 payload/cmd/unix/reverse_bash_telnet_ssl normal No Unix Command Shell, Reverse TCP SSL (telnet)
7 payload/cmd/unix/reverse_perl normal No Unix Command Shell, Reverse TCP (via Perl)
8 payload/cmd/unix/reverse_perl_ssl normal No Unix Command Shell, Reverse TCP SSL (via perl)
9 payload/cmd/unix/reverse_ruby normal No Unix Command Shell, Reverse TCP (via Ruby)
10 payload/cmd/unix/reverse_ruby_ssl normal No Unix Command Shell, Reverse TCP SSL (via Ruby)
11 payload/cmd/unix/reverse_ssl_double_telnet normal No Unix Command Shell, Double Reverse TCP SSL (telnet)
Evasion Options
Here is the full list of possible evasion options supported by the osx/browser/safari_metadata_archive exploit in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 exploit(osx/browser/safari_metadata_archive) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
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.
This exploit requires the zip command to be installed in your path
Here is a relevant code snippet related to the "This exploit requires the zip command to be installed in your path" error message:
67: end
68:
69: def check_dependencies
70: @zip = (Rex::FileUtils::find_full_path('7za') || Rex::FileUtils::find_full_path('7za.exe'))
71: return if @zip
72: fail_with(Failure::Unknown, "This exploit requires the zip command to be installed in your path")
73: end
74:
75: def on_request_uri(cli, request)
76: # Re-generate the payload
77: return if ((p = regenerate_payload(cli)) == nil)
Go back to menu.
Related Pull Requests
- #14213 Merged Pull Request: Add disclosure date rubocop linting rule - enforce iso8601 disclosure dates
- #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
- #6812 Merged Pull Request: Resolve #6807, remove all OSVDB references.
- #6655 Merged Pull Request: use MetasploitModule as a class name
- #6648 Merged Pull Request: Change metasploit class names
- #2634 Merged Pull Request: Reduce number of modules available on BrowserAutopwn
- #2525 Merged Pull Request: Change module boilerplate
- #2491 Merged Pull Request: Bug #8419 - Added platform info missing on exploits
- #2229 Merged Pull Request: Add fail_with() to all module types, move Failure constants to Msf::Module
- #1241 Merged Pull Request: Removed all $Id$ and $Revision$ occurences
- #1177 Merged Pull Request: Add a maxver for the safari_metadata_archive exploit.
References
- CVE-2006-0848
- OSVDB (23510)
- BID-16736
See Also
Check also the following modules related to this module:
- exploit/osx/browser/safari_file_policy
- exploit/osx/browser/safari_in_operator_side_effect
- exploit/osx/browser/safari_proxy_object_type_confusion
- exploit/osx/browser/safari_user_assisted_applescript_exec
- exploit/osx/browser/safari_user_assisted_download_launch
- exploit/osx/browser/adobe_flash_delete_range_tl_op
- exploit/osx/browser/mozilla_mchannel
- exploit/osx/browser/osx_gatekeeper_bypass
- exploit/osx/browser/software_update
- auxiliary/gather/safari_file_url_navigation
- exploit/apple_ios/browser/safari_jit
- exploit/apple_ios/browser/safari_libtiff
- exploit/windows/browser/safari_xslt_output
- post/osx/gather/safari_lastsession
- exploit/linux/http/elfinder_archive_cmd_injection
- exploit/multi/fileformat/archive_tar_arb_file_write
- auxiliary/gather/apple_safari_webarchive_uxss
- exploit/linux/http/cpi_tararchive_upload
- exploit/linux/http/rconfig_ajaxarchivefiles_rce
- auxiliary/gather/apple_safari_ftp_url_cookie_theft
- post/windows/gather/credentials/safari
- auxiliary/sqli/oracle/dbms_metadata_get_granted_xml
- auxiliary/sqli/oracle/dbms_metadata_get_xml
- auxiliary/sqli/oracle/dbms_metadata_open
- post/multi/gather/aws_ec2_instance_metadata
Related Nessus plugins:
Authors
- hdm
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.