White-box web exploitation · Auth bypass · RCE chains
120 scenario questions · 180 min · 70% Techclick practice target
⚠️ Exam Rules
| Questions in this Techclick bank | 120 |
|---|---|
| Timer | 180 min |
| Techclick practice target | 70% |
| Official exam code | OSWE |
During a white-box review of a Node.js app, a reviewer wants to enumerate every endpoint that lacks an authorization check. Which code-review approach most reliably surfaces this class of defect?
Correct: A. Building a route-to-authz matrix is the canonical secure-review technique because missing access control is invisible at runtime when you are already authenticated. Clicking through the UI is incorrect because broken-access-control endpoints often are not linked in the UI at all. Reading HTML comments and timing responses do not establish whether an authorization gate exists, so they cannot prove a route is protected.
A reviewer finds a handler that executes `eval(req.body.expression)` on attacker-supplied input. Which remediation removes the remote-code-execution risk while preserving the feature?
Correct: B. eval on user input is direct RCE, and the only safe fix is to stop interpreting the input as code by using a sandboxed parser or an explicit allowlist of operations. A try/catch is incorrect because the code still executes before any error. HTML-encoding addresses XSS, not server-side execution, so it is the wrong control. Authentication alone is insufficient because any authenticated user, including a compromised one, still gets code execution.
A PHP file builds an include path as `include($_GET['page'] . '.php');`. A defender reviewing this code should classify it as which vulnerability, and what is the correct fix?
Correct: C. Concatenating user input into an include path is the textbook file-inclusion sink, and replacing dynamic paths with a fixed allowlist (a switch or whitelist map) is the durable remediation. XSS and its HttpOnly fix are incorrect because the bug is server-side file loading, not browser script. Open redirect is unrelated to include(). SQL injection and prepared statements do not apply because no query is involved here.
While auditing front-end code, a reviewer sees `element.innerHTML = location.hash.substring(1)` executed on page load. Which secure-coding fix eliminates the DOM-based XSS sink?
Correct: A. DOM XSS happens because attacker-controlled data flows into an HTML-parsing sink, so writing to textContent (or sanitizing) breaks the sink and is the correct fix. A WAF rule is incorrect because the fragment after # is never sent to the server and cannot be inspected there. Encoding the URL on the client does not change how innerHTML parses the assigned string. A Content-Length header has no effect on client-side DOM parsing.
A reviewer notes that `path.join(uploadDir, req.query.file)` is later passed to fs.readFile, and `req.query.file` may contain '../' sequences. Which secure-coding controls correctly prevent path traversal here? (Choose TWO)
Correct: A and B. Canonicalizing with path.resolve and asserting the result is inside the base directory, plus allowlisting filenames, are the two controls that actually jail file access. Trusting path.join is incorrect because it normalizes but does not confine; path.join(base, '../../etc/passwd') escapes the base. Uppercasing the filename does nothing to remove traversal sequences. Disabling directory listing is unrelated because the read happens through application code, not directory browsing.
Last updated:
Yes. You can start, finish and score it for free, and download the Techclick practice certificate.
This bank has 120 original scenario-based questions with a 180-minute timer and a 70% Techclick practice target.
The official exam code is OSWE (OffSec).
No. They are original practice questions written by Techclick. This is not the vendor's official exam and not leaked dumps.
Score 70% or higher to get a Techclick practice certificate and LinkedIn badge. It is not an official OffSec certification.
Related practice tests: Offensive Security OSCP, Offensive Security OSDA, Offensive Security OSEP (linked below).

You earned it — let the world know!
