Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 4 out of 57 pages
Exam (elaborations)

GIAC WEB APPLICATION DEFENDER (GWEB) EXAM WITH QUESTIONS AND VERIFIED ANSWERS, PLUS DETAILED RATIONALES/EXPERT VERIFIED FOR GUARANTEED PASS 2026/LATEST UPDATE/INSTANT DOWNLOAD PDF

Document preview thumbnail
Preview 4 out of 57 pages

GIAC WEB APPLICATION DEFENDER (GWEB) EXAM WITH QUESTIONS AND VERIFIED ANSWERS, PLUS DETAILED RATIONALES/EXPERT VERIFIED FOR GUARANTEED PASS 2026/LATEST UPDATE/INSTANT DOWNLOAD PDF GIAC WEB APPLICATION DEFENDER (GWEB) EXAM WITH QUESTIONS AND VERIFIED ANSWERS, PLUS DETAILED RATIONALES/EXPERT VERIFIED FOR GUARANTEED PASS 2026/LATEST UPDATE/INSTANT DOWNLOAD PDF

Content preview

GIAC WEB APPLICATION DEFENDER
(GWEB) EXAM WITH QUESTIONS AND
VERIFIED ANSWERS, PLUS DETAILED
RATIONALES/EXPERT VERIFIED FOR
GUARANTEED PASS 2026/LATEST
UPDATE/INSTANT DOWNLOAD PDF
1.
A web application receives a user_id parameter and uses it to retrieve an
account record. The developer validates that the parameter contains only
digits before converting it to an integer. Which security property is
MOST directly provided by this validation?
A. It guarantees that the authenticated user owns the requested account.
B. It reduces the possibility of injecting arbitrary SQL syntax through
that parameter.
C. It prevents session fixation.
D. It guarantees confidentiality of the returned account data.
Answer: B
Rationale: Numeric allowlisting constrains the input to an expected
representation and therefore makes SQL metacharacters and arbitrary
SQL syntax much harder to introduce through that parameter.
However, input validation alone does not establish authorization; an
attacker could potentially request another valid numeric account ID.
Authorization must separately determine whether the authenticated
principal is permitted to access that account.


2.
A developer constructs a database query as follows:

1

,SELECT * FROM users WHERE username = 'INPUT' AND password
= 'INPUT'
The application attempts to defend against SQL injection by removing
strings such as OR, UNION, and -- from user input. Why is this defense
fundamentally weak?
A. SQL injection can only occur through HTTP headers.
B. Attackers can often bypass blacklists through alternate syntax,
encoding, case variations, or unexpected database behavior.
C. SQL databases automatically ignore malicious characters.
D. Blacklists prevent SQL injection only when HTTPS is disabled.
Answer: B
Rationale: Blacklist filtering attempts to identify known malicious
patterns rather than enforcing what the application actually expects.
Attackers can frequently exploit alternate representations, database-
specific syntax, encoding transformations, or application parsing
differences. Parameterized queries are substantially stronger because
data is structurally separated from SQL code.


3.
An application uses a prepared statement:
SELECT * FROM accounts WHERE account_id = ?
and binds the user-supplied account ID as a parameter. What is the
PRIMARY security advantage?
A. The database cannot execute SELECT statements.
B. User input is treated as data rather than being interpreted as part of
the SQL statement structure.
C. The application automatically encrypts the database.
D. The application automatically verifies authorization.

2

,Answer: B
Rationale: Parameterized queries establish a separation between SQL
instructions and parameter data. Even if an attacker supplies SQL
metacharacters, the database driver treats the parameter as a value
rather than modifying the intended SQL syntax. Prepared statements
do not, by themselves, solve authorization, authentication, or every
possible SQL-related design problem.


4.
A web application displays a user's profile name directly inside an
HTML page without context-appropriate output encoding. An attacker
stores a malicious script in the profile name, and the script executes
whenever another user views the profile. What vulnerability is MOST
accurately described?
A. Stored XSS
B. Reflected XSS
C. CSRF
D. SQL injection
Answer: A
Rationale: Stored cross-site scripting occurs when attacker-controlled
content is persisted by the application and later delivered to victims.
Reflected XSS generally involves malicious input being reflected
immediately in a response without persistent storage. The critical
defensive control is context-appropriate output encoding, combined
with safe handling and validation of input.


5.
A search page accepts a q parameter and returns:

3

, Search results for: <user input>
The input is immediately reflected in the HTTP response and is not
stored server-side. An attacker crafts a URL that causes JavaScript to
execute when a victim visits it. What type of XSS is this?
A. Stored XSS
B. Reflected XSS
C. DOM-only SQL injection
D. Persistent CSRF
Answer: B
Rationale: The malicious input is reflected directly from the request
into the response rather than being persistently stored. This is the
classic reflected-XSS pattern. Proper context-aware output encoding is
a primary defense, while input validation and Content Security Policy
can provide additional layers.


6.
Which control is generally the MOST appropriate primary defense when
displaying untrusted text inside an HTML element?
A. HTML-context output encoding
B. Base64 encoding
C. MD5 hashing
D. IP address filtering
Answer: A
Rationale: Output encoding converts characters with special meaning
in the relevant output context into safe representations. The encoding
method must match the context—for example, HTML, HTML
attribute, JavaScript, CSS, or URL contexts have different escaping


4

Document information

Uploaded on
August 28, 2026
Number of pages
57
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$24.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
profwhite
4.3
(20)
Sold
120
Followers
76
Items
4660
Last sold
1 day ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions