TUE 24 NOV 2026
Home / Guides

How to Investigate WAF Alerts and Determine Whether an Attack Reached Your Server

A practical workflow for tracing firewall detections, examining server activity and identifying evidence of successful exploitation.

ETJW By and
20 Nov 2026, 05:11 · Updated 20 Nov, 10:24 · 3 min read
A Web Application Firewall (WAF) alert does not confirm that an attacker compromised a website.
A Web Application Firewall (WAF) alert does not confirm that an attacker compromised a website.

A Web Application Firewall (WAF) alert does not confirm that an attacker compromised a website. Security teams must trace the flagged activity through firewall, web server and application logs to establish whether an attempted exploit reached its target and caused unauthorised activity.

This distinction matters when investigating SQL injection, remote code execution and malicious file upload attempts. A firewall may detect an attack without allowing it through, while an allowed connection could require further examination.

The following workflow shows how administrators can investigate these events using a WAF and an Nginx-powered server.

1. Examine the firewall detection

Start with the original security event and collect its essential details:

  • Timestamp of the activity.
  • Source IP address.
  • Target URL and HTTP method.
  • Matched security rule and rule ID.
  • Relevant parameters and payload.
  • Enforcement action, such as BLOCK, ALLOW or LOG.

For example, an illustrative WAF event might look like this:

JSON
json { "timestamp": "2026-11-20T08:30:00Z", "client_ip": "203.0.113.25", "method": "GET", "uri": "/products?id=1", "rule_id": "942100", "action": "BLOCK" }

The BLOCK action indicates that the firewall denied the matching traffic. However, investigators should examine related events to establish whether other attempts reached the origin server.

An ALLOW action means the traffic was permitted by the relevant security policy. It does not establish that the payload successfully exploited the target.

2. Trace activity through Nginx

Next, examine the web server records for evidence of the same action.

On many Linux installations, Nginx stores access records at:

Bash
bash /var/log/nginx/access.log

The configured location may differ depending on the installation and server configuration.

Search for the affected endpoint:

Bash
bash grep 'products?id=1' /var/log/nginx/access.log

You can also search for the recorded client address:

Bash
bash grep '203.0.113.25' /var/log/nginx/access.log

Compare timestamps, URLs, HTTP methods and available request identifiers with the original firewall event.

One important consideration: when a reverse proxy sits between the WAF and origin server, Nginx may record the proxy’s IP rather than the original visitor’s address. Check trusted proxy headers and your logging configuration before drawing conclusions.

Inspect the corresponding error records as well:

Bash
bash grep 'products' /var/log/nginx/error.log

These can reveal upstream failures, application communication problems and other processing errors.

A Web Application Firewall (WAF) alert does not confirm that an attacker compromised a website.These can reveal upstream failures, application communication problems and other processing errors.

3. Identify evidence of successful exploitation

A matching server entry does not prove that an attack worked. Investigators must establish what happened after the traffic reached the application.

For suspected SQL injection, examine database audit records and application activity for unexpected queries, unauthorised data retrieval or modifications.

For malicious file uploads, inspect upload directories for unfamiliar files and compare their modification times with the incident timeline.

For suspected remote code execution, investigate unexpected processes, command execution records and unusual outbound network connections.

Administrators can identify recently modified website files using:

Bash
bash find /var/www/html -type f -mmin -60 -ls

This lists files modified within the previous 60 minutes. Legitimate deployments and updates can also produce these results, so investigate each finding before classifying it as malicious.

4. Respond to confirmed compromises

Classify the investigation as blocked, unsuccessful, successful or inconclusive based on the available evidence.

If exploitation is confirmed, preserve relevant records, isolate affected systems where appropriate and investigate the extent of unauthorised activity.

If the evidence is inconclusive, retain the findings and continue investigating rather than automatically dismissing the alert.

Finally, review the relevant WAF rules and application controls to identify gaps that could allow similar attacks in the future.

The objective is to establish what happened beyond the initial detection and ensure that any confirmed compromise receives an appropriate response.

ET

The ZeroDayly Editorial Team covers cybersecurity news, vulnerabilities, data breaches, ransomware, WordPress security and online threats. Our team focuses on delivering accurate, accessible and timely information to help readers understand the latest developments in cybersecurity and digital safety. Articles published under this byline are reviewed and edited before publication.

Related stories