CompTIA PenTest+ (PT0-003) Practice Questions

CompTIA PenTest+ exam preparation (exam series code PT0-003)

CompTIA PenTest+ (PT0-003) practice questions in English: 180 questions with explanations. The mock exam has 90 questions and 165 minutes.

CompTIA PenTest+ (PT0-003) free question 8 / 10 · Domain 4: Attacks and Exploits

A report must describe the impact of a directory traversal weakness in a client web application. How does the WSTG v4.2 page on testing directory traversal describe what such a weakness lets an attacker do?

  1. Change an identifier in a URL to reach another user's record when the web application skips the permission check
  2. Make the web server send requests to internal addresses on the tester's behalf and read the answers
  3. Read files that are normally out of reach, reach data outside the web root, or include external files
  4. Make a signed-in user's browser submit state-changing requests to the web application on the attacker's behalf
Show the answer and explanation

Answer: C

Why this is correct
The WSTG v4.2 page on testing directory traversal and file include says many web applications use and manage files, and that poorly designed or deployed input validation could let an attacker read or write files that are not intended to be accessible. It states that in path traversal and file include attacks, an attacker is able to read directories or files they normally could not read, access data outside the web document root, or include scripts and other kinds of files from external websites. It also says that web servers try to confine users' files inside a root directory, called the web document root, and that applications expose these vulnerabilities if input parameters are not correctly validated.

Why the other options are wrong
"Make a signed-in user's browser submit state-changing requests to the web application on the attacker's behalf" … Cross-site request forgery has its own WSTG page. The traversal page talks about reading files, reaching data outside the web document root, and including files.
"Change an identifier in a URL to reach another user's record when the web application skips the permission check" … Insecure direct object references have their own WSTG page. The traversal page says the problem arises when input parameters such as form parameters and cookie values are not correctly validated.
"Make the web server send requests to internal addresses on the tester's behalf and read the answers" … Server-side request forgery has its own WSTG page. The traversal page talks about reading directories or files, reaching data outside the web document root, and including files.

Key points
The page says that in particular situations it could be possible to execute arbitrary code or system commands.

Go to the CompTIA PenTest+ (PT0-003) practice app (10 free questions; purchase unlocks all questions)

See the full practice set