
Lead Image © Russell Shively, 123RF.com
Denial of service defense
Putting On the Brakes
The Hypertext Transfer Protocol (HTTP) forms the foundation for communication between web browsers and web servers. Slowloris [1] initially follows the usual procedure of an HTTP connection, but then disrupts processing of the request by sending an incomplete HTTP request at a very slow speed, as follows: (1) Slowloris uses TCP to open a client connection to the target server; (2) instead of sending a full HTTP request directly to the server, Slowloris begins a request and then continuously, but very slowly, adds headers without ever completing the request; (3) the server fields all of the header data and waits for the request to complete, keeping the connection alive; and finally, (4) because the server can only process a limited number of simultaneous connections, a large number of slow connections render the server unable to accept connections from other clients.
Immune Out of the Box
Not all modern web servers are susceptible to Slowloris attacks. The default configuration of today's most commonly used web server, NGINX, is basically immune, not just because of the settings, but because of the server architecture. NGINX uses an event-oriented asynchronous architecture that, above all, does not maintain a thread to handle each open connection and only needs a minimal amount of memory for each connection.
The client_header_timeout
and client_body_timeout
configuration options let you tell NGINX the intervals at which a client needs to send data when opening a connection. If the client fails to keep pace, NGINX responds with a timeout error with HTTP error code 408. However, this also means that you could make the NGINX server even more vulnerable if you configure it incorrectly.
The best-known web server besides Microsoft's Internet Information Server (IIS; which is rarely used and has a market share
...Buy this article as PDF
(incl. VAT)
Buy ADMIN Magazine
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Most Popular
Support Our Work
ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.
