A Denial of Service (DoS) attack is a malicious attempt to disrupt the normal availability of a targeted server, service, or network by overwhelming the target with a flood of illegitimate internet traffic. When hundreds of thousands of compromised IoT devices, servers, and computers around the globe are marshaled into a botnet to launch coordinated floods, it becomes a Distributed Denial of Service (DDoS) attack.
| DDoS Category | Measured In | Attack Mechanisms | Defensive Countermeasures |
|---|---|---|---|
| 1. Volumetric Floods | Gigabits / Terabits per second (Gbps / Tbps) | DNS Amplification, NTP Reflection, UDP floods, ICMP floods. Consumes all physical pipe bandwidth. | BGP Anycast routing, Cloud Scrubbing Centers (Cloudflare, AWS Shield), upstream ISP blackholing. |
| 2. Protocol Attacks | Packets per second (Mpps) | TCP SYN floods, Ping of Death, Smurf attacks. Exhausts state tables in firewalls and load balancers. | TCP SYN Cookies, connection rate limiting, tuning kernel TCP backlog queues. |
| 3. Application Layer (Layer 7) | Requests per second (RPS) | HTTP floods, Slowloris, complex GraphQL queries, search query database exhaustion. | Web Application Firewalls (WAF), CAPTCHA verification, aggressive client timeouts, Redis rate limits. |
In a reflection attack, the adversary does not send traffic directly to the victim. Instead, they exploit misconfigured, open third-party UDP servers (such as public DNS resolvers or NTP servers):
Unlike volumetric bandwidth floods that scream loudly across monitoring tools, Slowloris is a stealthy Layer 7 attack requiring almost zero bandwidth. Slowloris sends incomplete HTTP GET requests to a web server (e.g. Apache):
GET / HTTP/1.1
Host: target.com
User-Agent: Mozilla/5.0
X-a: b
... (sends another header line every 15 seconds to keep connection alive, never sending final \r\n\r\n)
Traditional thread-per-connection web servers hold the worker thread open waiting for the request to complete. With just a few hundred connections from a single laptop, Slowloris exhausts Apache's MaxRequestWorkers pool, crashing the entire web server!
Event-driven asynchronous servers (like Nginx) handle tens of thousands of idle connections effortlessly without dedicating threads. Placing Nginx or HAProxy in front of Apache completely neutralizes Slowloris attacks:
# Nginx Slowloris mitigation timeouts
client_body_timeout 10s;
client_header_timeout 10s;
keepalive_timeout 15s;
send_timeout 10s;
Broaden your defensive and offensive security knowledge across our curriculum:
Enabling SYN cookies and connection limits to survive volumetric floods.
Mitigating Layer 7 application DDoS and HTTP flood attacks.
How the TCP three-way handshake is abused in SYN flood denial of service.
Dissecting multi-vector amplification attacks and cloud scrubbing defenses.