CompTIA PenTest+ (PT0-001) — Question 174
A penetration tester has identified a directory traversal vulnerability. Which of the following payloads could have helped the penetration tester identify this vulnerability?
Answer options
- A. 'or 'folder' like 'file'; ג€"ג€"
- B. || is /tmp/
- C. ג€><script>document.location=/root/</script>
- D. && dir C:/
- E. ../../../../../../../../
Correct answer: E
Explanation
The correct answer E, ../../../../../../../../, is a classic payload used to traverse directories and access files outside the intended directory. The other options either do not execute a directory traversal or target specific functions and commands that do not exploit the vulnerability effectively.