What Is a Slowloris Attack? How Slow HTTP DoS Works and How to Stop It

Slowloris is a low-bandwidth, layer 7 denial-of-service attack. The attacker opens many connections to a web server and keeps each one alive by sending an HTTP request very slowly, never finishing the headers. Servers that dedicate a thread or process to every open connection run out of workers, so real visitors cannot connect, even though traffic volume stays tiny.

May 26, 2025 - 11:50
Updated: 
102.7k

Network Security in Cybersecurity & Ethical Hacking · Tutorial

Ethical Hacking, Cybersecurity Careers & Certifications

What Is a Slowloris Attack? How Slow HTTP DoS Works and How to Stop It

Quick answer: Slowloris is a low-bandwidth, layer 7 denial-of-service attack. The attacker opens many connections to a web server and keeps each one alive by sending an HTTP request very slowly, never finishing the headers. Servers that dedicate a thread or process to every open connection run out of workers, so real visitors cannot connect, even though traffic volume stays tiny. Apache httpd was the classic target (CVE-2007-6750). The fix is to limit how long a client may take to send headers and body, cap connections per IP, and place an event-driven reverse proxy, load balancer or CDN in front of the server.

Key takeaways

  • Slowloris exhausts connections, not bandwidth.
  • A single machine can affect a poorly configured thread-per-connection server.
  • Request timeouts such as Apache mod_reqtimeout are the main defence.
  • Event-driven proxies and CDNs buffer slow clients before they reach the app.
  • Monitor for many long-lived, incomplete connections from few sources.

Table of Contents

How Does a Slowloris Attack Work?

Under HTTP semantics, a request header block ends with an empty line. Until the server sees that empty line, it waits. Slowloris abuses the wait: it starts a request, then sends one extra header line every few seconds, just before the server would give up. Each connection looks alive, so the server keeps a worker reserved for it. Once every worker is busy, new legitimate requests queue or fail. MITRE classifies this as service exhaustion (T1499.002).

Because the traffic is small and uses valid TCP handshakes, simple bandwidth alarms rarely notice it.

Which Web Servers Are Affected?

CVE-2007-6750 records that Apache HTTP Server 1.x and 2.x could be taken offline by partial HTTP requests, and notes mod_reqtimeout was added in version 2.2.15. Risk depends on architecture more than brand:

Server modelExamplesSlowloris exposure
Thread or process per connectionApache prefork or worker MPM, some app serversHigh without timeouts
Event-drivenNginx, Apache event MPM, HAProxyLower, but still needs limits
Managed edgeCDN or cloud load balancerLow; edge absorbs slow clients
  • Slow POST (often called RUDY): headers arrive normally, but the declared request body is sent a byte at a time.
  • Slow read: the client accepts the response extremely slowly by advertising a tiny TCP receive window.
  • HTTP/2 stream abuse: later flaws abused stream handling in a similar resource-holding spirit.

All three hold server resources open for as long as possible with little traffic.

How Can You Detect a Slowloris Attack?

  • Worker or connection counts at their maximum while CPU and bandwidth stay low.
  • Many connections from a few IPs in a reading-request state.
  • Error log entries for request header timeouts (HTTP 408).

On Linux, count established connections to port 443 per remote address:

ss -Htn state established '( sport = :443 )' | awk '{print $4}' | cut -d: -f1 | sort | uniq -c | sort -rn | head

On Apache, mod_status shows workers stuck in the R (reading request) state.

How Do You Mitigate Slowloris?

Apache's mod_reqtimeout sets a deadline for headers and body and a minimum data rate:

<IfModule reqtimeout_module>
  RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500
</IfModule>

For Nginx, keep header and body timeouts short and limit connections per address:

client_header_timeout 10s;
client_body_timeout   10s;
limit_conn_zone $binary_remote_addr zone=peraddr:10m;
limit_conn peraddr 20;

Other steps from the OWASP Denial of Service Cheat Sheet: switch Apache to the event MPM, put a reverse proxy or load balancer in front, use a CDN with DDoS protection, and set per-IP connection limits in the firewall. Test settings on staging so slow mobile users are not cut off.

How Does Slowloris Compare With Volumetric DDoS?

AttributeSlowlorisVolumetric flood
Layer7 (HTTP)3 and 4 (network)
Traffic neededVery lowVery high
Resource exhaustedServer connectionsLink bandwidth
Main defenceTimeouts, proxies, limitsUpstream scrubbing, CDN

For the volumetric side, see our analysis of a 7.3 Tbps DDoS attack and the guide to layer 7 threats.

What Should You Do During an Attack?

  1. Confirm the pattern: full workers, low bandwidth, many slow connections.
  2. Tighten timeouts and connection limits; block abusive source ranges.
  3. Enable your CDN or provider DDoS protection.
  4. Keep logs; in India, report notifiable incidents to CERT-In within 6 hours, and follow the steps in CISA DDoS guidance.

Running slow HTTP tests against systems you do not own is illegal under Sections 43 and 66 of the IT Act 2000; test only with written authorisation. WebAsha offers web server hardening training.

References

Frequently Asked Questions

Slowloris is a layer 7 denial-of-service attack that keeps many HTTP connections open by sending request headers extremely slowly, exhausting server workers.

It uses very little bandwidth and valid TCP connections, so volume-based alarms often miss it until the server stops answering real users.

Nginx is event-driven and far more resistant than thread-per-connection servers, but it still needs short timeouts and per-IP connection limits.

CVE-2007-6750 describes Apache HTTP Server 1.x and 2.x being taken offline by partial HTTP requests, with mod_reqtimeout added in 2.2.15.

It sets maximum times and minimum data rates for receiving request headers and bodies, closing connections from clients that send too slowly.

A slow POST, often called RUDY, sends normal headers but delivers the request body very slowly to hold the connection open.

Yes, in most cases. A CDN or reverse proxy holds slow client connections at the edge and only forwards complete requests to your origin.

Only on systems you own or have written permission to test. Unauthorised denial-of-service testing is an offence under India’s IT Act 2000.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Wow Wow 0
Sad Sad 0
Angry Angry 0
Vaishnavi

Vaishnavi is a skilled tech professional at the Ethical Hacking Training Institute in Pune, responsible for managing and optimizing the technical infrastructure that supports advanced cybersecurity education. With deep expertise in network security, backend operations, and system performance, she ensures that practical labs, online modules, and assessments run smoothly and securely. Her behind-the-scenes contributions play a vital role in delivering a seamless and secure learning experience for aspiring ethical hackers.