Penetration testing
Privilege Escalation Explained: Linux and Windows Basics
Getting a foothold on a machine usually gives an attacker the rights of an ordinary user or service. Privilege escalation is turning that into administrator or root access. In real assessments it rarely needs an exotic exploit: it usually comes from a misconfiguration someone left behind. Here are the common causes and their fixes.
Enumeration Comes First
Escalation is mostly careful looking: who you are, what groups you are in, what runs on the machine, what is scheduled, which files you can write, what software and patches are installed. Testers use scripts to collect this quickly, but must understand every finding they report.
Common Linux Causes
- Sudo rules that let a user run a program as root that can open a shell or edit files
- SUID binaries that run with the owner's rights and can be abused
- Writable scripts run by cron as root
- Credentials in files: configuration files, history files and backups
- Weak file permissions on sensitive files
- Outdated kernels with known local exploits, used carefully because they can crash systems
Common Windows Causes
- Service misconfigurations: services whose files or settings ordinary users can change, or unquoted service paths with spaces
- Stored credentials: in files, scripts, saved sessions or the registry
- Powerful token privileges held by service accounts, such as the impersonate privilege, which several known techniques abuse
- Policies that install software with elevated rights for any user
- Missing patches for known local privilege escalation flaws
- Reused local administrator passwords across machines
In Active Directory
On a domain, escalation often continues beyond one machine: from local administrator to domain user credentials, and along attack paths to domain admin. See Active Directory attacks explained.
How Defenders Prevent It
- Grant the least privilege needed to users, services and sudo rules
- Review SUID files, scheduled tasks and service permissions regularly
- Keep credentials out of files; use a secrets manager
- Patch operating systems promptly
- Use Windows LAPS for unique local administrator passwords
- Alert on new services, scheduled tasks and additions to administrator groups; see Windows event IDs for SOC analysts
Reporting It
A good finding names the exact misconfiguration, shows the evidence, explains the impact, and gives a fix the administrator can apply. See how to write a penetration testing report.
Practice Legally
Practice escalation on deliberately vulnerable machines in your home lab and on practice platforms. Our network and Active Directory course covers Linux and Windows escalation before the Active Directory module.
Want guided practice on escalation? Book free trial classes. Contact us or call +91 86868 92922.
Courses Mentioned in This Guide
More Guides
Active Directory Attacks Explained for Beginners
How penetration testers assess Active Directory: enumeration, Kerberoasting, NTLM relay, ACL abuse and DCSync in plain language, with the fix for each.
Read the guide →Penetration Testing Phases Explained, Step by Step
The phases of a penetration test, from scoping and reconnaissance to exploitation, reporting and retesting, with what happens and what is produced in each.
Read the guide →Nmap for Beginners: Essential Scans Explained
Learn Nmap step by step: host discovery, port and version scans, default scripts, timing and saving output, with the commands explained and where to practice legally.
Read the guide →Kali Linux for Beginners: Install, Set Up and First Steps
Start with Kali Linux the right way: what it is, how to install it in a virtual machine, first setup steps, the tool categories, and the Linux skills to learn first.
Read the guide →Start Your Cyber Security Career
Talk to a counselor, choose the right course for your goals, and get the fee, syllabus and next batch dates in writing.
- Call+91 86868 92922
Open 7 days: Mon to Fri 8:30 AM to 8:30 PM IST
Sat and Sun 10 AM to 6 PM IST - Emailinfo@hackingtrainer.com
- VisitGround Floor, G-3, Sri Venkatasai Nest, Kallu Compound Road, Nagarjuna Nagar Colony, Yella Reddy Guda, Ameerpet, Hyderabad – 500073
Open in Google Maps