CompTIA PenTest+ (PT0-002) — Question 249
A penetration tester is reviewing the security of a web application running in an IaaS compute instance. Which of the following payloads should the tester send to get the running process credentials?
Answer options
- A. file=http://192.168.1.78?+document.cookie
- B. file=../../../proc/self/environ
- C. file=’%20or%2054365=54365;––
- D. file=http://169.254.169.254/latest/meta-data/
Correct answer: B
Explanation
The correct answer is B because it accesses the environment variables of the running process, which can contain sensitive information, including credentials. Option A attempts to fetch cookies from a specified URL and is unrelated to process credentials. Option C is a classic SQL injection attempt that does not relate to retrieving process information, while option D tries to access metadata services which do not directly provide process credentials.