Sandboxing on Mac OS X Leopard
Sunday, December 16th, 2007http://dvlabs.tippingpoint.com/blog/2007/12/14/new-leopard-security-features—part-iii-sandboxing
This is an interesting article on sandboxing in Leopard.
It’s a feature which allows a user or administrator to limit the actions that a process can do to only the actions that it needs to do. Then, if there is a security vulnerability such as a buffer overflow in the program, when malicious code is injected into the process, it can only do the actions that the process would normally do, thus limiting the potential damage significantly.
In the paper “Some thoughts on security after ten years of qmail 1.0” by Daniel J Bernstein, djb mentions this type of technology as one of the most promising for mitigating security bugs. Specifically, see section 5.2. Of course, he also claims in section 2.5 that “minimizing privilege” is a fundamentally wrong distraction, and the key is minimizing the amount of trusted code, which isn’t the same thing.
Sandboxing can be used for both, and the key to reducing the trusted code base rather than just reducing privilege in general is to intelligently apply appropriate profiles.
See the manpages sandbox(7), sandbox-exec(1), sandbox_init(3), and sandbox-compilerd(8).