nerdexam
GIAC

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…

Linux and Cryptography

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)
  • A
    7% (4)
  • B
    4% (2)
  • C
    70% (39)
  • D
    20% (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

#PATH variable#Linux security#current directory#privilege escalation

Community Discussion

No community discussion yet for this question.

Full GSEC Practice