Advanced Linux & Shell Scripting
Q87 / 100

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

A

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

Explanation

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.

Progress
87/100