Recently, I configured a vulnerable server (in a VM), with intended vulnerabilities to exploit to gain access to the system and escalate privileges. One way to get root access was to debug a SUID program written by me. Even if it worked, it was the jankiest way to do it (basically used "setuid(0)").
So now I'm curious. Do you know how to write a proper SUID program in C (and/or other languages)?
So now I'm curious. Do you know how to write a proper SUID program in C (and/or other languages)?