Linux Privilege Escalation Enumeration – Complete Beginner Guide | TryHackMe Walkthrough
Linux Privilege Escalation Enumeration – Complete Beginner Guide | TryHackMe Walkthrough
Ethical hacking aur penetration testing mein jab aapko kisi Linux system ka initial access (low-privilege shell) mil jata hai, toh agla sabse bada challenge hota hai Privilege Escalation (root access lena). Aur privilege escalation ka sabse pehla aur sabse important step hai — Enumeration.
Agar enumeration sahi tarike se ki jaye, toh system ke andar chhupe hue misconfigurations, vulnerable services aur privilege escalation ke kai raste mil sakte hain.
Is article mein hum TryHackMe – Linux Privilege Escalation: Enumeration room ke important concepts aur commands ko bilkul beginner-friendly language mein samjhenge. Agar aap ek CTF player, cybersecurity student, ya bug bounty beginner hain, toh yeh guide aapke liye bahut useful hone wali hai.
Enumeration Kya Hai aur Yeh Kyon Zaroori Hai?
Enumeration ka simple matlab hota hai target system se maximum information collect karna. Privilege escalation shuru karne se pehle hume system ke baare mein jitni zyada details pata hongi, vulnerabilities ko identify karna utna hi aasaan hoga.
Privilege escalation mein guessing ya tukke se kaam nahi chalta; yahan aapko pure data par rely karna hota hai. Enumeration se hume pata chalta hai:
- Kaunsa kernel chal raha hai aur kya woh vulnerable hai?
- Kaunsi services root privileges ke saath run ho rahi hain?
- Kya koi misconfigured cron jobs ya SUID binaries hain?
- Kya koi sensitive files world-writable hain?
Yahi information hume sahi exploit choose karne mein help karti hai.
Key Information to Collect During Enumeration
Enumeration ke dauran hume mainly in cheezon par focus karna hota hai:
- System Architecture & Kernel Version
- Running Processes & Services
- Installed Packages & Applications
- Scheduled Cron Jobs
- Users, Groups & File Permissions
- Network Configuration
Aaiye ab in sabhi important commands ko step-by-step dekhte hain.
Essential Linux Enumeration Commands
1. Hostname Check
System ka hostname dekhne ke liye simple command run karein:
hostname
Tip: Yeh command kabhi-kabhi environment ya machine ke role ke baare mein useful hints de deti hai (jaise:prod-db-serveryatest-web).
2. Kernel Version Check
Kernel version privilege escalation ke liye sabse important hota hai, kyunki purane kernels mein public exploits (jaise Dirty COW, Dirty Pipe) available ho sakte hain.
uname -a
Ya sirf release version dekhne ke liye:
uname -r
3. Operating System & System Version
Operating System ki details aur distribution version janne ke liye aap in files ko read kar sakte hain:
cat /etc/issue
Ya fir:
cat /proc/version
Isse aapko pata chal jayega ki system Ubuntu, Debian, CentOS, ya kisi aur Linux distribution par chal raha hai.
4. Running Processes
System par kaun-kaun se processes active hain aur unhe kaunsa user run kar raha hai, yeh dekhne ke liye:
ps aux
Process tree aur unke relationships ko behtar tarike se dekhne ke liye:
ps axjf
Security Insight: Agar koi unsafe service ya custom script root privileges ke saath run ho rahi hai, toh woh aapka escalation vector ho sakti hai.
5. Scheduled Cron Jobs
Cron jobs automatic scheduled tasks hote hain. Agar koi script root privileges ke saath run ho rahi hai aur aapke paas us script ko edit karne ki permission (Write permission) hai, toh aap aasaani se root access pa sakte hain.
cat /etc/crontab
6. Installed Packages & Software Versions
Outdated software hamesha vulnerable hote hain. Installed packages ki list dekhne ke liye:
Debian/Ubuntu systems ke liye:
dpkg -l
RedHat/CentOS/Fedora systems ke liye:
rpm -qa
TryHackMe Enumeration Room Summary
Agar aap TryHackMe ka Linux Privilege Escalation: Enumeration room solve kar rahe hain, toh aapko mainly in basic commands par hands-on practice karne ko milti hai:
hostnameauruname(System identification ke liye)/proc/versionaur/etc/issue(OS details ke liye)ps(Process monitoring ke liye)cron(Scheduled tasks checking)dpkg/rpm(Package enumeration)
Yeh basic commands har penetration tester ko zubaani yaad honi chahiye, kyunki kisi bhi automated script (jaise LinPeas) ko run karne se pehle manual checkup zaroori hota hai.
Conclusion
Linux Privilege Escalation ka foundation hi Enumeration hai. Agar aap enumeration thoroughly aur discipline ke saath perform karte hain, toh privilege escalation kaafi aasaan aur systematic ho jata hai.
TryHackMe ka yeh room beginners ke liye ek excellent practical lab hai jahan aap real-world enumeration techniques ko seekh sakte hain. Agar aap Ethical Hacking mein apna career bana rahe hain, toh in commands ko apni daily practice ka hissa banayein.
Happy Hacking!
Aapko yeh walkthrough kaisa laga? Agar aapko koi doubt hai ya aap agle rooms ke walkthroughs chahte hain, toh neeche comment section mein zaroori batayein!
