Linux PrivEsc
Deploy the Vulnerable Debian VM
ssh [email protected]
The authenticity of host '10.10.95.239 (10.10.95.239)' can't be established.
RSA key fingerprint is SHA256:JwwPVfqC+8LPQda0B9wFLZzXCXcoAho6s8wYGjktAnk.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '10.10.95.239' (RSA) to the list of known hosts.
[email protected]'s password:
Linux debian 2.6.32-5-amd64 #1 SMP Tue May 13 16:34:35 UTC 2014 x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri May 15 06:41:23 2020 from 192.168.1.125
user@debian:~$ whoami
userRun the "id" command. What is the result?
Service exploits
Weak File Permissions - Readable /etc/shadow
What is the root user's password hash?
What hashing algorithm was used to produce the root user's password hash?
What is the root user's password?
Weak File Permissions - Writable /etc/shadow
Weak File Permissions - Writable /etc/passwd
Run the "id" command as the newroot user. What is the result?
Sudo - Shell Escape Sequences
How many programs is "user" allowed to run via sudo?
Using GTFO bins
One program on the list doesn't have a shell escape sequence on GTFOBins. Which is it?
Consider how you might use this program with sudo to gain root privileges without a shell escape sequence.
Sudo - Environment Variables
LD_PRELOAD
LD_LIBRARY_PATH
Cron Jobs - File Permissions
Cron Jobs - PATH Environment Variable
What is the value of the PATH variable in /etc/crontab?
Cron Jobs - Wildcards
SUID / SGID Executables - Known Exploits
SUID / SGID Executables - Shared Object Injection
SUID / SGID Executables - Environment Variables
SUID / SGID Executables - Abusing Shell Features (#1)
SUID / SGID Executables - Abusing Shell Features (#2)
Passwords & Keys - History Files
What is the full mysql command the user executed?
Passwords & Keys - Config Files
Passwords & Keys - SSH Keys
NFS
What is the name of the option that disables root squashing?
Kernel Exploits
Privilege Escalation Scripts
Last updated