Courseiva

CCNA Web Application Incidents Questions

49 questions · Web Application Incidents topic · All types, answers revealed

1
Multi-Selectmedium

Which THREE factors should be considered when tuning a WAF to reduce false positives for an application?

Select 3 answers
A.The number of users accessing the site
B.The specific needs and expected input patterns of the application
C.The geographic location of the servers
D.The impact of the proposed exception on the overall security posture
E.The frequency and type of false positives being logged
AnswersB, D, E

Tuning rules to match the application's legitimate input patterns — expected parameter formats, field lengths and character sets — lets the WAF distinguish genuine traffic from attacks, so benign requests are not blocked. This directly reduces false positives while preserving detection of genuine malicious payloads.

Why this answer

Option B is correct because effective WAF tuning must start from the application's own expected input patterns—legitimate parameter formats, file types, URL structures, and payload sizes—so that rules can be scoped to what the app actually receives rather than blocking benign traffic. Option D is correct because every exception or rule relaxation weakens protection, so the security team must weigh the reduced false-positive rate against the risk of allowing real attacks such as SQL injection or XSS through the newly opened gap. Option E is correct because tuning should be driven by the actual false-positive telemetry in the WAF logs—which rules fire, how often, and on which endpoints—so that high-noise rules are identified and adjusted based on evidence rather than guesswork.

Option A is not a tuning factor because user volume affects capacity and rate-limiting decisions, not the accuracy of WAF rule matching, and Option C is irrelevant because server geography has no bearing on whether a request is a legitimate application input or a malicious payload.

Exam trap

The trap here is assuming that infrastructure or traffic volume factors (like number of users or server location) influence WAF tuning, when in fact tuning is driven by application-specific input analysis and security trade-offs.

2
MCQhard

During an incident involving a web application, you discover that an attacker has uploaded a web shell to the server. You need to determine how the attacker uploaded the file. Which log source would provide the MOST relevant information about the upload mechanism?

A.Database logs showing INSERT statements into a files table.
B.Web server access logs showing POST requests to file upload endpoints.
C.Firewall logs showing outbound connections from the web server.
D.Operating system logs showing file creation events in the web root.
AnswerB

Web server access logs capture the HTTP method and URL of requests. A POST request to a file upload endpoint is the primary way files are uploaded. By examining these logs, you can identify the timestamp, source IP, and target endpoint used for the upload. This directly addresses how the web shell was placed on the server.

Why this answer

Web server access logs are the most direct source for identifying file upload attempts. They record the HTTP method, URL, and source IP of requests. By searching for POST requests to known upload endpoints around the time the web shell was created, you can pinpoint the upload mechanism and the attacker's IP.

Other logs may provide supporting context but are less specific.

Exam trap

The trap here is focusing on file creation events in OS logs, which show when but not how the file was uploaded, missing the HTTP request details in web server logs.

3
MCQhard

Which log file should you examine if you suspect an attacker is modifying the web server configuration files?

A.Audit logs (e.g., /var/log/audit/audit.log)
B.Application error logs
C.Web server status logs
D.Access logs
AnswerA

Audit logs record file access and modification events via the kernel audit subsystem, capturing writes to web server configuration paths such as httpd.conf or nginx.conf. This directly satisfies the scenario's need to identify who altered configuration files, since standard access logs only record HTTP requests, not filesystem changes.

Why this answer

Audit logs (e.g., /var/log/audit/audit.log) are the correct source because they capture system-level events including file modifications, permission changes, and access to critical configuration files via the Linux Audit subsystem. When an attacker tampers with web server configuration files such as httpd.conf or nginx.conf, the audit daemon (auditd) records the write, rename, or attribute-change syscalls against those file paths. This makes audit logs the authoritative record for detecting configuration tampering, unlike application-layer logs that only reflect the web server's own runtime behavior.

Exam trap

The trap here is confusing application-layer logs (access, error, status) with host-level audit logs — candidates assume the web server's own logs would show configuration changes, but only OS-level auditing captures filesystem writes.

How to eliminate wrong answers

Option B is wrong because application error logs only record runtime errors, exceptions, and stack traces produced by the web application itself — they do not track filesystem writes to configuration files. Option C is wrong because web server status logs (e.g., Apache mod_status or nginx stub_status) report request throughput, worker state, and connection counts, not file integrity events. Option D is wrong because access logs record HTTP requests (client IP, method, URI, status code) and have no visibility into local file modifications on the server.

4
MCQmedium

During an incident involving a compromised web application, you review an Apache access.log entry that shows a request for /admin/config.php with a response code of 200, but the request originated from an external IP address never seen before. The application is configured to require authentication for that path. Which incident response action is MOST appropriate to determine the scope of the compromise?

A.Correlate the external IP with authentication logs to verify whether a valid session or credential was used.
B.Immediately block the external IP at the firewall and consider the incident contained.
C.Review the web server error logs for any 500 errors that occurred around the same time.
D.Check the file integrity of config.php to see if it was modified recently.
AnswerA

Correlating the external IP with authentication logs determines whether the request was authenticated, which is critical to understanding if credentials were compromised or if an authentication bypass occurred. This directly establishes the scope and method of the compromise, guiding containment and remediation. Without this correlation, you cannot distinguish between a legitimate user and an attacker exploiting a vulnerability.

Why this answer

The key to scoping this incident is determining whether the external request to a protected path was authenticated. Correlating the source IP with authentication logs reveals if a valid session or credential was used, which indicates whether credentials were compromised or an authentication bypass occurred. This directly informs containment and remediation efforts.

Exam trap

The trap here is assuming that a 200 response to a protected resource always means the attacker bypassed authentication, when it could also indicate stolen credentials or a misconfigured access control.

5
MCQeasy

A web application incident has been confirmed, and the responder needs to determine whether the attacker accessed sensitive customer records through a vulnerable API endpoint. Which log source should be examined first to identify the specific API calls and parameters used?

A.The web server access log containing request method, URI, status code, and user agent.
B.The database server error log capturing failed queries and connection issues.
C.The application server log that records API request payloads and response sizes.
D.The operating system authentication log recording successful and failed logins.
AnswerC

Application-level logs that capture request payloads and response metadata provide the detail needed to identify which API calls were made, what parameters were supplied, and how much data was returned. This directly supports determining whether sensitive records were accessed and which ones.

Why this answer

To determine whether specific customer records were accessed through an API, the responder needs application-level logs that capture request payloads and response details. These logs show the parameters and the volume of data returned, which allows correlation with database records. Web server access logs, database error logs, and OS authentication logs lack the necessary application context.

Exam trap

The trap here is assuming that web server access logs contain request bodies and parameters, when they typically record only method, URI, status, and user agent.

6
MCQhard

A web application is experiencing an incident where attackers are injecting malicious JavaScript into stored user comments. The application reflects the input without proper sanitization. Which mitigation technique, when implemented correctly, is most effective at preventing this type of attack from executing in victims' browsers?

A.Web Application Firewall (WAF) signature blocking
B.Input validation using a allowlist of permitted characters
C.Context-aware output encoding
D.Setting the HttpOnly flag on session cookies
AnswerC

Context-aware output encoding ensures that user-supplied data is treated as text, not code, when inserted into HTML, JavaScript, or other contexts. It neutralizes malicious scripts by converting special characters to their safe HTML entities. This is the primary defense against XSS because it prevents the browser from interpreting injected content as executable, regardless of where the data is reflected or stored.

Why this answer

Context-aware output encoding is the most effective mitigation for XSS because it ensures that any user input is rendered as inert text in the appropriate context (HTML, attribute, JavaScript, etc.). This prevents the browser from executing injected scripts. While input validation and WAFs add layers of defense, they are not foolproof and do not address the root cause.

