Privilege escalation

A diagram describing privilege escalation. The arrow represents a rootkit gaining access to the kernel, and the little gate represents normal privilege elevation, where the user has to enter an Administrator username and password.

Privilege escalation is the act of exploiting a bug, a design flaw, or a configuration oversight in an operating system or software application to gain elevated access to resources that are normally protected from an application or user. The result is that an application or user with more privileges than intended by the application developer or system administrator can perform unauthorized actions.

Background

Most computer systems are designed for use with multiple user accounts, each of which has abilities known as privileges. Common privileges include viewing and editing files or modifying system files.

Privilege escalation means users receive privileges they are not entitled to. These privileges can be used to delete files, view private information, or install unwanted programs such as viruses. It usually occurs when a system has a bug that allows security to be bypassed or, alternatively, has flawed design assumptions about how it will be used. Privilege escalation occurs in two forms:

Vertical

Privilege rings for the x86 available in protected mode

This type of privilege escalation occurs when the user or process is able to obtain a higher level of access than an administrator or system developer intended, possibly by performing kernel-level operations.

Examples

In some cases, a high-privilege application assumes that it would only be provided with input matching its interface specification, thus doesn't validate this input. Then, an attacker may be able to exploit this assumption, in order to run unauthorized code with the application's privileges:

Jailbreaking

Android

Android phones can be officially rooted by either going through manufacturers controlled process, using an exploit to gain root, or installing a rooting modification. Manufacturers allow rooting through a process they control, while some allow the phone to be rooted simply by pressing specific key combinations at boot time, or by other self-administered methods. Using a manufacturers method almost always factory resets the device, making rooting useless to people who want to view the data, and also voids the warranty permanently, even if the device is derooted and reflashed. Software exploits commonly either target a root-level process that is accessible to the user, by using an exploit specific to the phone's kernel, or using a known Android exploit that has been patched in newer versions; by not upgrading the phone, or intentionally downgrading the version.

Mitigation strategies

Operating systems and users can use the following strategies to reduce the risk of privilege escalation:

Recent research has shown what can effectively provide protection against privilege escalation attacks. These include the proposal of the additional kernel observer (AKO), which specifically prevents attacks focused on OS vulnerabilities. Research shows that AKO is in fact effective against privilege escalation attacks.

Horizontal

Horizontal privilege escalation occurs when an application allows the attacker to gain access to resources which normally would have been protected from an application or user. The result is that the application performs actions with the same user but different security context than intended by the application developer or system administrator; this is effectively a limited form of privilege escalation (specifically, the unauthorized assumption of the capability of impersonating other users). Compared to the vertical privilege escalation, horizontal requires no upgrading the privilege of accounts. It often relies on the bugs in the system.

Examples

This problem often occurs in web applications. Consider the following example:

This malicious activity may be possible due to common web application weaknesses or vulnerabilities.

Potential web application vulnerabilities or situations that may lead to this condition include:

See also

References

  1. ↑ "CVE-2020-14979 Detail". NIST NVD. Retrieved 19 March 2025.
  2. ↑ Taimur Asad (October 27, 2010). "Apple Acknowledges iOS 4.1 Security Flaw. Will Fix it in November with iOS 4.2". RedmondPie. Archived from the original on February 18, 2013. Retrieved November 5, 2010.
  3. ↑ "Microsoft Minimizes Threat of Buffer Overruns, Builds Trustworthy Applications". Microsoft. September 2005. Retrieved 2008-08-04. [dead link]
  4. ↑ Smalley, Stephen. "Laying a Secure Foundation for Mobile Devices" (PDF). Archived from the original (PDF) on 28 August 2017. Retrieved 7 March 2014.
  5. ↑ Yamauchi, Toshihiro; Akao, Yohei; Yoshitani, Ryota; Nakamura, Yuichi; Hashimoto, Masaki (August 2021). "Additional kernel observer: privilege escalation attack prevention mechanism focusing on system call privilege changes". International Journal of Information Security. 20 (4): 461–473. doi:10.1007/s10207-020-00514-7. ISSN 1615-5262.
  6. ↑ Diogenes, Yuri (2019). Cybersecurity - Attack and Defense Strategies - Second Edition. Erdal Ozkaya, Safari Books Online (2nd ed.). Packt. p. 304. ISBN 978-1-83882-779-3. OCLC 1139764053.