// notes/ PrivEsc — Linux
🐧

Initial Enumeration User Enumeration

Notes from oscp.adot8.com — linux privilege escalation.

#linux privilege escalation#adot8
source · oscp.adot8.com · linux-privilege-escalation/initial-enumeration_user-enumeration

User Enumeration

Who are you?

🐺 howlsec@kali
01whoami
02id

View sudo permissions

🐺 howlsec@kali
01sudo -l

View other users

🐺 howlsec@kali
01cat /etc/passwd
02cat /etc/passwd | cut -d : -f 1
  • -d delimiter
  • -f field

{% hint style="info" %} Real users will be towards the bottom, root user at the top {% endhint %}

Sensitive files

🐺 howlsec@kali
01cat /etc/shadow
02cat /etc/group

Check the history

🐺 howlsec@kali
01history

Try switching users

🐺 howlsec@kali
01sudo su -