GIAC Penetration Tester (GPEN) — Question 71
You are pen testing a Windows system remotely via a raw netcat shell. You want to quickly change directories to where the Windows operating system resides, what command could you use?
Answer options
- A. cd systemroot
- B. cd-
- C. cd /systemroot/
- D. cd %systemroot%
Correct answer: D
Explanation
The correct command is 'cd %systemroot%', as it uses the environment variable that points to the Windows operating system directory. Option A lacks the necessary percent signs to reference the environment variable, while option B is incorrect as 'cd-' is used to return to the previous directory, and option C has an incorrect syntax for Windows paths, which typically use backslashes.