Free tech learning for everyone, from basics to pro

Ethical HackingCyber SecurityIntermediate

Privilege escalation explained: how attackers become admin and how to stop them

In short: Privilege escalation is when an attacker who has ordinary access gains higher rights, such as administrator or root (vertical), or another user's access (horizontal). It usually relies on missing patches, weak settings or stored passwords. Least privilege, patching, removing local admin rights and monitoring stop most of it.

What is privilege escalation?

Most attacks begin with limited access: a phished staff account, a weak web form or a compromised laptop. That access is rarely enough to reach the attacker's goal. Privilege escalation is the step where they turn limited access into more power, usually administrator on Windows or root on Linux. In an authorised test, ethical hackers look for escalation paths so the organisation can close them before a criminal finds them. The wider attack stages are covered in the phases of ethical hacking.

How privilege escalation fits into an attackInitialaccessordinary userLook aroundwhat is weak?Escalategain admin orrootMove andpersistother systemsGoaldata ordisruption
Figure 1. Attackers rarely start as administrators. Stopping escalation stops most attacks at step three.

Vertical and horizontal escalation

Vertical and horizontal escalationVerticalUser becomes admin or rootUses bugs or weak settingsGives full control of a systemExample: unpatched kernel flawHorizontalUser becomes another userSame level, different dataOften a broken access checkExample: changing an ID in a URL
Figure 2. Both types matter. Vertical gives control; horizontal gives access to other people's data.

Vertical escalation means moving up: from a normal user to an administrator. Horizontal escalation means moving sideways: from one customer's account to another's, at the same privilege level. Web applications suffer most from horizontal problems, which the OWASP Top 10 calls broken access control (see the OWASP Top 10).

Common weaknesses that allow it

WeaknessWhy it helps an attackerFix
Missing operating system patchesKnown local privilege escalation bugs are published regularlyPatch quickly, especially flaws marked as exploited
Everyday users with local admin rightsNo escalation needed at allRemove local admin; use separate admin accounts
Passwords stored in scripts, files or browsersGives access to higher-privileged accountsUse a secrets manager and scan for stored credentials
Services running with too many rightsA weak service becomes a route to full controlRun services with the least privilege they need
Weak file and folder permissionsUsers can change programs that run as adminReview permissions on system folders and scheduled tasks
Same local admin password on every PCOne cracked machine unlocks all of themUse Windows LAPS to give each PC a unique password

How to defend against it

  • Least privilege: give people and services only the rights they need. See privileged access management.
  • Patch operating systems and drivers on a regular schedule, faster for known exploited flaws.
  • Separate admin accounts that are never used for email or web browsing.
  • Application control, such as Windows App Control or AppLocker, so users cannot run unknown programs.
  • Monitoring: alert on new admin accounts, changes to admin groups and unusual use of system tools.

Real-world example: a help desk PC

During an authorised internal test at a fictional logistics firm, the tester starts with a normal staff account. They find a script on a shared drive that maps network drives using a service account with a password written inside it. That account is a local administrator on every help desk PC. Within an hour the tester has admin rights on twelve machines. The firm removes the password from the script, moves the account into a secrets manager with least privilege, deploys LAPS and adds an alert for new members of local admin groups. A retest finds no path from a normal user to administrator.

Practice

What is the difference between vertical and horizontal privilege escalation?
Vertical means gaining higher rights, such as user to admin. Horizontal means gaining another user's access at the same level.
Why is giving everyday users local admin rights risky?
An attacker who compromises that user already has admin rights, so no escalation step is needed.
What does Windows LAPS prevent?
It gives each computer a unique, rotated local admin password, so one cracked password does not unlock every machine.

Key takeaways

  • Privilege escalation turns limited access into admin, root or another user's access.
  • Vertical escalation moves up; horizontal escalation moves sideways between users.
  • Missing patches, stored passwords and too many admin rights cause most escalation paths.
  • Least privilege, patching, LAPS and separate admin accounts stop most of it.
  • Monitor admin group changes so escalation is spotted quickly.
Tracks your learning on this device only. See your progress on the learning paths.
Verified author✓ Valid
Issued to
Mohamed Fayas
Role
Founder of FM TecHub
Credentials
CCNABTEC HND Network EngineeringBEng (Hons) Computer Networking & Cloud Security
Issuer
FM TecHub · fmtechub.com

He writes practical, plain-English guides on networking, security and cloud.

More about the author →

Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Email updates: coming soon

New notes, tools and security news from FM TecHub by email, explained simply. Free. We're not collecting email addresses yet; see our privacy policy.

PortServiceStatus
SMTP/25Email updatesopening soon

Meanwhile, stay connected: