Overview

In my experience, here are tips that can help you better harden your WAF strategy in 2025 and beyond:

  1. Leverage WAF telemetry for threat hunting: Don’t just use WAF logs for incident response; treat them as a rich source for proactive threat hunting. Analyze patterns like repeated near-misses, attacker recon attempts, or subtle probing that bypasses traditional detection but signals intent.

  2. Deploy canary endpoints to trap evasive attackers: Create decoy routes (e.g., /admin-test, /api-debug) monitored exclusively by the WAF. These endpoints should never be accessed by legitimate users, so any hit signals reconnaissance or exploitation attempts—perfect for early detection.

  3. Instrument application-aware context in rules: Tie WAF logic to your application’s dynamic context, like session state, user roles, or known API call sequences. Contextual rules reduce false positives and catch logic-aware attacks that generic rulesets miss.

  4. Apply memory and CPU quotas to WAF containers: If you're running WAF in a containerized environment, restrict resource consumption to prevent WAF itself from becoming an attack vector (e.g., through regex DoS or large payload exhaustion).

  5. Use shadow mode for pre-deployment policy evaluation: Before enabling a new WAF rule in blocking mode, run it in detection-only (shadow) mode for several days. This allows you to assess its behavior on real traffic, minimizing false positives and preventing business disruption.

expert tips

Gal Elbaz
Gal Elbaz
Co-Founder & CTO, Oligo Security

Gal Elbaz is the Co-Founder and CTO at Oligo Security, bringing over a decade of expertise in vulnerability research and ethical hacking. Gal started his career as a security engineer in the IDF's elite intelligence unit. Later on, he joined Check Point, where he was instrumental in building the research team and served as a senior security researcher. In his free time, Gal enjoys playing the guitar and participating in CTF (Capture The Flag) challenges.

What Is a Web Application Firewall (WAF)? 

A web application firewall (WAF) is a security layer that protects web applications, APIs, and mobile backends by monitoring, filtering, and blocking malicious traffic before it reaches the application. It operates at the application layer (Layer 7) to defend against common attacks like SQL injection and cross-site scripting (XSS). 

WAFs use security rules to identify common threats to web applications, such as known vulnerabilities in the OWASP Top 10, and can protect against both application-layer DDoS attacks and data breaches. WAFs can be deployed as software, hardware appliances, or cloud-based services, allowing for flexible integration into existing infrastructure. 

How it works:

  1. Traffic filtering: The WAF sits between users and the web application, acting as a reverse proxy that intercepts all incoming requests. 
  2. Rule-based inspection: It inspects these requests for malicious patterns, including SQL injection, cross-site scripting, and other common web application exploits.
  3. Threat mitigation: If a request is deemed malicious, the WAF blocks it, preventing the attack from reaching the web application. 
  4. Customizable policies: Users can customize WAFs by creating positive and negative security rules.

Key benefits include:

  • Protection from exploits: WAFs defend against a wide range of attacks, including zero-day exploits, malware, and application-layer DoS attacks. 
  • Compliance and data security: They help organizations in high-risk sectors like banking and healthcare protect sensitive customer data. 
  • Mitigation of application-level DDoS attacks: WAFs can automatically and continuously monitor and mitigate application layer (Layer 7) DDoS events. 
  • Rapid security implementation: Many WAFs offer quick setup and guided onboarding, providing immediate protection for new applications.

This is part of a series of articles about application security tools.

How Does a WAF Work? 

A WAF works by intercepting and inspecting all HTTP/HTTPS traffic between clients and a web application. It applies a set of rules to each request and response, looking for patterns that match known attack signatures, anomalies, or policy violations. These rules can be based on signatures, behavioral analysis, or custom logic defined by administrators.

There are three main detection models a WAF may use:

  • Signature-based detection identifies known attack patterns, such as SQL injection strings or common XSS payloads.
  • Anomaly-based detection establishes a baseline of normal traffic behavior and flags deviations from this pattern.
  • Policy-based detection relies on manually defined rules that specify what constitutes allowed or disallowed behavior.

WAFs can operate in two primary modes:

  • Detection (monitoring) mode, where they log and alert on suspicious activity without blocking it.
  • Prevention (blocking) mode, where they actively block malicious traffic in real time.

Most WAFs offer customizable rule sets and support integration with threat intelligence feeds to update their defenses dynamically. Some also include features like rate limiting, bot mitigation, and session validation to enhance application security.

WAF Protection Process

