PenTest+ PT0-003 practice question 10: Attacks
A tester finds that a search box returns user input unescaped inside the page, and a crafted value runs script in other users' browsers when they view the results. Which vulnerability is this?
The options
- A. SQL injection
- B. Insecure direct object reference
- C. Server-side request forgery
- D. Reflected or stored cross-site scripting
Answer and why
The correct answer is D: Reflected or stored cross-site scripting
A. SQL injection changes database queries on the server, not scripts in a browser.
B. IDOR exposes records by changing an identifier and does not run script.
C. SSRF makes the server issue requests, which is not what happens in the victim's browser.
D. Unescaped input that runs script in a victim's browser is cross-site scripting.
What Attacks tests
Attacks and exploits is the heaviest domain at 35%. It covers network, web, authentication, wireless and social engineering attacks. Match the weakness the stem exposes to the technique that abuses it, not to the most famous tool.
Attacks and exploits is 35% of the PT0-003 exam. The exam has 90 questions in 165 minutes, so this question is a slice of the real mix, not a prediction of your result.
Try these next
Each one is a free question from the same practice test, with the answer and the reason for every option on its own page.
- A tester captures an NTLMv2 challenge response from a user who mistyped a share name, and cracks it offline to recover the password. Which technique obtained the hash?
- A tester tries one common password such as Spring2026! against every account in a large directory instead of many passwords against one account. Why is this approach used?
- A web application lets a user change the number in /invoice?id=1043 to 1044 and see another customer's invoice. Which flaw does this show?
- A tester wants to test whether employees will enter credentials on a fake sign-in page, using email lures. Which rule must be settled first?
Keep going
This is question 10 of 15 in the free PenTest+ PT0-003 practice test. If you missed it, say why in one sentence before you read on: the reason is what transfers to a differently worded question.