Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Privilege separation
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Implementation == A common method to implement privilege separation is to have a computer program [[fork (operating system)|fork]] into two [[process (computing)|process]]es. The main program drops [[privilege (computing)|privileges]], and the smaller program keeps privileges in order to perform a certain task. The two halves then communicate via a [[Unix domain socket|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 the [[setuid]](2)/[[setgid]](2) and related [[system call]]s, which were specified by [[POSIX]]. If these are incorrectly positioned, gaps can allow widespread network penetration. Many [[computer network|network]] service [[daemon (computer software)|daemons]] have to do a specific privileged operation such as open a [[raw socket]] or an [[Internet socket]] in the [[TCP and UDP port numbers|well known ports]] range. Administrative [[software utility|utilities]] can require particular privileges at [[Run time (program lifecycle phase)|run-time]] 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'' under [[Unix-like]] [[operating system]]s. The unprivileged part is usually run under the "[[nobody (username)|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 (computing)|crash]] in the less privileged part cannot be [[exploit (computer security)|exploited]] to gain privileges, merely to cause a [[denial-of-service attack]]).
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)