A WAF’s protection process looks something like this:

  1. Traffic filtering: The WAF inspects every HTTP and HTTPS request before it reaches the application, dropping malformed or suspicious traffic. It filters based on request structure, headers, payload size, and known bad sources, reducing noise and preventing obvious attack attempts at the entry point.
  2. Rule-based inspection: Each request is evaluated against a set of security rules that define allowed and disallowed behavior. This can include pattern matching for SQL injection strings, XSS payloads, or unusual parameter values. The inspection process helps detect both simple and advanced attack vectors.
  3. Threat mitigation: When a request matches malicious criteria, the WAF can block it, sanitize inputs, or challenge the client with additional checks. These actions stop the exploit attempt before it interacts with the application code, preserving both data integrity and service availability.
  4. Customizable policies: Administrators can adjust rulesets to fit their application’s requirements, including whitelisting trusted traffic, tightening controls on sensitive endpoints, or defining geographic restrictions. Customization ensures the WAF balances effective protection with minimal disruption to legitimate users.

WAF vs. Firewall vs. NGFW 

Traditional firewalls operate mainly at the network and transport layers. They filter traffic based on IP addresses, ports, and protocols to block unauthorized access. This makes them effective at preventing general network intrusions but not at understanding or inspecting application-level traffic.

A next-generation firewall (NGFW) extends these capabilities by including deep packet inspection, intrusion prevention, and application awareness. NGFWs can identify and control traffic from specific applications and provide more context than traditional firewalls, but they are still not optimized to handle the full range of web application threats.

A web application firewall (WAF) specializes in application-layer protection. It inspects HTTP and HTTPS requests in detail, looking for attack payloads, input manipulation, or abnormal patterns that could exploit vulnerabilities in web applications. Unlike NGFWs, which balance broader network security functions, a WAF focuses on protecting web applications against threats like SQL injection, XSS, and session hijacking.

In practice, many organizations often deploy all three solutions together. The firewall and NGFW safeguard the network perimeter, while the WAF adds a dedicated layer of defense for web-facing applications.

WAF Deployment Models 

There are three common WAF deployment models: network based, host based, and cloud based.

Network-Based WAF

Network-based WAFs are typically deployed as dedicated hardware or virtual appliances within the network infrastructure. They are positioned to monitor and filter all incoming and outgoing web traffic to one or more web applications. This centralized placement allows them to protect multiple applications simultaneously and can be integrated with other network security solutions, delivering consistency across the organization's perimeter defenses.

These appliances are known for their high-performance throughput and low impact on application latency, making them a preferred choice for enterprises with demanding performance requirements or diverse application landscapes. However, network-based WAFs can be complex and costly to manage, requiring specialized staff for deployment, maintenance, and policy updates. Centralization also introduces a single point of failure, demanding robust high-availability or failover configurations.

Host-Based WAF

Host-based WAFs are installed directly on the server hosting the web application, running as software agents or modules. This integration allows for fine-grained visibility and control over the application's runtime environment and enables precise detection of threats specific to the host or the application's context. Host-based WAFs can enforce security policies closely aligned with the application’s logic, offering targeted protection that adapts to the software’s architecture and use case.

The primary trade-offs for host-based WAFs are resource consumption and operational complexity. They consume CPU, memory, and storage resources on the host, potentially impacting application performance, especially under heavy load. They also require individual deployment, configuration, and maintenance on every server, which can become complex at scale. Despite these challenges, host-based WAFs can offer unmatched customization and protection for sensitive or high-risk applications.

Cloud-Based WAF

Cloud-based WAFs are delivered as security-as-a-service offerings, operated from a provider's infrastructure and integrated with customer web applications through DNS redirection or edge proxying. This model offers rapid deployment, ease of scaling, and offloads management burdens from internal IT teams. Providers handle rule updates, scaling, performance optimization, and threat intelligence, allowing organizations to protect web assets without investing heavily in hardware or specialized expertise.

However, cloud-based WAFs introduce dependencies on third-party providers and require trust in their operational and data privacy practices. Some organizations may have concerns about data residency or compliance implications. Cloud-based solutions also impose constraints on highly-customized rule sets or integration with highly sensitive backend systems.

{{expert-tip}}

Key Features and Capabilities of WAF Solutions 

Here are some of the main features that enable WAF to protect organizations from application-related threats.

Protection Against OWASP Top 10

One of the critical features of a WAF is its ability to protect against the OWASP Top 10, a consensus list of the most critical web application security risks. A WAF typically uses a combination of signature-based detection and anomaly analysis to catch attack types like SQL injection, cross-site scripting (XSS), cross-site request forgery (CSRF), and insecure deserialization. By constantly updating its signatures and heuristics, a WAF helps close the gaps that could be exploited by attackers targeting well-known web vulnerabilities.

