- Privilege separation
In
computer programming andcomputer security , privilege separation is a technique in which a program is divided into parts which are limited to the specific privileges they require in order to perform a specific task. This is used to mitigate the potential damage of a computer security attack.A common method to implement privilege separation is to have a computer program fork into two processes. The main program drops privileges, and the smaller program keeps privileges in order to perform a certain task. The two halves then communicate via a socket pair. Thus, any successful attack against the larger program will gain minimal access, even though the pair of programs will be capable of performing privileged operations.
Privilege separation is traditionally accomplished by distinguishing a "real"
user ID /group ID from the "effective" user ID/group ID, using thesetuid (2)/setgid (2) and relatedsystem call s, which were specified byPOSIX .Many network service daemons have to do a specific privileged operation such as open a
raw socket or anInternet socket in the well known ports range. Administrative utilities can require particular privileges atruntime as well. Such software tends to separate privileges by revoking them completely after the critical section is done, and change the user it runs under to some unprivileged account after so doing. This action is known as "dropping root" underUnix-like operating system s. The unprivileged part is usually run under the "nobody" user or an equivalent separate user account.Privilege separation can also be done by splitting functionality of a single program into multiple smaller programs, and then assigning the extended privileges to particular parts using
file system permissions . That way the different programs have to communicate with each other through the operating system, so the scope of the potential vulnerabilities is limited (since a crash in the less privileged part cannot be exploited to gain privileges, merely to cause adenial-of-service attack ).Separation of privileges is one of the major
OpenBSD security features . The implementation of Postfix was focused on implementing comprehensive privilege separation. Solaris implements a separate set of functions for "privilege bracketing".ee also
*
Principle of least privilege
*Capability-based security
*Confused deputy problem
*Privilege escalation
*Privilege revocation
*Defensive programming External links
*
Theo de Raadt : [http://www.openbsd.org/papers/ven05-deraadt/ Exploit Mitigation Techniques in OpenBSD] slides
*Niels Provos ,Markus Friedl ,Peter Honeyman : [http://niels.xtdnet.nl/papers/privsep.pdf Preventing Privilege Escalation] paper
*Niels Provos : [http://www.citi.umich.edu/u/provos/ssh/privsep.html Privilege Separated OpenSSH] project
* [http://docs.sun.com/app/docs/doc/816-1042/6m7g4ma52?a=view Trusted Solaris Developer's Guide: Bracketing Effective Privileges]
Wikimedia Foundation. 2010.