Content deleted Content added
Deutsch Tags: Reverted Visual edit Mobile edit Mobile web edit |
Citation bot (talk | contribs) Removed parameters. | Use this bot. Report bugs. | Suggested by Abductive | Category:Articles with unsourced statements from November 2007 | #UCB_Category 432/562 |
||
(20 intermediate revisions by 18 users not shown) | |||
Line 1:
{{Short description|None}}
<sup>A</sup> number of computer [[operating systems]] employ security features to help prevent [[malicious software]] from gaining sufficient privileges to compromise the computer system. Operating systems lacking such features, such as [[DOS]], [[Microsoft Windows|Windows]] implementations prior to [[Windows NT]] (and its descendants), CP/M-80, and all Mac operating systems prior to Mac OS X, had only one category of user who was allowed to do anything. With separate execution contexts it is possible for multiple users to store private files, for multiple users to use a computer at the same time, to protect the system against malicious users, and to protect the system against malicious programs. The first multi-user secure system was [[Multics]], which began development in the 1960s; it wasn't until [[UNIX]], [[BSD]], [[Linux kernel|Linux]], and [[Windows NT|NT]] in the late 80s and early 90s that multi-tasking security contexts were brought to [[x86]] consumer machines.▼
{{Missing information|the Mac "Authenticate" dialog|date=September 2021}}
▲
== Introduction to implementations ==
Line 5 ⟶ 8:
{|
|-
|style="width:130px;height:90px;text-align:center" rowspan=2 |[[File:User Account Control.png|border|120px|User Account Control prompt]]<small>User Account Control prompt dialog box</small>
|'''[[User Account Control]]''' ('''UAC'''):<br/>Included with [[Windows Vista]] and later [[Microsoft Windows]] operating systems, ''UAC'' prompts the user for authorization when an application tries to perform an administrator task.<ref>{{cite web
|url=https://technet.microsoft.com/en-us/windowsvista/aa906021.aspx
Line 12 ⟶ 15:
|date=2006-10-02
|accessdate=2007-03-12
|archive-url=https://
|archive-date=2011-08-
|url-status=dead
}}</ref>
Line 31 ⟶ 34:
|accessdate=2007-03-13
}}</ref> This service provides the capability to allow applications running as a separate user to interact with the logged-in user's desktop. This is necessary to support drag-and-drop, clipboard sharing, and other interactive login features.
|-
| style="text-align: center;" |
|'''[[sudo]]''':<br />[[Windows 11, version 24H2]] comes with Windows edition of {{Mono|sudo}}. Although not enabled by default, it can be enabled in Developer Settings page<ref>{{Cite web |date=2025-07-22 |title=Sudo for Windows |url=https://learn.microsoft.com/en-us/windows/advanced-settings/sudo/ }}</ref>.
|}
;macOS
{|
|-
|style="width:130px;height:90px;text-align:center" |[[Image:Mac OS X Authenticate.png|border|120px|Authenticate]]
|[[
|}
Line 57 ⟶ 63:
|archive-date = 2007-02-22
|url-status = dead
}}</ref> ''sudo'' is a highly configurable Unix command
|url=http://www.gratisoft.us/sudo/intro.html
|title=Sudo in a Nutshell
Line 98 ⟶ 104:
|-
|
|'''[[doas]]''':<br/> {{Mono|sudo}} replacement since [[OpenBSD]] 5.8 (October 2015)
|}
Line 134 ⟶ 140:
=== Fake authentication dialogs ===
Another security consideration is the ability of malicious software to [[Spoofing attack|spoof]] dialogs that look like legitimate security confirmation requests. If the user were to input credentials into a fake dialog, thinking the dialog was legitimate, the malicious software would then know the user's password. If the Secure Desktop or similar feature were disabled, the malicious software could use that password to gain higher privileges.
[[File:Ctrl-Alt-Del for accessing secure desktop to enter credentials.png|thumb|[[User Account Control|UAC]] requesting the secure attention sequence on Windows 11, asking the user to press [[Control-Alt-Delete|Ctrl+Alt+Delete]] first to enter credentials, to avoid login spoofing.]]
* Though it is not the default behavior for usability reasons, '''UAC''' may be configured to require the user to press [[Control-Alt-Delete|Ctrl+Alt+Del]] (known as the [[secure attention sequence]]) as part of the authentication process. Because only Windows can detect this key combination, requiring this additional security measure would prevent spoofed dialogs from behaving the same way as a legitimate dialog.<ref name="Allchin">{{cite web
|url=http://windowsvistablog.com/blogs/windowsvista/archive/2007/01/23/security-features-vs-convenience.aspx
Line 143 ⟶ 150:
|date=2007-01-23
|accessdate=2007-03-12
}}</ref> For example, a spoofed dialog might not ask the user to press {{Key press|Ctrl
* In GNOME, '''PolicyKit''' uses different dialogs, depending on the configuration of the system. For example, the authentication dialog for a system equipped with a [[fingerprint reader]] might look different from an authentication dialog for a system without one. Applications do not have access to the configuration of PolicyKit, so they have no way of knowing which dialog will appear and thus how to spoof it.<ref>{{cite web|url=http://hal.freedesktop.org/docs/PolicyKit/introduction.html#intro-about|title=Authentication Agent|date=2007|accessdate=2017-11-15|archive-url=https://web.archive.org/web/20120218163259/http://hal.freedesktop.org/docs/PolicyKit/introduction.html#intro-about|archive-date=2012-02-18|url-status=dead}}</ref>
Line 170 ⟶ 177:
* '''sudo''',<ref name="Sudo Nutshell"/> '''gksudo''', and '''kdesu''' do not ask the user to re-enter their password every time it is called to elevate a program. Rather, the user is asked for their password once at the start. If the user has not used their administrative privileges for a certain period of time (sudo's default is 5 minutes<ref name="Sudo Nutshell"/>), the user is once again restricted to standard user privileges until they enter their password again.
:sudo's approach is a trade-off between security and usability. On one hand, a user only has to enter their password once to perform a series of administrator tasks, rather than having to enter their password for each task. But at the same time, the surface area for attack is larger because all programs that run in that tty (for {{Mono|sudo}}) or all programs not running in a terminal (for gksudo and kdesu) prefixed by either of those commands before the timeout receive administrator privileges. Security-conscious users may remove the temporary administrator privileges upon completing the tasks requiring them by using the <code>sudo -k</code> command when from each tty or pts in which {{Mono|sudo}} was used (in the case of pts's, closing the terminal emulator is ''not'' sufficient). The equivalent command for kdesu is <code>kdesu -s</code>. There is no gksudo option to do the same; however, running <code>sudo -k</code> not within a terminal instance (e.g. through the {{Key press|Alt
* '''Authenticate''' does not save passwords. If the user is a standard user, they must enter a username and a password. If the user is an administrator, the current user's name is already filled in, and only needs to enter their password. The name can still be modified to run as another user.
Line 182 ⟶ 189:
== Identifying when administrative rights are needed ==
{{Expand section|Information for the Mac "Authenticate" dialog|date=December 2009}}
In order for an operating system to know when to prompt the user for authorization, an application or action needs to identify itself as requiring elevated privileges. While it is technically possible for the user to be prompted at the exact moment that an operation requiring such privileges is executed, it is often not ideal to ask for privileges partway through completing a task. If the user were unable to provide proper credentials, the work done before requiring administrator privileges would have to be undone because the task could not be seen
In the case of user interfaces such as the Control Panel in Microsoft Windows, and the Preferences panels in Mac OS X, the exact privilege requirements are hard-coded into the system so that the user is presented with an authorization dialog at an appropriate time (for example, before displaying information that only administrators should see). Different operating systems offer distinct methods for applications to identify their security requirements:
* '''sudo'''
pete ALL = /usr/bin/passwd [A-z]*, !/usr/bin/passwd root
* '''User Account Control''' uses a combination of heuristic scanning and "application manifests" to determine if an application requires administrator privileges.<ref>{{cite web
|