Protection mechanisms target not just the manipulation of requests and parameters but also the enforcement of proper input and output validation, authentication checks, and error handling. When properly configured, a WAF acts as a dynamic shield, detecting and blocking attack attempts before they reach the application code. This is vital for organizations that might not rapidly patch their applications or rely heavily on third-party components.

Bot Mitigation and Anti-Automation

Modern WAF solutions include capabilities for bot mitigation, aiming to distinguish between legitimate user traffic and malicious or unwanted automated activity. Features such as CAPTCHA challenges, behavioral analytics, rate limiting, and device fingerprinting help prevent automated attacks like credential stuffing, scraping, and vulnerability scanning. By filtering or challenging suspicious bots, a WAF helps ensure the application's resources are consumed by legitimate users rather than malicious actors.

Anti-automation mechanisms also protect business logic against sophisticated automated threats such as fake account creation, carding attacks, or ticket scalping. Decision engines can leverage threat intelligence feeds and advanced analytics to recognize evolving bot tactics.

Rate Limiting and DDoS Defense

A WAF’s rate limiting functionality restricts the number of requests a user or IP address can make within a certain timeframe, preventing abuse of application resources and reducing the risk of denial-of-service (DoS) attacks. By setting thresholds that trigger when exceeded, rate limiting thwarts brute-force login attempts, API abuse, or excessive crawling. This control is essential to maintain application performance and reliability, especially during periods of high demand or malicious spikes.

In addition to DoS protections, many WAFs incorporate DDoS defense features, analyzing incoming traffic patterns to identify and mitigate large-scale distributed attacks. They may work in concert with cloud-based scrubbing centers or traffic aggregation points to prevent volumetric assaults from overwhelming application servers. Together, rate limiting and DDoS defense extend a WAF’s value beyond application security into broader service availability.

Customization with Rulesets

WAF solutions provide administrators with extensive capabilities to customize security policies through rulesets. These rulesets define how the WAF analyzes, filters, or responds to specific requests based on factors such as URL patterns, HTTP headers, payload content, or geolocation. Custom rules can target emerging threats, application-specific logic flaws, or compliance-driven access requirements, allowing organizations to tailor protections to their operational context.

By supporting manual and automated updates to rulesets, WAFs can adapt quickly to evolving attack tactics without requiring core platform upgrades. Administrators can fine-tune sensitivity levels to balance between effective blocking and false positive minimization. This flexibility is crucial in dynamic development environments where applications evolve frequently and new types of user interaction may require real-time policy refinement.

Centralized Visibility and Monitoring

Centralized visibility is a core WAF feature, aggregating security events, logs, and analytics into unified dashboards. These monitoring tools provide real-time and historical data on attack attempts, request patterns, user behavior, and compliance metrics. Security teams can use this information to detect ongoing attacks, investigate incidents, and validate the effectiveness of deployed rules and policies.

Effective monitoring allows for the rapid identification of threats and the fine-tuning of defense strategies. Integration with security information and event management (SIEM) platforms or centralized logging systems ensures incidents are correlated with broader organizational security intelligence. This end-to-end visibility is critical for compliance, audit, and continuous improvement of an organization’s application security posture.

Related content: Read our guide to application detection and response

WAF Limitations 

While WAFs play a critical role in web application security, they are not a complete solution. They reduce risk but cannot eliminate all threats. Understanding their limitations helps organizations plan compensating controls and avoid a false sense of security.

  • Limited protection against zero-day exploits: WAFs rely on known signatures, rules, or behavioral patterns. New or highly obfuscated attack techniques can bypass detection until rule updates are applied.

  • False positives and negatives: Strict rules may block legitimate traffic (false positives), while overly permissive rules may allow attacks through (false negatives). Fine-tuning policies requires continuous monitoring and expertise.

  • Resource and performance overhead: Deep inspection of every HTTP/HTTPS request adds latency and consumes compute resources. High-traffic applications may need additional infrastructure to handle the overhead.

  • Bypass risks: Attackers may exploit misconfigurations, alternate application entry points (e.g., APIs, microservices), or direct connections that bypass the WAF entirely.

  • Application logic and business logic attacks: WAFs are effective at blocking generic input-based exploits but often struggle with complex business logic flaws, authorization issues, or chained attack vectors.

  • Operational complexity: Maintaining effective rule sets requires constant updates, monitoring, and tuning. In dynamic application environments with frequent changes, keeping the WAF aligned with the application can be challenging.

  • Dependence on proper deployment: The effectiveness of a WAF depends on correct placement and integration. Misconfigured or partially deployed WAFs may create gaps in coverage.