HttpOnly protects cookies but not the XSS execution itself.

Exam trap

The trap here is confusing XSS mitigation with session protection; HttpOnly is often mistakenly believed to prevent XSS, but it only protects cookies from being stolen, not the execution of malicious scripts.

7
Multi-Selectmedium

Which THREE components are typically involved in a web application's logging infrastructure that an incident responder should audit?

Select 3 answers
A.Web server access and error logs
B.WAF audit logs
C.Printer spooler logs
D.Application-level audit logs
E.Hardware router logs
AnswersA, B, D

Web server access and error logs record inbound requests, response codes and server-side faults, forming the primary evidence source for reconstructing an attack against a web application. Auditing them satisfies the requirement to examine the components handling client traffic directly.

Why this answer

Option A (Web server access and error logs) is correct because these logs record every HTTP request, response code, source IP, and server-side errors, which are essential for reconstructing how an attacker interacted with the web application. Option B (WAF audit logs) is correct because a Web Application Firewall logs blocked, allowed, and flagged requests, revealing attempted exploits such as SQL injection or XSS that may not appear in normal server logs. Option D (Application-level audit logs) is correct because they capture business-logic events like authentication, authorization changes, and user actions, providing the internal context that infrastructure logs lack.

Option C (Printer spooler logs) is not relevant since print services are unrelated to web application request handling or attack surfaces. Option E (Hardware router logs) is not part of the web application's logging infrastructure, as routers operate at the network layer and do not record application-level activity.

Exam trap

212-89 often tests whether candidates include irrelevant infrastructure logs (printer, router) instead of the three web-application-specific log sources.

8
MCQmedium

During a web application incident, an analyst observes that an attacker is injecting malicious JavaScript into a comment field that is stored and later displayed to other users. Which type of web application incident is this?

A.Reflected cross-site scripting (XSS)
B.Cross-site request forgery (CSRF)
C.SQL injection
D.Stored cross-site scripting (XSS)
AnswerD

Stored XSS occurs when user input containing malicious script is persistently stored by the application (e.g., in a database, comment field, or log) and later rendered to other users without proper sanitization. The scenario describes exactly this: a comment field that stores the script and displays it to others, making it a persistent threat.

Why this answer

Stored XSS is identified when malicious script is saved by the application and later served to other users. The comment field acts as a persistent storage point, and the script executes in the browsers of anyone viewing the comment. This differs from reflected XSS, which is non-persistent, and from other injection types that target different components.

Exam trap

The trap here is confusing stored XSS with reflected XSS because both involve script injection, but the key differentiator is persistence in the application's data store.

9
MCQeasy

A web application is suspected of being compromised through a file inclusion vulnerability. The attacker has uploaded a web shell to the server. Which type of log should you examine to find evidence of the web shell being accessed and executed?

A.Application server error logs
B.Operating system authentication logs
C.Database audit logs
D.Web server access logs
AnswerD

Web server access logs record all HTTP requests, including the URLs and parameters requested. When a web shell is accessed, the request to the shell's file (e.g., shell.php) will appear in these logs, often with unusual parameters or POST data. Analyzing access logs can reveal the attacker's IP, the time of access, and the commands executed via the shell, making it the primary source for detecting web shell activity.

Why this answer

Web server access logs are the most direct evidence of web shell access because they log every HTTP request, including the URL of the shell and any parameters passed. By examining these logs, you can identify the attacker's IP, the timeline of access, and potentially the commands executed. Other logs may provide supporting information but do not capture the web shell execution itself.

Exam trap

The trap here is thinking that OS authentication logs would show web shell activity, but web shells typically run under the web server's context without creating OS-level login events.

10
MCQeasy

A web application is experiencing a denial-of-service attack characterized by a flood of HTTP requests from a large number of distributed IP addresses. Which type of attack is this most likely to be?

A.SQL Injection
B.Cross-Site Scripting (XSS)
C.Cross-Site Request Forgery (CSRF)
D.Distributed Denial-of-Service (DDoS)
AnswerD

A DDoS attack uses multiple compromised systems to flood a target with traffic, overwhelming its resources. The scenario describes requests from many distributed IP addresses, which is the hallmark of a DDoS attack. This makes it difficult to mitigate by blocking a single source.

Why this answer

A Distributed Denial-of-Service (DDoS) attack floods a target with traffic from multiple sources, overwhelming its resources and causing service disruption. The scenario describes a flood of HTTP requests from many distributed IP addresses, which is the classic signature of a DDoS attack. Other attack types like SQL injection, XSS, or CSRF do not involve volumetric flooding.

Exam trap

The trap here is confusing a DoS attack with other web application attacks like SQL injection or XSS, but the key indicator is the flood of requests from many IP addresses.

11
MCQeasy

What is the primary function of a Web Application Firewall (WAF) in an incident response scenario?

A.Storing database backups
B.Blocking known malicious patterns at the application layer
C.Encrypting all web traffic
D.Providing user authentication services
AnswerB

A WAF inspects HTTP traffic and blocks requests matching known attack signatures, such as SQL injection or cross-site scripting payloads, at the application layer. This containment capability limits exploitation during an incident, complementing network-layer controls.

Why this answer

A WAF inspects HTTP/HTTPS traffic at the application layer (Layer 7) and blocks requests matching known malicious patterns such as SQLi, XSS, and command injection signatures. In incident response, it serves as a containment control that can immediately block ongoing attack traffic while the team investigates. This makes it a key tool for rapid mitigation.

Exam trap

The trap is confusing WAF functions with TLS encryption or authentication; candidates must remember the WAF's core role is Layer 7 pattern inspection and blocking, not transport security or identity.

How to eliminate wrong answers

Option A is wrong because storing database backups is a data-protection function, not a WAF capability. Option C is wrong because encrypting web traffic is handled by TLS termination (load balancer, reverse proxy), not by a WAF, though WAFs can inspect decrypted traffic. Option D is wrong because user authentication is provided by identity systems (IAM, SSO, MFA), not by a WAF, although some WAFs offer bot or session controls.

12
MCQhard

An incident responder suspects a server-side request forgery (SSRF) incident against an internal web application that fetches remote images by URL. The application runs in a cloud VPC and can reach the instance metadata service. Which immediate containment action BEST reduces the risk of credential theft while preserving evidence?

A.Enable verbose debug logging on the web application and wait for the next SSRF attempt
B.Immediately terminate the application instances and rebuild them from the base image
C.Rotate the TLS certificate used by the web application's public endpoint
D.Block outbound access from the application subnet to the instance metadata IP address 169.254.169.254 and capture the application's outbound traffic
AnswerD

SSRF against a cloud workload commonly targets the link-local metadata address to steal instance role credentials. Blocking that specific destination at the subnet or host firewall stops credential retrieval while the application remains available for investigation. Simultaneously capturing outbound traffic preserves the attacker's request patterns, source parameters, and timing, which supports scoping without destroying forensic artifacts.

Why this answer

Server-side request forgery that reaches the cloud instance metadata service can yield temporary credentials for the workload's IAM role. The most effective immediate containment is to deny the application's outbound access to the link-local metadata address while capturing traffic for analysis. This stops credential theft without destroying the instance, preserving memory, connections, and logs that are needed to determine whether any credentials were already used.

Exam trap

The trap here is treating instance termination as safe containment, when it destroys volatile evidence and may leave stolen credentials usable elsewhere.

13
MCQhard

A web application is experiencing an incident where an attacker is manipulating HTTP headers to bypass IP-based access controls. The attacker sets the X-Forwarded-For header to a trusted internal IP address. Which mitigation should an incident handler recommend to prevent this bypass?

