Courseiva

CCNA Web Application Incidents Questions

29 questions · Web Application Incidents · All types, answers revealed

1
MCQmedium

You are performing incident response on a web server compromised via Directory Traversal. What command is most useful for identifying the specific files accessed in the logs?

A.grep -r "../" /var/log/apache2/access.log
B.grep -r "SELECT" /var/log/apache2/access.log
C.grep -r "<script>" /var/log/apache2/access.log
D.tail -f /var/log/auth.log
AnswerA

This command searches for the standard parent directory traversal sequence.

Why this answer

Using grep to search for traversal sequences like '../' within the access logs is the standard method for finding these attempts.

2
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

Understanding the application helps create accurate and valid rules.

Why this answer

Tuning must balance security requirements, application behavior, and maintenance of the rule set.

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 system calls and file modifications, which are necessary for identifying unauthorized configuration changes.

Why this answer

System-level audit logs like 'auditd' or file integrity monitoring logs track changes to sensitive configuration files.

4
MCQeasy

A user's session is hijacked. Which log attribute is most helpful in confirming the hijack occurred?

A.User-Agent string
B.Request timestamp
C.Remote IP address
D.HTTP Referer
AnswerA

A sudden change in the User-Agent for a persistent session ID strongly suggests an attacker has taken over the session.

Why this answer

Observing a change in the User-Agent string while the session ID remains constant is a strong indicator of session hijacking.

5
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

These provide the foundational data for web application activity.

Why this answer

A complete audit requires reviewing the web server, the security layer (WAF), and the application itself.

6
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

WAFs inspect application-layer traffic (Layer 7) and block requests that match known attack signatures.

Why this answer

The primary function of a WAF during an incident is to provide real-time filtering and blocking of malicious HTTP traffic patterns.

7
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

The W3C logs capture requested URIs and query strings necessary for identifying malicious SQL injection patterns.

Why this answer

W3C extended log files in IIS provide the most granular detail on URL parameters and query strings used in SQL injection.

8
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

403 Forbidden specifically indicates the server understands the request but refuses to authorize it due to file permissions.

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.

9
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 is caused by parsers that allow the processing of external entities, often enabled by default in older configurations.

Why this answer

XXE occurs when an XML parser is configured to resolve external entities, allowing access to local files.

10
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

Exclusions allow legitimate traffic through while maintaining the primary security posture.

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.

11
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

Cross-log correlation is vital to see the full attack path.

Why this answer

Log review requires correlation, integrity protection, and proper scope analysis.

12
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 is the common key used to track the user's activity across logs.

Why this answer

Linking sessions across logs requires a common identifier like a session cookie or ID and the associated timestamp.

13
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

These are command separators and execution characters used to append unauthorized commands to input.

Why this answer

Characters like pipe, semicolon, and backticks are common metacharacters used to chain commands in OS command injection.

14
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

Application error logs provide the necessary context on why the request failed (e.g., code exception).

Why this answer

The server's application error log contains the traceback and specific exception details for 500 errors, which often reveal if an attacker is triggering crashes.

15
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

Most WAFs allow filtering based on HTTP request headers like User-Agent.

Why this answer

Creating a WAF rule to drop requests matching that specific User-Agent string is the most direct and efficient mitigation.

16
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

The failure to regenerate the session ID upon authentication is the definition of a session fixation vulnerability.

Why this answer

Session fixation involves an attacker setting a victim's session ID before they log in. Observing the same session ID used by a guest and then by an authenticated user is the indicator.

17
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

These show if the attacker is attempting to escalate privileges or access unauthorized data.

Why this answer

Database logs and audit logs provide the necessary visibility into query execution and unauthorized access.

18
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

This header contains the original client IP address.

Why this answer

Since a load balancer sits between the client and the server, preserving the client's IP and original request path is critical.

19
MCQhard

An attacker is using a slow-rate HTTP POST request to exhaust server resources. Which ModSecurity directive should be adjusted to mitigate this behavior?

A.SecDataDir
B.SecRuleEngine DetectionOnly
C.SecResponseBodyLimit
D.SecRequestBodyLimit
AnswerD

This limits the size of the request body, preventing resource exhaustion via oversized or slow POST requests.

Why this answer

ModSecurity's 'SecRequestBodyLimit' and 'SecRequestBodyNoFilesLimit' manage the size and rate of incoming request bodies.

20
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

Targeting sensitive files is a primary goal of directory traversal.

Why this answer

Traversal attempts use specific patterns to move outside the intended root directory.

21
MCQhard

When analyzing an XSS attack, you find that the payload is being injected through a hidden form field. Which WAF policy is best suited to block this?

A.Implement strict field-level input validation for the specific hidden form parameter
B.Enable IP reputation blocking
C.Enable URL encoding normalization
D.Set the WAF to block all POST requests
AnswerA

Restricting the allowed content for the specific hidden field mitigates the risk while allowing other traffic.

Why this answer

WAFs with 'Input Validation' or 'Request Body Inspection' can be configured to enforce strict rules on specific form fields, including hidden ones.

22
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

Assessing the scope of data exposure is the most critical part of an incident report.

Why this answer

An incident report needs to document what happened, the scope of the impact, and the remediation steps taken.

23
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

Normalization transforms encoded characters into a standard form, making them detectable by pattern-matching signatures.

Why this answer

Unicode normalization ensures that multiple representations of the same character are converted to a standard format that signatures can recognize.

24
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
D.Syslog
AnswerB

Wireshark allows for detailed inspection of HTTP streams and packet contents.

Why this answer

Wireshark is the standard tool for capturing and analyzing raw network traffic, including the contents of HTTP packets.

25
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

CAPTCHA effectively differentiates human users from automated scripts.

Why this answer

Rate limiting and challenge-response mechanisms (like CAPTCHA) are the most effective controls for blocking automated bots.

26
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

Buffering ensures that the full payload is available for inspection, preventing partial-request bypasses.

Why this answer

Buffering allows the WAF to receive the entire request before inspecting it, which is necessary to detect payloads that span across packets.

27
MCQeasy

Which HTTP header is most critical to inspect when identifying the origin of an attack passing through a reverse proxy?

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

This header contains the IP address of the client connecting to the proxy, essential for source identification.

Why this answer

The 'X-Forwarded-For' header allows the original client IP to be preserved through proxy/load balancer hops.

28
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 relies on requests being triggered from an attacker-controlled site; a mismatch in the Referer header is a clear indicator.

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.

29
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 inclusion of 'OR 1=1' is a classic signature used to test for SQL injection by forcing a true condition.

Why this answer

This sequence shows reconnaissance followed by an attempt to bypass authentication via SQL injection.

Ready to test yourself?

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