Vulnerabilities > CVE-2011-3230 - Permissions, Privileges, and Access Controls vulnerability in Apple Safari
Attack vector
NETWORK Attack complexity
MEDIUM Privileges required
NONE Confidentiality impact
PARTIAL Integrity impact
PARTIAL Availability impact
PARTIAL Summary
Apple Safari before 5.1.1 on Mac OS X does not enforce an intended policy for file: URLs, which allows remote attackers to execute arbitrary code via a crafted web site.
Vulnerable Configurations
Common Weakness Enumeration (CWE)
Common Attack Pattern Enumeration and Classification (CAPEC)
- Accessing, Modifying or Executing Executable Files An attack of this type exploits a system's configuration that allows an attacker to either directly access an executable file, for example through shell access; or in a possible worst case allows an attacker to upload a file and then execute it. Web servers, ftp servers, and message oriented middleware systems which have many integration points are particularly vulnerable, because both the programmers and the administrators must be in synch regarding the interfaces and the correct privileges for each interface.
- Leverage Executable Code in Non-Executable Files An attack of this type exploits a system's trust in configuration and resource files, when the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high. The attack can be directed at a client system, such as causing buffer overrun through loading seemingly benign image files, as in Microsoft Security Bulletin MS04-028 where specially crafted JPEG files could cause a buffer overrun once loaded into the browser. Another example targets clients reading pdf files. In this case the attacker simply appends javascript to the end of a legitimate url for a pdf (http://www.gnucitizen.org/blog/danger-danger-danger/) http://path/to/pdf/file.pdf#whatever_name_you_want=javascript:your_code_here The client assumes that they are reading a pdf, but the attacker has modified the resource and loaded executable javascript into the client's browser process. The attack can also target server processes. The attacker edits the resource or configuration file, for example a web.xml file used to configure security permissions for a J2EE app server, adding role name "public" grants all users with the public role the ability to use the administration functionality. The server trusts its configuration file to be correct, but when they are manipulated, the attacker gains full control.
- Blue Boxing This type of attack against older telephone switches and trunks has been around for decades. A tone is sent by an adversary to impersonate a supervisor signal which has the effect of rerouting or usurping command of the line. While the US infrastructure proper may not contain widespread vulnerabilities to this type of attack, many companies are connected globally through call centers and business process outsourcing. These international systems may be operated in countries which have not upgraded Telco infrastructure and so are vulnerable to Blue boxing. Blue boxing is a result of failure on the part of the system to enforce strong authorization for administrative functions. While the infrastructure is different than standard current applications like web applications, there are historical lessons to be learned to upgrade the access control for administrative functions.
- Restful Privilege Elevation Rest uses standard HTTP (Get, Put, Delete) style permissions methods, but these are not necessarily correlated generally with back end programs. Strict interpretation of HTTP get methods means that these HTTP Get services should not be used to delete information on the server, but there is no access control mechanism to back up this logic. This means that unless the services are properly ACL'd and the application's service implementation are following these guidelines then an HTTP request can easily execute a delete or update on the server side. The attacker identifies a HTTP Get URL such as http://victimsite/updateOrder, which calls out to a program to update orders on a database or other resource. The URL is not idempotent so the request can be submitted multiple times by the attacker, additionally, the attacker may be able to exploit the URL published as a Get method that actually performs updates (instead of merely retrieving data). This may result in malicious or inadvertent altering of data on the server.
- Target Programs with Elevated Privileges This attack targets programs running with elevated privileges. The attacker would try to leverage a bug in the running program and get arbitrary code to execute with elevated privileges. For instance an attacker would look for programs that write to the system directories or registry keys (such as HKLM, which stores a number of critical Windows environment variables). These programs are typically running with elevated privileges and have usually not been designed with security in mind. Such programs are excellent exploit targets because they yield lots of power when they break. The malicious user try to execute its code at the same level as a privileged system call.
Exploit-Db
description | Apple Safari file:// Arbitrary Code Execution. CVE-2011-3230. Remote exploit for osx platform |
id | EDB-ID:17986 |
last seen | 2016-02-02 |
modified | 2011-10-17 |
published | 2011-10-17 |
reporter | metasploit |
source | https://www.exploit-db.com/download/17986/ |
title | Apple Safari file:// Arbitrary Code Execution |
Metasploit
description | This module exploits a vulnerability found in Apple Safari on OS X platform. A policy issue in the handling of file:// URLs may allow arbitrary remote code execution under the context of the user. In order to trigger arbitrary remote code execution, the best way seems to be opening a share on the victim machine first (this can be SMB/WebDav/FTP, or a file format that OS X might automount), and then execute it in /Volumes/[share]. If there's some kind of bug that leaks the victim machine's current username, then it's also possible to execute the payload in /Users/[username]/Downloads/, or else bruteforce your way to getting that information. Please note that non-java payloads (*.sh extension) might get launched by Xcode instead of executing it, in that case please try the Java ones instead. |
id | MSF:EXPLOIT/OSX/BROWSER/SAFARI_FILE_POLICY |
last seen | 2020-03-18 |
modified | 2017-09-08 |
published | 2011-10-16 |
references | |
reporter | Rapid7 |
source | https://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/osx/browser/safari_file_policy.rb |
title | Apple Safari file:// Arbitrary Code Execution |
Nessus
NASL family | MacOS X Local Security Checks |
NASL id | MACOSX_SAFARI5_1_1.NASL |
description | The version of Apple Safari installed on the remote Mac OS X host is earlier than 5.1.1. Thus, it is potentially affected by numerous issues in the following components : - Safari - WebKit |
last seen | 2020-06-01 |
modified | 2020-06-02 |
plugin id | 56482 |
published | 2011-10-13 |
reporter | This script is Copyright (C) 2011-2018 Tenable Network Security, Inc. |
source | https://www.tenable.com/plugins/nessus/56482 |
title | Mac OS X : Apple Safari < 5.1.1 |
code |
|
Packetstorm
data source https://packetstormsecurity.com/files/download/105899/safari_file_policy.rb.txt id PACKETSTORM:105899 last seen 2016-12-05 published 2011-10-17 reporter sinn3r source https://packetstormsecurity.com/files/105899/Apple-Safari-file-Arbitrary-Code-Execution.html title Apple Safari file:// Arbitrary Code Execution data source https://packetstormsecurity.com/files/download/105827/CVE-2011-3230.txt id PACKETSTORM:105827 last seen 2016-12-05 published 2011-10-15 reporter Aaron Sigel source https://packetstormsecurity.com/files/105827/Apple-Safari-Arbitrary-Code-Execution.html title Apple Safari Arbitrary Code Execution
Seebug
bulletinFamily exploit description No description provided by source. id SSV:21029 last seen 2017-11-19 modified 2011-10-15 published 2011-10-15 reporter Root source https://www.seebug.org/vuldb/ssvid-21029 title Apple Safari Arbitrary Code Execution bulletinFamily exploit description No description provided by source. id SSV:72229 last seen 2017-11-19 modified 2014-07-01 published 2014-07-01 reporter Root source https://www.seebug.org/vuldb/ssvid-72229 title Apple Safari file:// Arbitrary Code Execution bulletinFamily exploit description CVE ID: CVE-2011-3230 Safari是苹果计算机的最新作业系统Mac OS X中的浏览器,使用了KDE的KHTML作为浏览器的运算核心。 Safari在处理file:// URL时存在策略问题,浏览恶意网站可导致任意代码执行。此漏洞不影响Windows系统。 Apple Mac OS X 10.6.8 Apple Mac OS X Server v10.6.8 厂商补丁: Apple ----- 目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载: http://support.apple.com/ id SSV:23106 last seen 2017-11-19 modified 2011-10-17 published 2011-10-17 reporter Root title Apple Safari file:// URL远程代码执行漏洞