A.Disable the use of X-Forwarded-For entirely and rely on the source IP address of the TCP connection.
B.Implement a Web Application Firewall (WAF) rule to block all requests containing an X-Forwarded-For header.
C.Encrypt the X-Forwarded-For header using TLS to prevent tampering.
D.Configure the web server to trust the X-Forwarded-For header only from known proxy servers.
AnswerD

When a web server sits behind a reverse proxy, it should only accept the X-Forwarded-For header from that proxy. If the server trusts the header from any source, attackers can spoof it to bypass IP-based restrictions. Restricting trust to known proxies ensures that the header is validated and cannot be manipulated by external clients.

Why this answer

The vulnerability arises because the web server trusts the X-Forwarded-For header from any source, allowing attackers to spoof it. The proper mitigation is to configure the server to accept this header only from known, trusted proxy servers. This ensures that the header is set by a legitimate intermediary and cannot be manipulated by external clients to bypass IP-based controls.

Exam trap

The trap here is assuming that encrypting the header or blocking it entirely solves the problem, when the real issue is improper trust configuration.

14
Multi-Selectmedium

You are handling a web defacement incident on an internet-facing content management system. The page content was altered, and the attacker likely used a compromised administrative account. Which TWO artifacts should you collect FIRST to establish an accurate timeline and preserve evidence? (Choose two.)

Select 2 answers
A.The public TLS certificate chain presented by the web server
B.A forensic copy of the deployed web application files and their file system timestamps
C.A screenshot of the defaced page taken from the responder's workstation
D.The marketing team's content calendar for the affected site
E.The web server access and error logs covering the period before and after the defacement
AnswersB, E

Modified application files, templates, or uploaded webshells contain the attacker's changes and carry modification timestamps that place the defacement in time. A forensic copy preserves the exact content, permissions, and metadata for comparison against a known-good baseline. This evidence is essential to identify the persistence mechanism and to determine the full scope of altered pages.

Why this answer

Defacement investigations hinge on linking an observed content change to the requests and files that produced it. Web server access and error logs provide the request timeline and source of the administrative actions, while a forensic copy of the application files preserves the modified content, webshells, and file timestamps. Together they establish when the change occurred, how it was made, and what persistence remains, which are prerequisites for scoping and remediation.

Exam trap

The trap here is choosing visually compelling artifacts like screenshots or business records over the volatile server logs and file metadata that actually prove how and when the defacement occurred.

15
MCQeasy

An analyst is investigating a suspected SQL injection attack on an IIS server. Which log file should they prioritize to identify the specific URL-encoded payload strings submitted by the attacker?

A.Application Event logs
B.HTTPERR logs
C.Security Event logs
D.W3C Extended Log File Format logs
AnswerD

W3C Extended logs record the full query string of each HTTP request, including URL-encoded characters, so injected payloads such as %27 or %20 appear verbatim. IIS access logs therefore expose the attacker's submitted strings, unlike error or event logs.

Why this answer

IIS W3C Extended Log File Format logs record the full request URI, including query strings, in the cs-uri-stem and cs-uri-query fields. SQL injection payloads submitted via GET or POST URLs appear URL-encoded here, making this the primary source for identifying the exact attack strings. Analysts parse these logs to extract payloads like %27%20OR%201%3D1.

Exam trap

The trap is assuming Security or Application Event logs capture web attack payloads; only the W3C HTTP request logs contain the URI and query string where SQLi payloads live.

How to eliminate wrong answers

Option A is wrong because Application Event logs capture application-level errors and .NET exceptions, not raw HTTP request URIs. Option B is wrong because HTTPERR logs record connection-level errors (timeouts, 400/503 drops) and do not contain full query strings. Option C is wrong because Security Event logs record authentication and authorization events (logon, privilege use), not HTTP payloads.

16
MCQeasy

An incident responder is investigating a web application breach and needs to determine the exact time an attacker uploaded a web shell. Which log source would most directly provide this information?

A.Database audit logs
B.Operating system security event logs
C.Web server access logs
D.Firewall logs
AnswerC

Web server access logs record every HTTP request, including POST requests used to upload files. They contain timestamps, source IPs, and request URIs. By examining these logs, an incident responder can pinpoint the exact time a web shell was uploaded, typically via a POST to a vulnerable upload script. This is the most direct source for this information.

Why this answer

Web server access logs are the most direct source because they capture the HTTP request that performed the upload, including the timestamp, source IP, and target URI. Other logs may provide supporting context but lack the specific detail needed to pinpoint the upload event. This makes access logs the primary resource for determining when a web shell was placed.

Exam trap

The trap here is assuming that operating system or database logs would capture the upload event, but only web server logs record the HTTP request details.

17
MCQeasy

A web server log shows repeated '403 Forbidden' errors for a specific directory. What is the most likely cause during an incident?

A.The user session has expired
B.The requested file does not exist
C.The server is offline
D.Directory traversal or unauthorized access attempts are being blocked
AnswerD

A 403 means the server understood the request but refused authorisation, so the directory exists yet access is denied. Repeated hits indicate traversal or unauthorised access attempts being blocked, rather than a missing file or server fault.

Why this answer

Repeated 403 errors often indicate an attacker performing forced browsing or directory traversal attempts that are being blocked by server-side permission settings.

18
MCQhard

A web application's logs indicate an attacker successfully performed an XML External Entity (XXE) injection. What was likely the source of this vulnerability?

A.Lack of CSRF tokens in POST requests
B.SQL injection in a login form
C.Insecure configuration of the XML parser
D.Missing input sanitization in a search field
AnswerC

XXE injection exploits an XML parser that resolves external entities, typically because entity resolution or DTD processing is left enabled. The flaw is insecure parser configuration, not the XML syntax itself, so hardening the parser disables the attack.

Why this answer

XXE injection occurs when an application parses XML input with a parser that has external entity resolution enabled. This allows an attacker to define custom entities that reference external resources (e.g., local files or remote URLs), leading to data disclosure, SSRF, or denial of service. The root cause is an insecure configuration of the XML parser, such as not disabling DTDs or external entities.

Therefore, option C correctly identifies the source of the vulnerability.

Exam trap

The trap here is confusing XXE with other injection vulnerabilities like SQL injection or CSRF, or assuming that input sanitization alone fixes XXE, when the core issue is the XML parser's configuration.

How to eliminate wrong answers

Option A is wrong because lack of CSRF tokens leads to Cross-Site Request Forgery, not XXE; CSRF is about forcing authenticated users to perform unintended actions, while XXE exploits XML parsing. Option B is wrong because SQL injection in a login form is a different vulnerability class that targets database queries, not XML parsing. Option D is wrong because missing input sanitization in a search field might lead to XSS or other injection flaws, but XXE specifically requires an XML parser that resolves external entities; sanitizing input alone does not address the parser configuration issue.

19
MCQmedium

During a Cross-Site Scripting (XSS) incident, you notice the WAF is blocking legitimate user sessions. What is the most effective tuning step to prevent false positives while maintaining protection?

A.Disable the entire XSS protection rule set
B.Implement a negative security model
C.Create a granular exclusion for the specific parameter triggering the alert
D.Switch the WAF from Blocking mode to Transparent mode
AnswerC

A granular exclusion targets only the specific parameter producing false positives, so legitimate sessions pass while the WAF continues inspecting all other traffic. This preserves protection rather than disabling the rule wholesale, satisfying the stem's dual requirement.

Why this answer

Creating a targeted exception for a specific URI or parameter prevents over-blocking while keeping the signature active for the rest of the application.

20
Multi-Selectmedium

Which THREE actions are essential when performing log review after a web application attack?

Select 3 answers
A.Delete all log entries older than 24 hours to save space
B.Correlate logs from the web server, WAF, and backend database
C.Only review logs from the last hour of the incident
D.Ensure log files have not been tampered with using checksums
E.Search logs for known attack signatures like common injection patterns
AnswersB, D, E

