10 exam-style questions with answers and explanations, straight from our 1,030-question bank. Tap an answer to check yourself. When you're ready, take the scored version in the free practice test.
These 10 free GWAPT questions are organized by exam domain, so you can see how each part of the GIAC Web Application Penetration Tester blueprint is tested. Reveal the answer and explanation under each question.
Domain 1: Cross Site Request Forgery, Cross Site Scripting and Client Injection Attack
Question 1
A product-preview page must display a visitor's text literally, including angle brackets. Its JavaScript contains:
const value = decodeURIComponent(location.hash.slice(1));
const preview = document.getElementById("preview");
preview.innerHTML = value;
The preview element is a div. A tester confirms that a crafted fragment creates an image element with an executable event handler, even though the fragment never appears in the captured HTTP request. Which replacement for the final line preserves the required display behavior while removing this injection path?
Show answer & explanation
Correct answer: B - preview.textContent = value;
Question 2
A preferences endpoint changes the signed-in user's notification address through GET /preferences/email?value=alerts%40example.test. It accepts the session cookie without checking a CSRF token, Origin, or Referer. The cookie explicitly has SameSite=Lax; Secure; HttpOnly. On an unrelated HTTPS site, a tester places a link to that endpoint. The signed-in test user clicks it, causing a top-level navigation in a browser that implements the stated SameSite policy.
What should the tester expect from this navigation?
Show answer & explanation
Correct answer: C - The address can change because Lax permits the session cookie on a cross-site top-level GET.
Domain 2: Reconnaissance and Mapping
Question 3
The owner assigns app.example.test and its hosting address to an HTTPS assessment. Several applications share that address. When the tester requests an IP-address URL and supplies only Host: app.example.test, the server presents a certificate for another hosted application. The owner confirms that a valid certificate for app.example.test is installed and selected by TLS server name.
How should the tester reach the intended application without weakening certificate verification?
Show answer & explanation
Correct answer: A - Connect to the assigned address using app.example.test for both TLS SNI and HTTP Host.
Domain 3: Web Application Authentication Attacks
Question 4
A payroll application requires both a password and a one-time code before any payroll data may be read. After accepting the password, it issues a session cookie and displays the code-entry screen. A direct GET to /api/payroll/export with that cookie returns the user's payroll file before any code is submitted. The same request without the cookie returns 401.
The development team can make one immediate change. Which change closes the demonstrated bypass?
Show answer & explanation
Correct answer: C - Require a server-verified MFA-complete state before the export endpoint releases data.
Domain 4: Web Application Configuration Testing
Question 5
A scanner labels an authenticated API response as confirmed cross-origin data theft after a replay in Burp Repeater returns private JSON with these headers:
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
An independent browser test from an untrusted origin sends the test account's cookie, as confirmed in the network trace, but JavaScript is denied access to the response because of CORS. No other response-reading path has been demonstrated.
What disposition is justified for the scanner's claim?
Show answer & explanation
Correct answer: B - Do not confirm data theft: a wildcard cannot authorize a credentialed browser response read.
Domain 5: Web Application Overview
Question 6
An API removes a draft when it receives DELETE /drafts/81. The first request returns 204; an identical second request returns 404. Audit records confirm that the draft remains absent and that repeating the request produces no additional business effect.
A reviewer argues that the different status codes make this operation non-idempotent. Which assessment follows HTTP method semantics?
Show answer & explanation
Correct answer: D - It is idempotent but not safe: the intended effect remains the same even when responses differ.
Domain 6: Web Application Session Management
Question 7
Two isolated browser profiles are used to examine an application's login flow. Before authentication, the tester obtains session identifier S1 and causes the second profile to use it through a session identifier accepted in a URL. The second profile then signs in to a designated test account. Without signing in, the first profile reuses S1 and receives that account's private page. All traffic used HTTPS, and no post-login cookie was copied between profiles.
Which explanation accounts for the complete sequence?
Show answer & explanation
Correct answer: A - Session fixation: an identifier known before login retained authenticated authority.
Domain 7: Web Application SQL Injection Attacks
Question 8
A shipment lookup uses a SQL database but returns only "Shipment exists" or "No shipment"; neither database rows nor SQL errors are included in its responses. The decoded batch parameter is inserted into an unquoted numeric WHERE condition. Repeated, interleaved tests with the same session produce:
28 -> Shipment exists
28 AND 9=9 -> Shipment exists
28 AND 9=8 -> No shipment
Caching and request filtering are disabled for the assessment, and all three inputs have comparable response times. How is information being exposed?
Show answer & explanation
Correct answer: D - Through a Boolean-based blind SQL injection oracle.
Question 9
A PostgreSQL-backed catalog executes this entire query, inserting the decoded item value at the indicated position:
SELECT product_id, label, price
FROM catalog
WHERE product_id = <item>
The three columns are integer, text, and numeric, respectively. The application renders the label from every returned row. No row has product_id = -1. The assessment permits a harmless text marker but does not require reading another table.
Which item value will make the response display the marker CANARY?
Show answer & explanation
Correct answer: A - -1 UNION SELECT NULL, 'CANARY', NULL
Domain 8: Web Application Testing Tools
Question 10
An approved production scan is running below its request-rate limit when checkout begins returning 503 responses. Operations confirms that customer checkouts are failing and that the failures started with the scan. The engagement requires suspension of active testing when service degradation is observed; production recovery changes belong to the operations team. The scanner still has requests queued.
What is the tester's immediate responsibility?
Show answer & explanation
Correct answer: B - Stop active traffic, prevent queued probes from running, preserve evidence, and notify the incident contact.
That's 10 of 1,030
The full bank has 1,020 more GWAPT questions with explanations.