A tester has a low-privilege shell on a Linux host and no password for the account. The tester needs files that execute with root's privileges regardless of who runs them. Which command BEST finds them?
Show the answer
Correct answerC. find / -perm -4000 -user root 2>/dev/null
AWhy not this: Mode 0002 finds world-writable files, which can be modified but do not run with root's privileges.
BWhy not this: Mode 2000 is the setgid bit, which runs with the file's group rather than root as the owner.
CWhy this is right: Mode 4000 is the setuid bit, so root-owned matches run as root for any caller.
DWhy not this: It lists the user's sudo rights, normally requires the account password, and does not search for setuid files.
Mode 4000 is the setuid bit, which makes a file run as its owner; restricting to root-owned files finds those that run as root. The 2000 mode is setgid, which uses the file's group, and sudo -l needs the account password and lists sudo rights instead.