Attacks span tiers, so a payload visible in the WAF may appear only as anomalous queries in the database. Correlating web server, WAF and backend database logs by timestamp and request ID reconstructs the full kill chain, satisfying the need to establish what actually occurred rather than reviewing each source in isolation.

Why this answer

Option B is correct because correlating logs from the web server, WAF, and backend database provides a complete timeline of the attack, linking the initial HTTP request, the WAF's detection or bypass, and any resulting database queries or errors. Option D is correct because verifying log integrity with checksums (e.g., SHA-256 hashes) ensures that attackers have not altered or deleted evidence, which is critical for a trustworthy forensic review. Option E is correct because searching logs for known attack signatures such as SQL injection patterns (e.g., ' OR 1=1--), cross-site scripting payloads, or path traversal sequences helps identify the specific exploitation attempts and affected endpoints.

Option A is incorrect because deleting logs destroys evidence and violates retention requirements; logs should be preserved and archived, not purged. Option C is incorrect because limiting review to only the last hour of the incident misses the initial reconnaissance, exploitation, and persistence phases, which may have occurred earlier.

Exam trap

The trap here is assuming that reviewing only recent logs or deleting old logs is acceptable for efficiency, but forensic best practices require comprehensive and tamper-evident log review.

21
MCQmedium

During an investigation of a compromised e-commerce web application, you observe that the attacker sent a single HTTP request containing a serialized object in the 'cart' cookie. The application deserialized the data and subsequently spawned a shell process on the server. Which web application vulnerability was exploited?

A.Server-Side Request Forgery (SSRF)
B.Cross-Site Scripting (XSS)
C.XML External Entity (XXE) Injection
D.Insecure Deserialization
AnswerD

Insecure deserialization occurs when untrusted data is used to abuse the logic of an application, inflict a denial-of-service attack, or execute arbitrary code. Here, the serialized object in a cookie was deserialized, leading to remote code execution (spawning a shell), which is a classic indicator of this vulnerability.

Why this answer

The attacker exploited insecure deserialization by sending a malicious serialized object in a cookie. When the application deserialized it, the payload executed arbitrary code, spawning a shell. This is a direct indicator of insecure deserialization, often leading to remote code execution.

Other vulnerabilities like XXE, XSS, or SSRF do not match the observed behavior of deserialization leading to shell execution.

Exam trap

The trap here is assuming that any cookie-based attack is session hijacking or XSS, overlooking that serialized objects in cookies can lead to server-side code execution via insecure deserialization.

22
Multi-Selecthard

You are investigating a cross-site scripting incident on a customer-facing web application. The attacker injected a persistent payload that executes in the browsers of users viewing a product review page. Which TWO actions should you take to contain the incident and protect users while preserving evidence? (Choose two.)

Select 2 answers
A.Immediately delete the malicious review from the database to stop the payload from executing.
B.Capture the malicious review content and associated database records before removing or sanitizing them.
C.Apply output encoding to the review display page and review other user-generated content fields for similar issues.
D.Block all inbound HTTP requests containing angle brackets at the perimeter firewall.
E.Disable the entire web application until the development team rewrites the review module.
AnswersB, C

Preserving the stored payload and its database context is essential for understanding the injection point, identifying the affected records, and supporting later analysis or legal action. Removing the content first would destroy evidence of how the attacker bypassed input validation and what other data may have been tampered with.

Why this answer

Containment of a stored XSS incident requires preserving the malicious content as evidence while preventing it from executing in users' browsers. Capturing the database records and applying output encoding on the affected page achieves both goals and allows the team to check other user-generated content fields for similar flaws. Deleting the content, shutting down the application, or applying crude perimeter filters either destroys evidence or provides ineffective protection.

Exam trap

The trap here is treating deletion of the malicious content as containment, when it actually destroys the evidence needed to find the injection point and identify other affected records.

23
Multi-Selectmedium

A web application is experiencing a suspected cross-site scripting (XSS) incident. You are reviewing web server and application logs to identify the attack. Which TWO log sources are MOST likely to contain evidence of the XSS payload being submitted and executed? (Choose two.)

Select 2 answers
A.Application logs that record user input validation failures or sanitization events.
B.Web server access logs showing the malicious script in the request URI or POST body.
C.Firewall logs showing outbound connections to the attacker's command-and-control server.
D.Database logs showing SQL queries executed with the XSS payload.
E.Operating system audit logs showing process creation events for the web server user.
AnswersA, B

Application logs often record when input fails validation or when suspicious characters are detected. If the application has input sanitization or a web application firewall (WAF) in logging mode, it may log the XSS attempt. These logs provide context about whether the payload was blocked or allowed, and can help identify the specific parameter targeted.

Why this answer

XSS payloads are submitted as part of HTTP requests and may be recorded in web server access logs if the request method or logging configuration captures them. Application logs can also record input validation failures or sanitization events related to the payload. Together, these sources help identify the injection point and whether the attack was blocked.

Exam trap

The trap here is confusing XSS with SQL injection or other server-side attacks, leading to examination of database or OS logs instead of client-side request logs.

24
Multi-Selecthard

Which TWO pieces of information must be collected to successfully track a session hijacking attack across multiple log sources?

Select 2 answers
A.The BIOS version of the server
B.The session ID/cookie value
C.The web server's MAC address
D.The server's physical location
E.The exact timestamp of the requests
AnswersB, E

The session ID or cookie value is the unique token identifying a user's authenticated session. Correlating this value across web server, proxy and application logs lets analysts follow the attacker's requests after the token is stolen, satisfying the requirement to track the hijacked session across multiple sources.

Why this answer

To track a session hijacking attack across multiple log sources, you must be able to correlate the attacker's activity with the victim's session, which requires the session ID/cookie value (option B) because that token uniquely identifies the HTTP session and appears in web server, proxy, and application logs. You also need the exact timestamp of the requests (option E) so that events recorded in different logs (e.g., web server access logs, firewall logs, IDS/IPS alerts) can be aligned chronologically to reconstruct the attack sequence. The BIOS version of the server (option A) is irrelevant to session tracking because it does not identify user sessions or request timing.

The web server's MAC address (option C) is a layer-2 hardware identifier that does not appear in application-layer session logs and cannot correlate a hijacked session. The server's physical location (option D) is also irrelevant, as session hijacking is tracked through logical identifiers and timestamps, not geographic placement of hardware.

Exam trap

The trap here is confusing session tracking with server identification; candidates might think hardware details like MAC address or BIOS version are useful, but they are not logged per session and cannot correlate user activity across multiple logs.

25
MCQmedium

You are auditing Apache logs to detect potential OS command injection. Which characters should you search for in the access logs?

A.'%20', '+', and '='
B.'{', '}', and '$'
C.'<', '>', and '/'
D.';', '|', '&', and '`'
AnswerD

Shell metacharacters ';', '|', '&' and '`' allow command chaining, piping and substitution, so their appearance in Apache access logs signals attempted OS command injection. Searching for these satisfies the audit requirement to detect injection attempts against web-facing services.

Why this answer

