// 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?

code
01whoami
02id

View sudo permissions

code
01sudo -l

View other users

code
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

code
01cat /etc/shadow
02cat /etc/group

Check the history

code
01history

Try switching users

code
01sudo su -