Best Practices for Secure WAF Configuration 

Organizations can improve the effectiveness of their WAF by implementing the following practices.

1. Use Customized Rulesets

Customizing rulesets is crucial for maximizing a WAF's effectiveness and minimizing false positives. Instead of relying solely on generic, vendor-provided rules, organizations should tailor rules to their specific application architectures, user behavior patterns, and known threat landscapes. This can involve whitelisting certain application paths, fine-tuning payload inspection depth, or adding protections for custom APIs and business logic.

A periodic review and update of customized rulesets ensures the WAF stays aligned with application changes and emerging threats. Security teams should coordinate closely with developers to understand how new features, endpoints, or integrations might impact WAF policy. Engaging in this cycle of ongoing refinement helps ensure optimal balance between protection, usability, and user experience.

2. Regular Security Testing

Regular security testing is necessary to validate the effectiveness of WAF configurations. Penetration testing, vulnerability scanning, and simulated attack exercises reveal gaps in existing rulesets and help determine if the WAF can recognize and defend against evolving attack techniques. Without regular testing, organizations risk relying on outdated or poorly tuned WAF policies that fail to block common or novel attacks.

An effective security testing regimen includes not just pre-deployment assessments, but also routine validation after major application or infrastructure changes. Integrating automated scanning into CI/CD pipelines allows for rapid feedback and helps developers and security teams react quickly to emerging issues. Regular reviews ensure that the WAF evolves together with the application and the broader threat landscape.

3. Enable Logging and Alerting

Enabling detailed logging and real-time alerting allows organizations to monitor WAF activity, detect ongoing attacks, and respond quickly to incidents. WAF logs should capture key information about blocked or flagged requests, including source, nature of attack, and affected resources. These logs form the foundation for incident response, forensic investigations, and continuous improvement of the security posture.

Organizations should configure alert thresholds based on the severity and frequency of detected threats to reduce noise and avoid alert fatigue. Integration with SIEM systems or centralized monitoring platforms helps correlate WAF alerts with other security events across the environment. Ongoing review of logs and alerts is essential for identifying attack patterns and ensuring the effectiveness of WAF policies.

4. Routine Policy Updates

Routine updates to WAF policies are necessary to keep pace with changes in application architecture, business requirements, and threat intelligence. New vulnerabilities are discovered regularly, and the tactics used by attackers evolve, making periodic policy review and refinement critical. Without consistent updates, a WAF may become less effective over time, leaving gaps that can be exploited by adversaries.

Policy updates should be synchronized with application release cycles and informed by threat intelligence feeds or third-party vulnerability disclosures. Automated tools can assist in identifying outdated or ineffective rules, but human oversight is required to ensure changes are contextually appropriate. Regular updates help maintain an optimal security posture and reduce the risk of bypass due to stale configurations.

5. Integrate with Runtime Context

Integrating Web Application Firewall (WAF) telemetry with runtime security context bridges the gap between network-layer visibility and application-level behavior. WAFs excel at detecting and blocking malicious traffic patterns — such as SQL injections, XSS, or abnormal request rates — but they often lack insight into how those requests affect the running application or whether an exploit attempt succeeded. By correlating WAF telemetry with runtime context (e.g., which libraries, functions, or APIs were actually executed), security teams can distinguish between harmless probes and genuine compromises. This reduces alert fatigue, prioritizes real threats, and enables faster, more accurate incident response.

This integration can be achieved through automated correlation pipelines or security observability platforms that merge WAF logs with application runtime data. The process typically involves forwarding WAF telemetry — such as request metadata, headers, and blocked payloads — into a security data lake or SIEM, where it is enriched with runtime signals collected by agents or instrumentation within the application. These agents provide contextual data, such as which code paths were invoked, which vulnerabilities were present in the affected components, and whether sensitive data was accessed. Together, this fused view allows for more actionable detections, precise root-cause analysis, and improved security posture management.

Complementing WAF with Oligo Real Time Security

Oligo complements WAFs by providing runtime visibility into how attacks impact an application’s real code and dependencies. While WAFs identify and block suspicious traffic at the edge, Oligo shows whether those attacks reached vulnerable components, triggered any execution, or were contained safely. Together, they help security teams focus on genuine threats and reduce time spent investigating false positives.

Subscribe and get the latest security updates

Built to Defend Modern & Legacy apps

Oligo deploys in minutes for modern cloud apps built on K8s or older apps hosted on-prem.