A Slowloris attack is a denial-of-service (DoS) attack that targets web servers by opening multiple connections and keeping them open with partial HTTP requests, exhausting the server's connection pool. Created by Robert “RSnake” Hansen, it's named after the slow loris primate for its slow but steady approach to overwhelming servers.
The attack works by sending incomplete HTTP requests that never finish. The attacker continuously sends HTTP headers without completing the request, forcing the server to keep connections open indefinitely.
This method requires minimal bandwidth and can be launched from a single machine. Unlike traditional DDoS attacks, which require botnets, Slowloris operates efficiently with limited resources.
Web servers like Apache 1.x and 2.x are especially vulnerable because they maintain limited simultaneous connection pools. When these connections fill up with incomplete requests, legitimate users can't access the server. Testing tools like slowhttptest can simulate 1,000 concurrent connections to demonstrate how this attack works.
The signs of a Slowloris attack include slow server response times, connection timeouts for legitimate users, and server logs showing many long-lasting connections from the same IP addresses. These indicators help administrators identify when their servers are under attack and respond quickly.
Slowloris attacks remain a serious threat because they're easy to execute and hard to detect. The attack's low bandwidth requirements mean almost any attacker can launch one without specialized infrastructure, making protection essential for any web server handling public traffic.
What is a Slowloris attack?
A Slowloris attack is a type of denial-of-service (DoS) attack that targets web servers by opening multiple connections and keeping them alive with partial HTTP requests. This exhausts the server's connection pool, preventing legitimate users from accessing the service.
The attack works by sending incomplete HTTP headers slowly and continuously, without ever completing the request. This forces the server to keep connections open indefinitely.
What makes Slowloris particularly dangerous is its efficiency. It requires very low bandwidth and can be launched from a single machine. Unlike traditional DDoS attacks, it doesn't need a botnet to be effective.
How does a Slowloris attack work?
A Slowloris attack works by opening numerous connections to a target web server and maintaining them as long as possible through incomplete HTTP requests. The attacker sends partial HTTP headers slowly, never completing the requests. This forces the server to keep connections open while waiting for the remaining data to be received. Eventually, the server's connection pool is exhausted, and legitimate users are unable to access the service.
The attack exploits how web servers handle concurrent connections.
Most servers maintain a limited pool of connections to handle incoming requests. Slowloris opens hundreds or thousands of connections by sending a valid HTTP request header, then continuously sends additional headers at a slow rate (just enough to prevent the server from timing out). The server treats each connection as legitimate and keeps it open, waiting for the request to complete.
What makes Slowloris particularly effective is its efficiency. It requires minimal bandwidth and can run from a single machine, unlike traditional DDoS attacks, which typically rely on botnets. The attack sends valid HTTP traffic that appears legitimate, thereby bypassing many intrusion detection systems that only flag malformed packets. Web servers like Apache 1.x and Apache 2.x running the prefork or worker MPM are especially vulnerable, while the event MPM offers much better protection. Once the pool is exhausted, they can't handle new connections.
What are the main signs of a Slowloris attack?
Signs of a Slowloris attack refer to the observable indicators that a web server is experiencing this specific type of low-and-slow denial-of-service attack. The main signs of a Slowloris attack are listed below.
- Many slow connections: The server shows an unusually high number of simultaneous connections that remain open for extended periods. These connections appear legitimate, but never complete their HTTP requests.
- Exhausted connection pool: The web server reaches its maximum connection limit, preventing new legitimate users from establishing a connection. You'll see error messages about unavailable connections or timeout errors when trying to access the server.
- Partial HTTP requests: Server logs reveal numerous incomplete HTTP requests that lack essential headers or data. The requests look valid, but they never send the final double carriage return line feed (CRLF) that signals completion.
- Long connection durations: Individual connections stay open far longer than usual, often lasting minutes or hours instead of seconds. This differs sharply from typical web traffic patterns.
- Low bandwidth usage: Despite the denial-of-service attack, network bandwidth consumption remains minimal compared to traditional DDoS attacks. A single attacking machine can cause server failure without generating significant traffic volume.
- Single source connections: Multiple slow connections originate from the same IP address or a small group of addresses. This pattern contrasts with distributed attacks that spread across many different sources.
- Incomplete header transmission: The attacker sends HTTP headers one at a time with long delays between each header. The server waits patiently for the complete request that never arrives, tying up resources indefinitely.
What are the main impacts of Slowloris attacks?
The main impacts of Slowloris attacks refer to the consequences organizations and systems experience when targeted by this low-bandwidth denial-of-service attack method. The main impacts of Slowloris attacks are listed below.
- Service unavailability: Slowloris exhausts a web server's connection pool by maintaining many open connections with incomplete HTTP requests. Legitimate users can't access the service because the server has no available connections left to handle new requests.
- Resource exhaustion: The attack consumes server connection slots without requiring significant bandwidth or computing power from the attacker. A single machine can take down a web server that normally handles thousands of legitimate users.
- Revenue loss: Businesses lose income when their web services become inaccessible to customers during an attack. E-commerce sites, subscription services, and ad-supported platforms experience direct financial impact from every minute of downtime.
- Detection challenges: Slowloris sends partial but valid HTTP requests that appear legitimate to many security systems. Traditional intrusion detection systems often fail to identify the attack. The traffic doesn't contain malformed packets or obvious attack signatures.
- Operational disruption: IT teams must respond immediately to restore service, diverting resources from planned work and other priorities. The attack can continue for hours or days if proper mitigation measures are not in place.
- Infrastructure vulnerability exposure: Successful Slowloris attacks reveal weaknesses in server configurations and connection management. Organizations discover their web servers lack proper timeout settings, connection limits, or load balancing protections.
- Cascading failures: When a primary web server goes down, backup systems or dependent services may also fail if they aren't properly isolated. The attack can spread beyond the initial target to affect integrated systems and services.
How to detect a Slowloris attack
You can detect a Slowloris attack by monitoring for numerous slow, incomplete HTTP connections that remain open for far longer than usual, thereby consuming your server's connection pool.
First, check your web server logs for an unusually high number of concurrent connections from a small number of IP addresses. Look for connections that remain in an "established" state for extended periods (typically 10 minutes or more) without completing HTTP requests.
Next, monitor your server's connection pool usage to identify if you're approaching or hitting your maximum connection limit. When legitimate users can't connect but your logs show many open connections with minimal data transfer, you're likely under attack.
Then, analyze the HTTP request patterns in your access logs for incomplete requests that never receive a final carriage return line feed (CRLF) sequence. Slowloris attacks send partial headers repeatedly without completing requests, which creates distinct patterns in your logs.
Use network monitoring tools to track connection duration and data transfer rates per connection. Connections transferring less than 1KB over several minutes while sending periodic header data indicate Slowloris behavior.
Check for repetitive partial header patterns, such as "X-a: b," sent every 10-15 seconds from the same source IP addresses. These keep-alive packets are the signature of Slowloris attacks.
Finally, implement real-time monitoring that alerts you when connection duration averages exceed your baseline by 300% or more, or when connection pool usage stays above 80% for more than 5 minutes.
Set baseline metrics during regular traffic periods to quickly identify deviations. Knowing your typical connection duration and pool usage makes detection much faster when an attack begins.
How to prevent and mitigate Slowloris attacks
You can prevent and mitigate Slowloris attacks by implementing connection limits, configuring aggressive timeouts, and deploying reverse proxies or load balancers that buffer and filter incoming connections.
First, configure your web server to limit the number of connections per IP address. Set a reasonable cap, like 10-20 simultaneous connections. This prevents a single attacker from exhausting your entire connection pool while legitimate users can still browse normally.
Next, reduce connection timeout values to close idle or slow connections faster. Set timeouts between 5 and 15 seconds instead of the default 300 seconds. This forces incomplete requests to close before they tie up resources indefinitely.
Deploy a reverse proxy or load balancer in front of your web servers to act as a buffer between them and the end user. These systems can handle thousands of concurrent connections and filter out incomplete requests before they reach your backend servers.
Configure rate-limiting rules that monitor connection duration and request completion rates to ensure optimal performance. Block or throttle IP addresses that maintain many slow connections or repeatedly send incomplete HTTP headers without finishing requests.
Enable your web server's request header timeout settings to close connections that don't complete their headers within a specific timeframe. Apache users can enable the mod_reqtimeout module. nginx users can adjust the client_header_timeout value to 10-20 seconds.
Regularly monitor your server logs and connection states to detect any unusual patterns. Watch for many connections in ESTABLISHED or CLOSE_WAIT states from the same IP addresses. This indicates potential Slowloris activity.
Finally, consider switching to event-driven web servers, such as nginx or lighttpd, if you're currently running Apache. Test your defenses periodically with tools like slowhttptest to verify your configurations can withstand simulated attacks before real threats emerge.
What are the best tools to protect against Slowloris attacks?
The best tools to protect against Slowloris attacks are software solutions and configurations that detect, prevent, or mitigate low-and-slow HTTP denial-of-service attempts that exhaust server connection pools. Examples of these tools are listed below.
- Reverse proxy servers: Reverse proxies, such as nginx and HAProxy, buffer incoming connections before passing them to backend servers. This prevents incomplete requests from ever reaching your web server. These tools can handle thousands of slow connections without exhausting resources, making them highly effective against Slowloris attacks.
- Web application firewalls: WAFs monitor HTTP traffic patterns and identify suspicious connection behavior, like many incomplete requests from a single IP address. They block malicious traffic before it reaches your web server, protecting against Slowloris and similar attacks.
- Load balancers: Load balancers distribute traffic across multiple servers and enforce connection limits per IP address. This prevents any single source from exhausting server resources. They also provide timeout controls that close connections that don't complete requests within specified periods.
- Rate-limiting tools: Rate-limiting software restricts the number of concurrent connections from individual IP addresses or ranges. This prevents attackers from opening hundreds of slow connections. Tools like fail2ban and iptables can automatically block sources that exceed connection thresholds.
- Connection management modules: Server modules, such as mod_reqtimeout for Apache, set strict timeouts for receiving request headers and bodies, forcing slow connections to close. These modules protect at the web server level by rejecting incomplete requests that take too long to complete.
- DDoS mitigation services: Cloud-based DDoS protection services filter traffic before it reaches your infrastructure, providing a layer of protection. They identify and block Slowloris patterns across their global networks. These services can absorb large-scale attacks and protect against multiple attack vectors simultaneously.
- Server monitoring tools: Monitoring solutions like Netdata and Prometheus track connection counts, request durations, and server resource usage in real-time. They alert you to unusual patterns that indicate Slowloris attacks, enabling quick response before service degradation occurs.
What are the vulnerabilities that Slowloris attacks exploit?
Slowloris attacks exploit specific weaknesses in how web servers manage HTTP connections and allocate resources. Here are the key vulnerabilities:
- Limited connection pools: Web servers can only handle a fixed number of simultaneous connections. Slowloris fills all available slots with incomplete requests, blocking legitimate users from connecting.
- Default timeout settings: Many servers use long timeout values to accommodate slow network connections. Slowloris exploits these generous timeouts by keeping connections alive for extended periods without completing requests.
- HTTP protocol design: The HTTP protocol allows clients to send request headers line by line. Slowloris sends headers slowly and never completes the request, exploiting the server's expectation that the full request will eventually arrive.
- Lack of connection rate limiting: Servers without proper rate limiting accept connections from the same source without restriction. A single attacker machine can open hundreds or thousands of connections without triggering defensive measures.
- Incomplete request handling: Web servers must keep connections open while waiting for complete HTTP headers to be received. Slowloris sends partial headers that appear valid, preventing the server from closing these connections as malformed.
- Process- or thread-based architecture: Servers like Apache 1.x and 2.x, using the prefork or worker MPM, allocate one process or thread per connection. When Slowloris connections occupy all available slots, the server can't process new requests even though CPU and memory resources remain available. Event MPM handles many keep-alive connections asynchronously, reducing this vulnerability.
- Minimal traffic signatures: Slowloris generates legitimate-looking HTTP traffic at very low bandwidth. Traditional intrusion detection systems that look for high-volume attacks or malformed packets often miss these slow, valid-looking requests.
Frequently asked questions
What's the difference between Slowloris and other DDoS attacks?
Slowloris takes a different approach than most DDoS attacks. Instead of flooding targets with high-volume traffic, it uses minimal bandwidth to exhaust server connection pools through slow, incomplete HTTP requests.
Traditional DDoS attacks need botnets and massive bandwidth to overwhelm servers. Slowloris doesn't. It can take down a web server from a single machine by keeping hundreds of connections open indefinitely, making it both efficient and dangerous.
Can Slowloris attacks bypass CDN protection?
No, Slowloris attacks can't reliably bypass CDN protection. CDNs maintain their own connection pools and enforce strict timeout policies that prevent connection exhaustion at your origin server.
Which web servers are most vulnerable to Slowloris attacks?
Apache 1.x and 2.x web servers are particularly vulnerable to Slowloris attacks. They use a threaded connection model with limited connection pools that can't handle many slow, incomplete requests at once. In contrast, nginx, lighttpd, and IIS handle connections asynchronously, which makes them far more resistant to these attacks.
How much bandwidth does a Slowloris attack require?
Slowloris attacks require minimal bandwidth. They typically use less than 1 Mbps because they work differently from traditional floods. Instead of overwhelming your server with traffic, they send small, incomplete HTTP headers slowly across many persistent connections. This low-bandwidth approach makes them harder to detect while still taking down your server.
Is Slowloris still a relevant threat in 2025?
Yes, Slowloris remains a relevant threat in 2025. It requires minimal bandwidth to exhaust server connections and can bypass many standard intrusion detection systems that only look for malformed packets.
Can you trace the source of a Slowloris attack?
Tracing a Slowloris attack to its true source isn't reliably possible. Attackers easily spoof IP addresses and route traffic through proxies or VPNs to hide their location. You can identify the immediate connection IPs, but these typically lead to compromised machines or anonymization services rather than the actual attacker. The trail goes cold at these intermediary points.
What's the difference between Slowloris and slow POST attacks?
Both Slowloris and slow POST attacks exhaust server connection pools, but they target different phases of the HTTP request process. Slowloris keeps connections open by sending incomplete headers slowly, preventing the server from processing the request. Slow POST attacks work differently. They complete the headers normally, then send the request body at a crawl. Same goal, different approach.
Related articles
Subscribe to our newsletter
Get the latest industry trends, exclusive insights, and Gcore updates delivered straight to your inbox.