Web Application Firewalls Explained

Web Application Firewalls Explained

I see this misconception constantly: developers or junior admins slap a Web Application Firewall (WAF) in front of a vulnerable app and think they are "secure."

The article isn't just a "how-to" on configuring rules; it’s a conceptual breakdown of why WAFs are distinct from the standard firewalls we all grew up with.

Here is the TL;DR of the WAF fundamentals:

Layer 7 vs. Layer 3

A Network Firewall (Layer 3/4) manages access (who can talk to whom via IP/Port). A WAF (Layer 7) manages content (what they are saying). If you are trying to block SQL Injection with a Network Firewall, you are using the wrong tool.

  • The models of Security:

    • Negative Security Model (Blacklisting): This is the default for many. "Allow everything except known attacks." It's easier to set up but fails against zero-days.

    • Positive Security Model (Whitelisting): "Block everything except known good traffic." This is infinitely more secure but a nightmare to maintain because every valid input variation needs a rule.

  • Deployment Architectures: It breaks down where these things actually live:

    • Network-Based (Hardware): Fast, expensive, sits physically in the rack.

    • Host-Based (Software): Runs on the server (like ModSecurity). Cheaper, but eats your server's RAM/CPU.

  • Cloud-Based: The modern standard (like Cloudflare or AWS WAF). Easy to deploy, but you are trusting a third party with your SSL keys.

    Why WAFs Fail (Bypassing)

    The video below touches on why WAFs aren't magic. Simple obfuscation (changing case, adding comments in SQL queries, using different encoding) can often slip past a rigid WAF rule.

The Takeaway

A WAF is a safety net, not a solution. It gives you "virtual patching" time to fix the actual code, but if your underlying logic is broken, a WAF will eventually be bypassed.

Call to Action: If you want to understand the architecture and see how the different models stack up against real attacks, check out the full breakdown here:

Article below

Web Application Firewalls Explained - THM WAF Introduction

Video below

https://youtu.be/O2hEi2UjOIY

0 comments

Leave a comment

Our Best Pick of Cyber Security Notes

Cyber Security Certification Notes
The Unofficial Offensive Security AI Red Teamer Study Notes + FREE Cheat Sheet

Cyber Security Certification Notes

Cyber Security Study Guides
The Kali Linux Pentesting Cheat Sheet

Cyber Security Study Guides

AI & ML Study Guides
Master AI for Content Creation, Business & Marketing

AI & ML Study Guides

IT Study Guides
The Definitive Networking Cheat Sheet (Tools)

IT Study Guides