Users and groups are the foundation of Linux privilege management. Understanding who's on the system, what groups they belong to, and what they can access reveals privilege escalation paths that technical vulnerabilities might not.
Think of it like studying an org chart. Who has the keys? Who manages what? Sometimes the path to root isn't a vulnerability at all - it's finding out that user "backup" has sudo rights and a weak password.
Groups are Key
Special group memberships (docker, lxd, sudo, disk) often provide direct paths to root. Always check what groups you're in!
Current User Context
Docker/LXD = Root
If you're in the docker or lxd group, you can get root immediately. These groups allow container operations that can access the host filesystem as root.
All System Users
Interesting Users to Note
Groups and Memberships
Dangerous Group Memberships
User Home Directories
SSH Keys are Gold
Finding another user's private SSH key (id_rsa) lets you login as them. Often users can SSH to other machines or even back to root on the same machine!
User Configuration Files
Sudo Enumeration
Sudo Without Password
Logged In Users
Password Information
User Enumeration Methodology
Systematic User Enumeration
1
IdentityRun id to see your UID, GID, groups
2
Dangerous GroupsCheck for docker, lxd, sudo, disk
3
SudoRun sudo -l for permissions
4
Other UsersList users, find humans vs services
5
Home DirsCheck for readable files, SSH keys
6
HistoryRead bash_history for credentials
7
ShadowCheck if /etc/shadow is readable
Knowledge Check
Challenges
Key Takeaways
- Check your groups immediately with "id" command
- docker, lxd, disk groups = direct root access
- NOPASSWD sudo entries are easy wins
- SSH private keys allow lateral movement
- Bash history often contains passwords
- Readable /etc/shadow is a critical finding