A web application firewall reads each request for an attack on your code: an SQL injection, a script in a field, a path that should not be reached. A bot that creates fake accounts or tries leaked passwords sends none of that: its sign-up is the same request a person sends. Bot mitigation answers another question: who is sending it.
Side by side
| WAF | Bot mitigation | |
|---|---|---|
| What it looks for | Requests that attack the application: injection, cross-site scripting, known exploits | A program where a person should be |
| What it reads | Each request, and the rate of requests | How the browser behaves on the page, the request, and the sessions around it |
| What it stops | Exploits, and floods by rate | Fake sign-ups, credential stuffing, card testing, scraping |
| What it misses | A valid request sent by a script | An exploit in a person's request |
Can a WAF stop bots?
Some. A rate limit stops a flood from one address, and a list of bad addresses stops the clumsiest scripts. The bots that cost the most send few requests from many addresses, each of them valid. That is why WAF vendors sell bot detection as a product of its own: AWS WAF has Bot Control, a paid rule group.
Why you may want both
They overlap little. Keep the WAF in front of everything for exploits, and ask Bot Protection at the actions a bot profits from: a sign-up, a login, a checkout. Bot Protection does not sit in front of your traffic: your server calls it, with a timeout of its own.
Sources
OWASP Automated Threats to Web Applications, on the misuse of what an application is meant to do; AWS WAF Bot Control.
Questions
Is a WAF the same as bot management?
No. A WAF looks for requests that attack your code; bot management looks for programs doing what a person would. Many vendors sell both, as two products.
Does Bot Protection replace my WAF?
No. It does not inspect requests for exploits. Keep your WAF, and add Bot Protection at the actions bots abuse.