GIAC Penetration Tester (GPEN) — Question 48
What problem occurs when executing the following command from within a netcat raw shell? sudo cat /etc/shadow
Answer options
- A. Sudo does not work at all from a shell
- B. Sudo works fine if the user and command are both in the /etc/sudoers file
- C. The display blanks after typing the sudo command
- D. You will not be able to type the password at the password prompt
Correct answer: A
Explanation
The correct answer is A because netcat does not support the terminal features required for sudo to function properly, leading to it not working at all. Options B and C are incorrect as they assume sudo would work in some form, while D is also not applicable since the terminal is not capable of handling password input correctly.