What is the significance of the "setuid" bit on an executable file, and what security risks does it introduce?
Correct! Well done.
Incorrect.
The correct answer is A) When set on an executable, the setuid bit runs the program with the file owner's privileges rather than the launching user's — this lets tools like "passwd" modify a root-owned file, but bugs in such programs risk attackers gaining elevated privileges
Correct Answer
When set on an executable, the setuid bit runs the program with the file owner's privileges rather than the launching user's — this lets tools like "passwd" modify a root-owned file, but bugs in such programs risk attackers gaining elevated privileges
Setuid binaries (like /usr/bin/passwd, owned by root with the setuid bit set) temporarily elevate the executing user's privileges to the file owner's for that program's execution, which is powerful but risky — vulnerabilities in setuid programs are prime privilege-escalation targets.