Credit to: TidBITS.com

How Apple is locking down the Mac

Apple’s mobile operating system has been malware-free since iOS was released. Apple’s been slowly bringing this level of security to the Mac by not only enhancing the Mac OS but the hardware (See Mac Security) as well. Since Mountain Lion (Mac OS X 10.8) new software security features have been implemented as a dual-line of defense. One is is Gatekeeper-designed to protect users from malicious software, the other is Sandboxing- a way to protect the rest of your computer by preventing applications from doing unexpected things to your computer. IOS apps have always been heavily sandboxed, which is why apps can’t access each other’s files on your mobile devices.

What’s Apple’s Gatekeeper

The safest place to get apps for your Mac is the App Store. Apple reviews each app in the App Store before it’s accepted and signs it to ensure that it hasn’t been tampered with or altered. If there’s ever a problem with an app, Apple can quickly remove it from the store.

Gatekeeper aims to keep you safe from malware when downloading apps outside of the Mac App Store. Gatekeeper helps reduce the ability of attackers to trick users into running downloaded malicious applications. Gatekeeper will allow only two types of downloaded apps to launch on a Mac: those from the Mac App Store, and apps that are digitally signed with an Apple-issued Developer ID. 

If you download and install apps from the internet or directly from a developer, macOS continues to protect your Mac. When you install Mac apps, plug-ins, and installer packages from outside the App Store, macOS checks the Developer ID signature to verify that the software is from an identified developer and that it has not been altered. By default, macOS Catalina also requires software to be notarized, so you can be confident that the software you run on your Mac doesn’t contain known malware. Before opening downloaded software for the first time, macOS requests your approval to make sure you aren’t misled into running software you didn’t expect.

What’s Apple’s Sandboxing

Sandboxing is a security technique that acts as a last line of defense against exploited, buggy, or otherwise compromised applications, which Apple is implementing to ensure programs distributed through the Mac App Store are as safe and secure as possible. It is designed to contain damage to the system and the user’s data if an app becomes compromised.  In a nutshell, Sandboxing aims to protect users by restricting what an application can do by keeping it in its own “box” and only allowing limited authorised access to specific files and resources on your system. A sandboxed application doesn’t run with full access. Instead, it executes inside a restricted container that is isolated from the rest of your Mac. Thus, if an attacker were to exploit a vulnerability in the app and inject malicious code, that code would be limited to the sandbox.

App Sandbox enables you to describe how your app interacts with the system. The system then grants your app the access it needs to get its job done, and no more.

Apps distributed through the Mac App Store must adopt App Sandbox. Apps signed and distributed outside of the Mac App Store with Developer ID can (and in most cases should) use App Sandbox as well. Sandboxing of a program is done by the developer for the benefit of the community, to prevent his program from inadvertently accessing files it was not built to access (which may happen with bugs, or if the program is exploited by a hacker). The developer does not have to do this, but if not then errors in the program may result in a larger problem than a merely hung or crashed process.

In addition to protecting user data, sandboxing will also help prevent applications from interfering with each other, and thereby increase the stability of a user’s applications as a whole.