GSEC · Question #371
Which of the following is a security threat if included in the search path of a computer?
The correct answer is C. The dot (.) in a Linux/Unix PATH environment variable represents the current directory. Including it in the PATH is a well-known security vulnerability: if an attacker places a malicious executable with the same name as a common command (e.g., 'ls' or 'cd') in a directory a…
Question
Which of the following is a security threat if included in the search path of a computer?
Options
- A/usr
- B/sbin
- C.
- D/usr/bin
How the community answered
(56 responses)- A7% (4)
- B4% (2)
- C70% (39)
- D20% (11)
Explanation
The dot (.) in a Linux/Unix PATH environment variable represents the current directory. Including it in the PATH is a well-known security vulnerability: if an attacker places a malicious executable with the same name as a common command (e.g., 'ls' or 'cd') in a directory a privileged user visits, the system may execute the malicious file instead of the legitimate one. This is especially dangerous when the root user has '.' in their PATH. The other options - /usr, /sbin, and /usr/bin - are standard system directories containing trusted, system-managed executables and are considered safe and appropriate entries in the PATH.
Topics
Community Discussion
No community discussion yet for this question.