Cloud

Azure WAF: diagnose an anomaly score before adding an exclusion

A runbook for tracing a 949110 block to contributing rules, qualifying a false positive and validating a targeted fix.

01 Dec 2026 azurewafapplication-gatewaykqlsecurityrunbookrollback

A partner form starts returning HTTP 403 after a release. Application Gateway WAF logs show a block attributed to rule 949110. Disabling an arbitrary rule or allowing all partner traffic might restore the form while removing a useful protection.

In this fictional case, Application Gateway WAF uses a managed ruleset in anomaly-scoring mode. The task is to reconstruct the matches for one request, distinguish legitimate input from an attack, and change only what the evidence supports.

Interpret the blocking event

In CRS anomaly-scoring mode, matching rules contribute to a cumulative score. A Critical match contributes 5 and a Warning contributes 3. At 5 or above, Prevention mode blocks the request; Detection mode logs it without a WAF block. Mandatory rule 949110 records that decision. It does not identify the offending field or signature by itself, and it cannot be disabled.

A Matched event alone does not prove a block. Conversely, filtering only on Blocked hides contributing matches. This interpretation applies to managed anomaly scoring; a custom rule or the backend can produce other 403 responses. Confirm the product, ruleset version, mode and policy actually associated with the listener or path before drawing a conclusion.

Reconstruct one transaction

Record the UTC time, host, path, observed status, request identifier and WAF resource. Confirm that logs reach the workspace and cover the incident window. Match data, URIs and addresses can be sensitive: restrict access and redact evidence before sharing.

The following example targets the legacy AzureDiagnostics table. Replace the resource and transaction with values from the blocking event and adapt it to the table and schema actually collected. It deliberately omits payload values.

let startTime = datetime(2026-12-01T09:00:00Z);
let endTime = datetime(2026-12-01T10:00:00Z);
let gatewayId = "/subscriptions/REPLACE/resourceGroups/REPLACE/providers/Microsoft.Network/applicationGateways/REPLACE";
let tx = "REPLACE-TRANSACTION-ID";
AzureDiagnostics
| where TimeGenerated between (startTime .. endTime)
| where Category == "ApplicationGatewayFirewallLog"
| where _ResourceId =~ gatewayId
| where tostring(transactionId_g) == tx
| project TimeGenerated, action_s, ruleId_s, ruleSetType_s,
          ruleSetVersion_s, message_s, details_message_s
| order by TimeGenerated asc

Inspect every event for the transaction without initially filtering by action. Record the Matched rules and the final Blocked or Detected decision. Check the effective policy and scope against logs and configuration. If expected events are missing, investigate ingestion delay, resource, time window and diagnostic settings. Missing logs do not prove that no block occurred.

Qualify the evidence before changing policy

In a restricted workspace, review the inspected field and signature against expected business input with the application and security teams. A source IP or complaint alone does not establish legitimacy. Compare a successful transaction with a blocked one, including application version, method, field and contributing rules. Free text may resemble an injection; it may also contain a real attack.

FindingInitial decision
Contributing rules and field identified; business behavior confirmedTest an application fix or a narrowly scoped exclusion
Suspicious signature or intent not establishedKeep the block and continue the security investigation
No correlated matches or uncertain policyVerify collection, custom rules and backend before changing WAF

Do not use a broad Allow rule as a shortcut: a terminal action can bypass managed-rule evaluation. An exclusion removes selected elements from inspection; it does not make their contents safe. Check the scope supported by the ruleset and selector, the affected rules and other applications sharing the policy.

Test, decide and roll back

Export the baseline configuration and retain its version identifier, proposed diff, owner and stop criteria. In a representative environment or an isolated canary policy, use synthetic data to replay an allowed business request and representative negative cases for the detections that must remain. Check both the application outcome and correlated WAF events. No single test proves coverage of every attack.

After approval, apply the change to the agreed scope. Observe transactions and errors for a defined window, then expand only when expected behavior and protections are confirmed. Stop if the effective scope differs from the diff, the business transaction still fails, or a negative case passes without the expected detection.

  • Promote when business evidence, negative tests and monitoring agree.
  • Hold the block while the cause or legitimacy remains uncertain.
  • Roll back by restoring the known policy or removing the targeted exclusion. Verify its effective association, expected blocks and application health; document any remaining business impact.

The score explains why WAF made a decision. The contributing rules and request context determine whether that decision should change.

References