Researchers bypass the restrictions of Mac OS X default sandbox profiles

Security researchers use scripting to circumvent Mac OS X application sandbox restrictions on network access

The restrictions imposed by Mac OS X generic application sandbox profiles can be easily bypassed, researchers from Core Security Technologies found.

Apple does not believe this poses a security problem, but is considering a documentation change to better communicate limitations of the sandbox profiles, the security experts said.

The Mac OS X App Sandbox allows developers to restrict what their applications can do and access on a system. This is an important proactive security mechanism, because if an attacker manages to take control over a "sandboxed" application, through a vulnerability or otherwise, their actions would be restricted by that app's permissions.

To help developers implement this security feature more easily in their apps, Apple has provided a few default sandbox profiles. One of them is called "kSBXProfileNoNetwork" and as the name implies, it restricts an application's access to the local network. Another one, called "kSBXProfileNoInternet," can be used to restrict access to the Internet.

Security researchers from Core Security Technologies discovered that these default profiles allow Apple-script events to be sent to other applications. They created a proof-of-concept exploit that leverages this to call "osascript," a scripting language interpreter built into Mac OS X, in order to spawn a separate, non-sandboxed, process.

In practical terms, if an attacker gains access over an application running under the kSBXProfileNoInternet sandbox profile, he could use osascript to launch a separate process that does have access to the Internet, therefore bypassing the restriction.

"An additional risk with these profiles is that they are supposed to provide an example of how a process should be restricted in different scenarios. If the no-network profile allows Apple-script events, this may result in new applications using the same restriction rules, therefore offering a false sense of security," the Core Security researchers said in their advisory.

The company claims to have notified Apple's product security team on Sept. 20 and was told that this is not a security issue because the sandbox documentation doesn't state that Apple events will be prohibited when using this profile.

According to Core Security, Apple is considering modifying the documentation in order to make it clearer that restrictions enforced by a sandbox profile only apply to the processes that use it. Apple did not return a request for comment on its plans regarding this issue.

However, back in 2008, security researcher Charlie Miller demonstrated a very similar attack and the company responded at the time by restricting the use of Apple events for the affected sandbox profiles.

There is a simple workaround for Core Security's proof-of-concept exploit, said Paul Ducklin, the head of technology for the Asia Pacific region at antivirus firm Sophos. It involves denying access to "/usr/bin/osascript" when defining the sandbox for an application.

However, Core Security said that "osascript" was used in this case just to keep it simple, which suggests that other methods of bypassing the restriction are also available, as long as Apple-script events are allowed.

Join the PC World newsletter!

Error: Please check your email address.

Tags ApplesecurityAccess control and authenticationDesktop securityCore Security TechnologiesExploits / vulnerabilities

Our Back to Business guide highlights the best products for you to boost your productivity at home, on the road, at the office, or in the classroom.

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Lucian Constantin

IDG News Service
Show Comments

Essentials

Microsoft L5V-00027 Sculpt Ergonomic Keyboard Desktop

Learn more >

Lexar® JumpDrive® S57 USB 3.0 flash drive

Learn more >

Mobile

Lexar® JumpDrive® S45 USB 3.0 flash drive 

Learn more >

Exec

Audio-Technica ATH-ANC70 Noise Cancelling Headphones

Learn more >

Lexar® Professional 1800x microSDHC™/microSDXC™ UHS-II cards 

Learn more >

HD Pan/Tilt Wi-Fi Camera with Night Vision NC450

Learn more >

Lexar® JumpDrive® C20c USB Type-C flash drive 

Learn more >

Budget

Back To Business Guide

Click for more ›

Most Popular Reviews

Latest News Articles

Resources

PCW Evaluation Team

Michael Hargreaves

Windows 10 for Business / Dell XPS

I’d happily recommend this touchscreen laptop and Windows 10 as a great way to get serious work done at a desk or on the road.

Aysha Strobbe

Windows 10 / HP Spectre

Ultimately, I think the Windows 10 environment is excellent for me as it caters for so many different uses. The inclusion of the Xbox app is also great for when you need some downtime too!

Mark Escubio

Windows 10 / Lenovo Yoga

For me, the Xbox Play Anywhere is a great new feature as it allows you to play your current Xbox games with higher resolutions and better graphics without forking out extra cash for another copy. Although available titles are still scarce, but I’m sure it will grow in time.

Kathy Cassidy

STYLISTIC Q702

First impression on unpacking the Q702 test unit was the solid feel and clean, minimalist styling.

Anthony Grifoni

STYLISTIC Q572

For work use, Microsoft Word and Excel programs pre-installed on the device are adequate for preparing short documents.

Featured Content

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?