In challenge tryhackme:overpass2
Reference: gtfobins herearrow-up-right.
When SUID bit is set on a bash executable, we can use the -p options to elevate our privileges to root like so:
bash (gives user shell) bash -p (gives root shell if SUID set)
Similarly here,
./.suid_bash whoami ./.suid_bash -p whoami
Last updated 4 years ago