OS command injection payloads use shell metacharacters to chain or execute additional commands: semicolon (;), pipe (|), ampersand (&), and backtick (`) are the classic separators and command substitution operators. Searching access logs for these characters reveals attempts to append commands like '; cat /etc/passwd' or '| whoami'.

Exam trap

The trap is confusing URL-encoding characters (%20, +, =) with shell metacharacters; only the latter are relevant to command injection detection.

How to eliminate wrong answers

Option A is wrong because %20 (space), +, and = are URL-encoding and query-string characters, not shell metacharacters. Option B is wrong because {, }, and $ are used in variable expansion and scripting but are not the primary command-chaining operators in shell injection. Option C is wrong because <, >, and / are redirection and path characters; while > can redirect output, the canonical injection separators are ;, |, &, and `.

26
MCQeasy

A developer reports that a specific user is receiving 500 Internal Server Errors. Where is the first place to look to determine if this is an incident?

A.Error logs
B.Firewall logs
C.DNS logs
D.Access logs
AnswerA

Error logs capture the server-side exception trace for each failed request, letting you correlate the affected user's 500 responses and identify whether a misconfiguration, bug or attack caused them. This is the first diagnostic step before classifying the event as a security incident.

Why this answer

Error logs on the web server or application record 500 Internal Server Error events with stack traces, exception messages, and timestamps, making them the first place to determine whether the error is a benign bug or a sign of an incident (e.g., injection, resource exhaustion).

Exam trap

212-89 often tests whether candidates choose access logs (which show the 500 status but not the cause) instead of error logs, which contain the actual exception details needed to triage the incident.

How to eliminate wrong answers

Option B is wrong because firewall logs show allowed/blocked network traffic, not application-level 500 errors. Option C is wrong because DNS logs show name resolution queries, which do not explain HTTP 500 responses. Option D is wrong because access logs show request metadata and status codes but not the underlying error cause; they complement but do not replace error logs.

27
MCQmedium

An attacker is using a specific User-Agent to scan your web application. How do you block them effectively?

A.Create a WAF rule to block requests with the specific User-Agent string
B.Disable all directory indexing on the server
C.Change the web server listening port
D.Update the server's hosts file
AnswerA

A WAF rule matching the offending User-Agent header drops those requests at the edge before they reach the application, directly satisfying the requirement to block the scanner. It is precise and low-cost, though the attacker could rotate the string, so pair it with rate-based rules.

Why this answer

A WAF rule that matches the specific User-Agent string and blocks matching requests is the most direct and effective control, because it targets the exact signature the attacker is using. WAFs like AWS WAF, Cloudflare, or ModSecurity can match on the User-Agent header via string-match or regex conditions and return a 403 before the request reaches the origin. This stops the scanner without affecting legitimate traffic that uses different User-Agents.

Exam trap

212-89 often tests the misconception that server-side hardening (directory indexing, port changes, hosts file) can block an active scanner, when only a request-inspection control like a WAF rule addresses the specific attack vector.

How to eliminate wrong answers

Option B is wrong because disabling directory indexing only prevents listing of directory contents — it does nothing to block a scanner that is probing known paths or sending malicious requests. Option C is wrong because changing the listening port is security through obscurity and does not stop an attacker who can port-scan or who already knows the new port. Option D is wrong because the hosts file is a local DNS resolution mechanism on the server and has no effect on inbound HTTP requests from external attackers.

28
MCQhard

A web application is vulnerable to session fixation. What is the primary indicator of this attack in the logs?

A.High volume of requests to the login page without POST data
B.The same session ID is associated with two different IP addresses within a short timeframe
C.A sudden spike in failed login attempts
D.A user session ID remains identical before and after a successful authentication event
AnswerD

Session fixation succeeds when the attacker plants a known session identifier and the victim's authentication does not regenerate it. An unchanged session ID across the login boundary therefore evidences the flaw; legitimate implementations issue a fresh identifier upon successful authentication.

Why this answer

Session fixation occurs when an attacker sets or knows a victim's session ID before authentication and the application fails to regenerate that ID after login. The primary log indicator is therefore a session ID that remains identical before and after a successful authentication event. This persistence of the pre-authentication session identifier is the defining signature of the vulnerability being exploited.

Exam trap

212-89 often tests the distinction between session fixation (ID unchanged across login) and session hijacking (same ID from different IPs) — candidates confuse the two because both involve session IDs.

How to eliminate wrong answers

Option A is wrong because a high volume of requests to the login page without POST data indicates probing or crawling, not session fixation. Option C is wrong because a spike in failed login attempts indicates brute-force or credential-stuffing activity, which is a different attack class. Option B is wrong because the same session ID used from two different IPs within a short timeframe indicates session hijacking or token theft, not fixation — in fixation the attacker plants the ID before the victim authenticates, so the IP pattern differs.

29
Multi-Selecthard

When responding to a SQL injection incident, which TWO areas of the database server logs should be prioritized for review?

Select 2 answers
A.Operating system kernel logs
B.Database backup completion logs
C.Database user activity/audit logs
D.Network interface statistics
E.Database query execution logs
AnswersC, E

Database user activity and audit logs record executed statements, timestamps, source accounts and client addresses, exposing the injected query and the compromised credentials. Reviewing them reconstructs which accounts ran anomalous SQL, satisfying the need to identify the injection vector and affected data during the SQL injection response.

Why this answer

Option C (database user activity/audit logs) is correct because audit logs record authentication events, privilege changes, and the specific accounts and source hosts involved in suspicious activity, which is essential for identifying who executed the injection and what they accessed. Option E (database query execution logs) is correct because they capture the actual SQL statements sent to the server, allowing responders to spot injected payloads such as UNION SELECT, OR 1=1, or stacked queries and to determine which tables or data were touched. Together these two log sources provide the attacker identity and the malicious query evidence needed for containment and forensic reconstruction.

Option A (OS kernel logs) is not prioritized because it deals with hardware, driver, and system-level events rather than SQL activity. Option B (backup completion logs) only shows whether backup jobs succeeded and has no bearing on detecting or tracing an injection. Option D (network interface statistics) provides traffic counters and throughput data, not the application-layer SQL content or user context required for this investigation.

Exam trap

The trap is confusing infrastructure-layer logs (kernel, network, backup) with application/database-layer logs — candidates must recognize that SQL injection evidence lives in database audit and query logs, not OS or network telemetry.

30
Multi-Selecthard

Which TWO log file attributes are essential for identifying the source of an attack coming through a load balancer?

Select 2 answers
A.Server uptime count
B.X-Forwarded-For header
C.Local time of the web server
D.The load balancer's internal management port
E.Original Request-URI
AnswersB, E

The X-Forwarded-For header preserves the originating client IP address, which the load balancer would otherwise mask by rewriting the source to its own address. This satisfies the stem's need to trace an attack's true source through the proxy layer.

Why this answer

The X-Forwarded-For header (B) is essential because a load balancer typically terminates the client connection and proxies the request, so the web server's own logs would only show the load balancer's IP; X-Forwarded-For preserves the original client IP address needed to trace the attack source. The Original Request-URI (E) is also essential because it records exactly which resource or path the attacker requested, allowing correlation of the malicious request across the load balancer and backend server logs. Server uptime count (A) is irrelevant to attack attribution, as it only indicates how long the server has been running.

Local time of the web server (C) is useful for correlating events but does not by itself identify the source of the attack. The load balancer's internal management port (D) is unrelated to client request tracing and would not reveal the attacker's origin.

31
Multi-Selectmedium

Which THREE indicators in a web access log suggest a directory traversal attempt?

Select 3 answers
A.Repeated access to sensitive files like 'passwd' or 'config.php'
B.URL parameters containing system file paths
C.Presence of '../' sequences
D.Requests for CSS files
E.High number of image file requests
AnswersA, B, C

Repeated requests for files such as 'passwd' or 'config.php' reveal an attacker probing outside the web root, satisfying the indicator of directory traversal. Traversal payloads commonly target these credential and configuration files, so their recurrence in a web access log signals deliberate path-escalation attempts rather than normal browsing.

Why this answer

Option A is correct because directory traversal attacks aim to reach files outside the web root, so repeated requests for sensitive files such as 'passwd' (e.g., /etc/passwd) or 'config.php' in the access log strongly indicate an attempt to read protected system or application files. Option B is correct because URL parameters containing system file paths (e.g., ?file=/etc/passwd or ?page=C:\Windows\win.ini) show an attacker trying to supply an absolute path to force the application to disclose a local file. Option C is correct because the '../' sequence (dot-dot-slash) is the canonical traversal payload used to climb out of the web directory, and its presence in a requested URL is a direct signature of path traversal.

Option D is not correct because requests for CSS files are normal static-resource traffic and do not by themselves indicate traversal. Option E is not correct because a high number of image file requests is typical of legitimate page rendering or caching and is not a traversal indicator.

Exam trap

The trap here is confusing normal web traffic (like CSS or image requests) with malicious indicators; candidates might overthink and select benign requests as suspicious, but directory traversal specifically involves path manipulation and sensitive file targeting.

32
MCQeasy

During a web application incident, you review logs and find requests containing the string 'UNION SELECT username, password FROM users' in the id parameter. The database server log shows the corresponding query executed successfully and returned rows. Which type of web application attack does this evidence confirm?

A.Cross-site scripting
B.Cross-site request forgery
C.SQL injection
D.Server-side request forgery
AnswerC

The request parameter contains SQL syntax that alters the intended query, and the database log confirms the injected UNION statement executed and returned data. This is the defining behavior of SQL injection, where untrusted input is concatenated into a query without proper parameterization. The evidence directly confirms successful exploitation and data retrieval from the users table.

Why this answer

The presence of SQL syntax in a user-supplied parameter, combined with a database log entry showing that injected statement executed and returned rows, confirms SQL injection. The attacker manipulated the query structure to append a UNION SELECT and retrieve credential data. This evidence supports immediate containment such as blocking the source, reviewing the vulnerable parameter, and assessing what data was exposed.

Exam trap

The trap here is focusing on the word 'users' and assuming a browser-side or session attack, when the database log proving an injected query executed is the decisive artifact.

33
MCQhard

During a web application incident, you discover that an attacker is exfiltrating data through HTTP responses by abusing a deserialization endpoint. The endpoint returns serialized objects that include base64-encoded fields. Which technique should you use to identify the exfiltrated data within captured network traffic?

A.Review outbound SMTP traffic for attachments sent from the web server to external addresses.
B.Inspect DNS query logs for unusually long TXT records originating from the web server.
C.Search the packet capture for HTTP 200 responses to the deserialization endpoint and decode the base64 fields in the response bodies.
D.Analyze ICMP packet payloads for embedded file fragments leaving the network.
AnswerC

The scenario states the exfiltration occurs through HTTP responses from the deserialization endpoint, and the payloads are base64-encoded. Filtering for successful responses to that endpoint isolates the relevant traffic, and decoding the base64 fields reveals the exfiltrated content. This directly follows the described attack channel and encoding.

Why this answer

When exfiltration is described as occurring through HTTP responses from a specific endpoint, the packet capture must be filtered to that endpoint and response direction. Because the payloads are base64-encoded, decoding the response bodies exposes the exfiltrated data. Other channels such as DNS, SMTP, or ICMP are unrelated to the described mechanism and would not contain the relevant evidence.

Exam trap

The trap here is gravitating toward covert channels like DNS or ICMP tunneling when the scenario explicitly describes application-layer exfiltration through HTTP responses with a specific encoding.

34
MCQmedium

While responding to a confirmed cross-site scripting (XSS) incident on a public web application, you need to determine whether the attacker exfiltrated session cookies. The application uses HTTPS and sets cookies without the HttpOnly flag. Which evidence source is MOST likely to reveal the stolen cookie values?

A.The TLS certificate transparency log for the web application's domain
B.Outbound proxy or firewall logs showing requests to an attacker-controlled domain with cookie data in the URL
C.The database transaction log for the users table
D.The web server's access log entries showing HTTP 200 responses to /login
AnswerB

Because the cookie lacks HttpOnly, injected JavaScript can read document.cookie and send it to an external collector, often as a query string or image request. Egress proxy or firewall logs capture the destination domain and full URL, so they can reveal the exfiltration channel and the encoded cookie value, which is the key evidence needed to confirm theft.

Why this answer

When an XSS payload reads a cookie that lacks the HttpOnly attribute and sends it to an external collector, the theft occurs over the network rather than in server-side application logs. Egress proxy or firewall logs capture the destination and full request URL, exposing the attacker-controlled endpoint and the encoded session token. This directly confirms exfiltration and supports containment actions such as blocking the collector domain and invalidating sessions.

Exam trap

The trap here is assuming the victim web server's own access log will contain the stolen cookie, when exfiltration actually travels outbound to an attacker-controlled collector.

35
Multi-Selectmedium

Which THREE items should be included in an incident report following a successful SQL injection attack?

Select 3 answers
A.A list of potentially affected data or databases
B.The personal name of the person who discovered the attack
C.The exact physical address of the data center
D.The specific attack vector and payload used
E.The remediation steps performed to close the vulnerability
AnswersA, D, E

Listing potentially affected data or databases satisfies the stem's requirement to document breach scope, enabling impact assessment and notification duties. An incident report must identify which records the SQL injection exposed, since containment and regulatory escalation depend on knowing the compromised data sets, not merely the attack vector.

Why this answer

Option A is correct because an incident report must scope the breach by identifying which data or databases may have been exposed, enabling impact assessment and notification obligations. Option D is correct because documenting the specific attack vector and payload (for example, the vulnerable parameter and injected SQL syntax) is essential for root-cause analysis and for reproducing and validating the fix. Option E is correct because recording the remediation steps performed to close the vulnerability provides an auditable record of containment and eradication and supports verification that the flaw no longer exists.

Option B does not belong because the discoverer's personal name is not a required technical or impact element of the report, and Option C does not belong because the data center's exact physical address is irrelevant to describing the SQL injection incident, its scope, or its remediation.

Exam trap

The trap here is that candidates might select options that seem relevant but are not core to an incident report, such as the discoverer's name or data center address, confusing peripheral details with essential technical and remediation documentation.

36
Multi-Selectmedium

A web application is under a distributed denial-of-service (DDoS) attack that is overwhelming the server with HTTP requests. As an incident handler, you need to identify the source of the attack and mitigate it. Which TWO log sources are most critical to analyze first to understand the attack pattern and its origin? (Choose two.)

Select 2 answers
A.Web server access logs
B.Application server error logs
C.Operating system event logs
D.Database server logs
E.Firewall logs
AnswersA, E

Web server access logs record every HTTP request, including the source IP, URL, user agent, and timestamp. During a DDoS attack, these logs reveal the volume, frequency, and patterns of requests, such as repeated requests to a single endpoint or from a specific IP range. Analyzing them helps identify the attack vectors and potentially the botnet's characteristics, enabling targeted mitigation.

Why this answer

Web server access logs and firewall logs are the most critical for analyzing a DDoS attack. Access logs provide detailed HTTP request data, including source IPs and request patterns, while firewall logs show network-level connection attempts and blocked traffic. Together, they help identify the attack's source and characteristics.

Other logs, such as database or OS logs, may show symptoms but not the direct attack traffic.

Exam trap

The trap here is assuming that database or application error logs will reveal the attack's origin, when in fact they only show downstream effects and lack the source IP and request details needed to trace the DDoS.

37
MCQhard

An attacker is bypassing WAF signatures by using Unicode encoding. Which WAF feature must be enabled to normalize the traffic before inspection?

A.Content-Type header inspection
B.SSL/TLS offloading
C.UTF-8/Unicode normalization
D.Request body buffering
AnswerC

Unicode encoding lets attackers disguise malicious payloads so signature matching fails. Enabling UTF-8/Unicode normalization converts encoded characters into their canonical form before the WAF inspects traffic, restoring signature detection and satisfying the stem's requirement to normalise requests prior to inspection.

Why this answer

Unicode encoding allows attackers to represent characters in multiple ways (e.g., using full-width characters or overlong UTF-8 sequences) to bypass signature-based WAF rules that look for literal ASCII patterns. Enabling UTF-8/Unicode normalization forces the WAF to convert all input into a canonical form before matching signatures, so obfuscated payloads are decoded and inspected correctly. Without normalization, the WAF sees encoded gibberish and misses the attack.

Exam trap

The trap is confusing decryption (SSL offloading) or buffering with normalization — candidates may think that simply decrypting or buffering traffic is enough, but the exam tests whether you know that encoding normalization is a distinct WAF feature required to defeat Unicode evasion.

How to eliminate wrong answers

Option A is wrong because Content-Type header inspection only checks the declared MIME type of the request body; it does not decode or normalize character encodings, so Unicode-obfuscated payloads still bypass signature checks. Option B is wrong because SSL/TLS offloading merely decrypts traffic at the WAF so it can inspect plaintext; it does not address encoding-based evasion. Option D is wrong because request body buffering ensures the entire body is available for inspection (important for large payloads) but does not normalize Unicode or other encodings, so encoded attacks still slip through.

38
MCQmedium

Which tool would you use to perform a live analysis of HTTP traffic and inspect for malicious payloads in real-time?

A.Nmap
B.Wireshark
C.Netstat
AnswerB

Wireshark captures packets directly from a network interface in promiscuous mode, decoding HTTP requests and responses on the fly. This satisfies the real-time inspection constraint, letting you examine payload contents as traffic traverses the wire rather than relying on logs or offline capture files.

Why this answer

Wireshark is a protocol analyzer that captures and decodes live network traffic, allowing real-time inspection of HTTP requests and responses, including payload contents, headers, and body data. It can reassemble TCP streams and apply display filters (e.g., http.request) to isolate malicious payloads as they traverse the wire. This makes it the correct tool for live HTTP traffic analysis.

Exam trap

The trap is conflating 'network visibility' tools — candidates may choose Netstat because it shows connections, but the question specifically requires payload inspection, which only a protocol analyzer like Wireshark provides.

How to eliminate wrong answers

Option A is wrong because Nmap is a port scanner and host discovery tool — it identifies open ports and services but does not capture or inspect HTTP payload contents in real time. Option C is wrong because Netstat displays local socket connections, routing tables, and interface statistics; it shows that a connection exists but provides no visibility into HTTP payloads. Option D is wrong because Syslog is a logging protocol that collects event messages from devices; it does not perform live packet capture or HTTP payload inspection.

39
MCQmedium

A web application is returning verbose error messages that include full stack traces and database query fragments to users. An attacker is using these messages to map the application's internal structure. Which remediation step should the incident handler recommend to the development team?

A.Enable detailed error logging on the production server to capture more information about failures.
B.Disable all error logging to prevent attackers from accessing log files through the web server.
C.Move the application to a different server with a newer operating system to eliminate the errors.
D.Configure the application to return generic error messages to users while logging detailed errors server-side.
AnswerD

This directly addresses the information disclosure by separating what the user sees from what the developers need. Generic client-facing messages prevent attackers from learning internal paths, query structures, and framework versions, while server-side logging preserves the diagnostic detail. It is the standard secure error handling practice for production web applications.

Why this answer

Verbose error messages leak internal implementation details that aid attackers in mapping the application and crafting further attacks. The correct remediation is to return generic messages to users while retaining detailed error logging on the server for troubleshooting and forensic purposes. Disabling logging, enabling more verbose output, or migrating servers do not resolve the information disclosure.

Exam trap

The trap here is confusing internal diagnostic logging with client-facing error output, leading to a recommendation that either keeps leaking details or removes valuable logs.

40
MCQmedium

During a web application incident, an analyst discovers that an attacker is using SQL injection to extract data from a backend database. Which SQL injection technique involves the attacker inferring data by asking the database true/false questions and observing the application's response?

A.Time-based SQL injection
B.Error-based SQL injection
C.Blind SQL injection (boolean-based)
D.Union-based SQL injection
AnswerC

Blind SQL injection (boolean-based) occurs when the application does not return database results or errors, but the attacker can still infer data by sending queries that cause the application to behave differently based on whether a condition is true or false. By observing these differences, the attacker can extract information one bit at a time.

Why this answer

Blind SQL injection (boolean-based) is characterized by the attacker asking the database true/false questions and observing changes in the application's behavior, such as different content or status codes. This technique is used when the application does not return direct query results or errors. The attacker can then systematically extract data by testing conditions.

Exam trap

The trap here is confusing boolean-based blind SQL injection with time-based blind SQL injection, as both are inferential but differ in the observable signal.

41
MCQmedium

A web application incident responder is investigating a suspected XML External Entity (XXE) attack. Which component of the web application is most likely to be the initial target of the attack?

A.The web server's SSL/TLS configuration
B.The client-side JavaScript engine in the user's browser
C.The database server that stores application data
D.The XML parser that processes user-supplied XML input
AnswerD

XXE attacks target XML parsers that process user-supplied XML. If the parser is configured to resolve external entities, an attacker can include malicious entity definitions to read local files, perform SSRF, or cause denial of service. The parser is the initial component that interprets the malicious XML, making it the primary target.

Why this answer

XXE attacks exploit vulnerabilities in XML parsers that process user-supplied XML. When a parser is configured to resolve external entities, an attacker can define malicious entities to read files, perform SSRF, or cause DoS. The parser is the initial component that interprets the malicious XML, making it the primary target during an incident investigation.

Exam trap

The trap here is assuming that XXE targets the database or web server directly, but it specifically exploits the XML parser that handles user input.

42
Multi-Selecthard

Which TWO settings in a WAF policy are most effective at mitigating automated bot-driven web attacks?

Select 2 answers
A.Enabling verbose debugging mode
B.Implementation of a CAPTCHA challenge
C.Disabling all HTTP POST requests
D.Rate limiting based on IP address
E.Reducing the global connection timeout
AnswersB, D

A CAPTCHA challenge forces the client to solve a human-solvable puzzle, breaking the automation loop that scripted bots rely on. This satisfies the need to mitigate automated bot-driven attacks by distinguishing human sessions from programmatic requests at the WAF.

Why this answer

Option B (Implementation of a CAPTCHA challenge) is correct because CAPTCHAs are designed to distinguish human users from automated scripts, forcing bots to solve a challenge they typically cannot complete, thereby blocking automated bot-driven attacks at the application layer. Option D (Rate limiting based on IP address) is correct because throttling the number of requests a single IP can make within a time window directly mitigates the high-volume, repetitive request patterns characteristic of bot-driven attacks such as credential stuffing or scraping. Option A (Enabling verbose debugging mode) is incorrect because debugging output exposes internal details and does not mitigate bot traffic; it may actually aid attackers.

Option C (Disabling all HTTP POST requests) is incorrect because it is overly broad and would break legitimate application functionality rather than selectively targeting bots. Option E (Reducing the global connection timeout) is incorrect because shortening timeouts does not distinguish bots from users and can degrade legitimate user experience without meaningfully stopping automated attacks.

Exam trap

The trap here is that candidates might select options that sound like security measures (e.g., disabling POST or reducing timeouts) but actually harm functionality or are not bot-specific; the exam tests understanding of which WAF features directly target automated threats.

43
MCQeasy

A web application is suspected of being compromised through a file inclusion vulnerability. The attacker used the vulnerability to read sensitive files on the server. Which web server log entry would provide the MOST direct evidence of the file inclusion attempt?

A.A POST request to a login page with a large number of parameters.
B.A request for a URL containing directory traversal sequences such as ../../etc/passwd.
C.A request for a static image file that returns a 404 error.
D.A request with a User-Agent string that matches a known vulnerability scanner.
AnswerB

File inclusion attacks often use directory traversal to access files outside the web root. A log entry showing traversal sequences directly indicates an attempt to exploit a file inclusion vulnerability. This is the most direct evidence because it captures the malicious input in the request URI, which is typically logged in access logs.

Why this answer

File inclusion vulnerabilities are exploited by manipulating parameters to include local or remote files. Attackers often use directory traversal sequences to navigate the file system. Web server access logs that capture the request URI will show these sequences, providing direct evidence of the attempt.

Other log entries may indicate scanning or other attacks but are less specific.

Exam trap

The trap here is assuming that any unusual request is evidence of file inclusion, when the presence of directory traversal or file path parameters is the key indicator.

44
MCQmedium

What is the purpose of enabling 'Request Body Buffering' on a WAF during incident response?

A.To compress incoming traffic
B.To improve web server performance
C.To allow the WAF to inspect the full request body for malicious payloads
D.To hide the web server version from attackers
AnswerC

Request body buffering makes the WAF hold the complete HTTP request body before inspection, rather than streaming it. This lets the engine examine the entire payload for malicious content, satisfying the requirement to detect attacks hidden deeper in the body during incident response.

Why this answer

Request Body Buffering forces the WAF to buffer the entire HTTP request body before forwarding it to the backend, which is essential because many WAF inspection engines can only analyze the full payload once it has been completely received. Without buffering, the WAF may only inspect headers or the first chunk of a chunked/streamed body, allowing attackers to smuggle malicious payloads past inspection. During incident response, enabling this ensures payloads like SQLi, XSS, or file-upload exploits embedded deep in the body are actually evaluated against WAF rules.

Exam trap

212-89 often tests the misconception that WAF features are about performance or compression, when in fact request body buffering exists purely to enable deep payload inspection.

How to eliminate wrong answers

Option A is wrong because compression is handled by content-encoding/gzip at the server or CDN layer, not by WAF request body buffering. Option B is wrong because buffering actually adds memory and latency overhead to the WAF, so it does not improve web server performance. Option D is wrong because hiding the server version is done via header stripping (e.g., ServerTokens Prod) or response rewriting, not request body buffering.

45
MCQhard

You suspect a CSRF (Cross-Site Request Forgery) attack. What log entry pattern confirms this?

A.Multiple POST requests without a corresponding GET request
B.High volume of 401 Unauthorized errors
C.Referer header showing a domain different from the application's domain
D.A sudden change in the session cookie value
AnswerC

CSRF exploits a victim's authenticated session from a foreign origin, so the forged request carries a Referer pointing to an attacker-controlled domain rather than the application's own. That cross-domain mismatch is the confirming signature in the logs.

Why this answer

CSRF attacks originate from a different site. Checking the 'Referer' header in the logs for unexpected domains is the primary method for detection.

46
MCQeasy

You are reviewing logs after an incident. You see a sequence of requests starting with 'admin.php', then 'admin.php?id=1', then 'admin.php?id=1 OR 1=1'. What is the attacker doing?

A.Executing a cross-site scripting attack
B.Testing for SQL injection vulnerabilities
C.Performing a directory traversal
D.Performing a brute-force attack
AnswerB

The progression from a plain page request to appending a numeric parameter, then a boolean tautology, shows systematic probing of the id parameter for improper input handling. The 'OR 1=1' payload is a classic SQL injection test, confirming the attacker is enumerating injection flaws.

Why this answer

The progression from 'admin.php' to 'admin.php?id=1' to 'admin.php?id=1 OR 1=1' shows the attacker probing a parameter and then injecting a classic SQL tautology ('OR 1=1') to bypass authentication or extract data. This is textbook SQL injection testing.

Exam trap

212-89 often tests whether candidates can distinguish SQL injection payloads from XSS or directory traversal by recognizing SQL-specific syntax like 'OR 1=1'.

How to eliminate wrong answers

Option A is wrong because XSS payloads involve script tags or JavaScript (e.g., <script>alert(1)</script>), not SQL boolean logic. Option C is wrong because directory traversal uses sequences like ../../etc/passwd to escape the web root, not SQL syntax. Option D is wrong because brute-force attacks involve repeated login attempts with varying credentials, not parameter manipulation with SQL operators.

47
MCQhard

A web application is behind a reverse proxy that forwards client requests. During an incident, you need to identify the true source IP of an attacker who is sending malicious requests. The web server logs show the IP of the reverse proxy instead of the client. Which HTTP header should you inspect in the web server logs to find the original client IP?

A.Host
B.X-Forwarded-For
C.User-Agent
D.Referer
AnswerB

X-Forwarded-For is the de facto standard header used by proxies to convey the originating IP address of a client. When a reverse proxy forwards a request, it appends the client IP to this header. Inspecting it in the web server logs allows you to trace back to the true source, provided the proxy is configured to pass it and the logs capture it.

Why this answer

When a reverse proxy forwards requests, it typically adds the X-Forwarded-For header containing the original client IP. Web server logs must be configured to capture this header. Inspecting it allows incident responders to identify the true source IP of the attacker, which is essential for blocking, geolocation, and further investigation.

Exam trap

The trap here is assuming that the IP address in the web server log is always the client IP, ignoring the presence of a reverse proxy that masks the true source.

48
MCQmedium

During an incident involving a compromised e-commerce web application, you need to determine whether an attacker used a stolen session cookie to access a user's account. Which HTTP header should you examine first in the web server access logs to identify the session token used in the malicious requests?

A.Referer
B.Cookie
C.User-Agent
D.Authorization
AnswerB

The Cookie header carries the session identifier (e.g., JSESSIONID, PHPSESSID) that the server uses to associate a request with an authenticated session. By examining this header in the access logs, you can pinpoint the exact token used by the attacker, compare it with the legitimate user's token, and confirm session hijacking. This is the most direct evidence of session token reuse in web application incidents.

Why this answer

The Cookie header is the only HTTP header that directly carries the session identifier used for authentication in cookie-based web applications. During a session hijacking investigation, correlating the Cookie value across requests allows you to confirm that an attacker used a stolen token. Other headers provide contextual information but lack the session token required to prove hijacking.

Exam trap

The trap here is assuming that the Authorization header contains session cookies, when in fact it is used for different authentication schemes and would not reveal the session token in a typical web application.

49
MCQmedium

You are handling a confirmed incident in which an attacker uploaded a web shell named 'image_thumb.php' to a public-facing Apache server running PHP. The file is being invoked repeatedly via HTTP POST requests. Which action should you take FIRST to contain the threat while preserving forensic evidence?

A.Immediately rebuild the server from a known-good image and restore the most recent backup.
B.Capture volatile data and a forensic copy of the web shell, then block its execution and network access to it while keeping the original in place.
C.Configure the WAF to block requests containing the string 'image_thumb.php' and continue monitoring.
D.Delete the web shell and restart the Apache service to break any active attacker sessions.
AnswerB

This approach preserves the original artifact for analysis, captures volatile evidence such as running processes and network connections that would be lost on reboot, and contains the threat by preventing execution and inbound access. It follows the incident handling sequence of identification, containment, and evidence preservation before eradication.

Why this answer

Containment must balance stopping the attacker with preserving evidence. Capturing volatile data and a forensic copy of the web shell, then blocking its execution and external access, achieves both. Deleting the file, rebuilding the server, or relying solely on a WAF signature all sacrifice forensic value or leave the intrusion path open, undermining the subsequent eradication and recovery phases.

Exam trap

The trap here is assuming that deleting the malicious file or rebuilding the server is the fastest way to contain the incident, when doing so actually destroys the volatile evidence and artifacts needed to determine scope and root cause.

Ready to test yourself?

Try a timed practice session using only Web Application Incidents questions.