What Is Privilege Escalation?
What Does "Privilege Escalation" Mean?
At it's core, Privilege Escalation usually involves going from a lower permission to a higher permission. More technically, it's the exploitation of a vulnerability, design flaw or configuration oversight in an operating system or application to gain unauthorized access to resources that are usually restricted from the users.
Why Is It Important?
Rarely when doing a CTF or real-world penetration test, will you be able to gain a foothold (Initial Access) that affords you administrator access. Privilege escalation is crucial, because it lets you gain system administrator levels of access. This allow you to do many things, including:
• Reset passwords.
• Bypass access controls to compromise protected data.
• Edit software configurations.
• Enable persistence, so you can access the machine again later.
• Change privilege of users.
• Get that cheeky root flag.
As well as any other administrator or super user commands that you desire.
Privilege Tree:
Horizontal Privilege Escalation:
This is where you expand your reach over the compromised system by taking over a different user who is on the same privilege level as you. For instance, a normal user hijacking another normal user (Rather than elevating to super user). This allows you to inherit whatever files and access that user has. This can be used, for example, to gain access to another normal privilege user, that happens to have an SUID file attached to their home directory (More on these later) which can then be used to get super user access. [Travel sideways on the tree]
Vertical Privilege Escalation (Privilege Elevation):
This is where you attempt to gain higher privileges or access, with an existing account that you have already compromised. For local privilege escalation attacks this might mean hijacking an account with administrator privileges or root privileges. [Travel up on the tree]