Field Note 004 / Offense

A WAF is a speed bump.

Not a wall. We've never met one that survived contact with a determined operator. It buys you log lines and minutes, not safety. Fix the application; don't rent a filter to stand in front of it.

What a filter can and cannot see

A web application firewall inspects requests and blocks the ones that match known attack patterns. That makes it good at stopping automated scanners and copy-pasted exploits. It cannot know your application's rules. A request that reads another customer's invoice by changing an ID in the URL is perfectly well formed. So is one that applies a discount twice.

The findings that matter most in an assessment, broken access control and flawed business logic, pass straight through.

Why pattern matching loses

The filter and the application parse the same request with different code. Any difference between them is a bypass: an unusual encoding, a duplicated parameter, a content type the filter does not decode, a body larger than it inspects. An attacker only needs one difference. The defender has to close all of them, on every update.

The right place for it

Keep it. It reduces noise, it gives you logs, and a temporary rule can cover a vulnerability for the hours it takes to ship a real fix. Just do not count it as the fix. Parameterized queries, output encoding, authorization checks on every object, and strict input validation live in the application, and that is where the vulnerability stops existing.

Related: Penetration testing & audits →DDoS counter-measures →

← Note 003All field notesNote 005 →

Have this problem
for real?

Book a callSend a message