Linux Privilege Escalation
January 08, 2024
Last updated
January 08, 2024
Last updated
Task 1
Task 2
Task 3
Task 4
Task 5
Task 6
Task 7
Task 8
Just use this command to see the capabilities that can be use to suid
Task 9 - Crontab
Change the content on the file that runs on crontab
Get the password hash from the /etc/shadow
Task 10
Find writable folders with this command
Display the PATH to see the folder that has executable files
Make a executable file that has /bin/bash in it
There is a executable ./test file that will run the ./thm command from the /tmp/thm that has /bin/bash
This test file is suid file
Task 11
From the attacker machine use this command
After you mount the /tmp to the attacker machine we will now copy the /bin/bash to the /tmp from the victim machine
then use these commands to change the owner of that file and make it suid and executable
then just run the command
Task 12
First ssh to leonard user then find the suid, after that use base64
Get the password hash then use john
Then ssh to view the flag1
After that use sudo -l to view the sudo commands that the user can use
We now own the box