18 ms·
Slowloris - the low bandwidth, yet greedy and poisonous HTTP client
- cleverjake 16y agoI saw slowloris over at hack a day last year, its really neat. I brought down my 100MBit server with 8 gigs of ram in about 30 seconds from a 1MBit connection 8 hops away. Theres a python implementation called pyloris - http://motomastyle.com/pyloris/ http://motomastyle.com/pyloris/
- someone_here 16y agocleverjake: You're being censored. All your comments are dead on arrival.
- drivebyacct2 16y agoAnd from the looks of it, for submitting a link to a YouTube video.
- Estragon 16y agoThis is a really disturbing characteristic of Hacker News moderation. The people it happens to must feel like Bruce Willis in The Sixth Sense, when they realize it. Why not let them know??
- drivebyacct2 16y agoI'll be honest, and hope that my comments and honesty don't earn me the silent treatment. I am iteration 2 of a formerly silenced commenter. I learned a lesson or two and consider my comments more carefully before I post them, but it was infuriating to find out that 2 weeks worth of interesting comments weren't receiving responses because no one was reading them.
- alex_c 16y agoI am surprised you stuck around, to be honest. I'm not sure I would have, and I'm sure many don't. Could be argued that's the point, but it doesn't feel quite right.
- eli 16y agoThere's a term for it, but I'm blanking on it. I believe the idea is that it's for people who are legit trolls. If you let them know, they'll just create another account. But if they think people have just grown tired of their antics, they're more likely to move on to another site.
- nailer 16y agoWhat was the video?
- almost 16y ago"Kirby is Racist" apparently. It doesn't sound like the ideal Hacker News submission exactly!
- rorymarinich 16y agoThat's because either Paul or one of the mods hellbanned him. When you're banned on Hacker News, you don't get told, because that would make you get a new account and start posting without having learnt your lesson. So instead they just auto-kill your comments to prevent other people from seeing what you're doing. (Sometimes they're polite and email you to let you know you've been banned, which is nice of them. Other times they just let you keep posting away to nobody.)
- Dylan16807 16y agoSomething that took me a long time to find out about was going into settings and turning on show dead. Surprising what you can find.
- brianpan 16y agoOh my! Hacker News is littered with dead, exposed bodies! I never knew what any of the setting were. Well, what do you know. Those are documented in the FAQ. You'd think that the explanations would be near where you use them!
- wnoise 16y agoIt'd be really nice if karma could be earned on comments from autokilled users, and eventually undo that. The permaban seems excessive in maybe about half the users I see.
- forza 16y agoWhile interesting, this attack is old. A newer "variation" on this is with HTTP POST instead of headers. http://www.darkreading.com/vulnerability-management/167901026/security/attacks-breaches/228000532/index.html http://www.darkreading.com/vulnerability-management/16790102... http://www.owasp.org/images/4/43/Layer_7_DDOS.pdf http://www.owasp.org/images/4/43/Layer_7_DDOS.pdf
- signa11 16y agoyes that is exactly right. micahl-zalewski and adrian-llarion reported it here : http://www.securityfocus.com/archive/1/456339/30/0/threaded http://www.securityfocus.com/archive/1/456339/30/0/threaded, nevertheless, it definitely _is_ very interesting
- liuliu 16y agoI guess this is the example why you should guard your own home-baked HTTP server behind nginx or lighttpd.
- marcinw 16y agoRight, because nginx and lighttpd aren't easier to exploit. /sarcasm
- tkaemming 16y agoThey (nginx, lighttpd) are more difficult to exploit, especially when used to buffer requests to a heavier upstream server like Apache. EDIT (Clarification): They (nginx, lighttpd) are more difficult — although not impossible — to exploit, especially when used to buffer requests to a heavier upstream server like Apache. Specifically, they are typically able to handle many more connections than your application server would be able to (as long as they are properly configured), without the incurring the resource overhead of your application server by bufferring the HTTP request/response.
- marcinw 16y agoNice job editing your comment without saying so (" -- although not impossible --" and your last paragraph). Anyway, your nginx/lighttpd server is more likely to be exploited and compromised via an actual vulnerability rather than your Apache server via a slowloris-style attack. It's akin to putting a wide receiver in front of your runningbacks...
- FooBarWidget 16y agoI am not aware of Nginx having a bad security track record.
- tkaemming 16y agoI updated the original comment w/ the original and updated text. Sorry if you saw this as inappropriate — I had updated it before it was upvoted and thought it only clarified the points, not changed it. Regardless, many deployments use this same technique for just this reason (to avoid spoonfeeding slower clients responses). How is this any more risky than running Apache up front, barring configuration errors (which could just as easily happen with any other server software)?
- hackermom 16y agoIt's important to note that you can protect against Slowloris itself not only by the various apache modules available specifically for Slowloris and specifically for this kind of HTTP attack, but also through Apache's native configuration settings that (among others) govern the number of simultaneous connections any single IP is allowed to have. Slowloris itself is not much different in terms of the effect it has on the HTTPd than a script pulling data from the server using curl or wget.
- ZoFreX 16y agoI don't know how the Apache modules to guard against Slowloris work, but I can think of a modified attack that would still work if connections per IP were limited. You can't limit connections per IP to just one, as browsers will pipeline requests, they may have multiple tabs open, asynchronous requests, &c . . . 256 is obviously very high, let's say you set the limit to 10 simultaneous requests per IP. It's now impossible for a user to Slowloris your webserver, but they only need to get hold of 26 separate IP addresses to be able to once more. Depending on your setup, this may be far less than they would need for a naive DDOS attack. I think a way to mitigate both attacks would be to limit how long the client can send headers for (and perhaps refuse connections for X amount of time if a client repeatedly acts in a way that appears malicious, but that's possibly beyond the scope of "native configuration").
- IgorPartola 16y agoFirst off, as others have pointed out you can successfully run thousands of threads, so the default 256 does not mean much. Also, HTTP pipelining is not what you think it is: http://en.wikipedia.org/wiki/HTTP_pipelining http://en.wikipedia.org/wiki/HTTP_pipelining
- ZoFreX 16y agoI know, I was one of those people - I just wasn't sure if Apache can do that well, I know of other servers that can. And yes, you are correct, that's what I get for posting when tired - I meant simultaneous requests!
- nailer 16y agoI wish they could have picked a better name - 'Slowlaris' (note minor spelling difference) has been a colloquial name for the older, but more common versions of Solaris, due to the badly performing IP stack for some time. That said, Slowloris wins a Googlefight these days: http://www.googlefight.com/index.php?lang=en_GB&word1=slowlaris&word2=slowloris http://www.googlefight.com/index.php?lang=en_GB&word1=sl...
- FooBarWidget 16y agoI dispute the notion that Slowloris's behavior should be considered an "attack". If your server is hammered by tens of thousands of visitors who are on slow links - say modems or 2G wireless links - then you will have the same problem. The real problem if you ask me is the limited amount of I/O concurrency that multi-threaded and multi-process servers can have. Pretty much the only practical solution for this right now is by using evented I/O. The problem can also be solved by putting the web server behind an evented, buffering reverse proxy and fully buffers both the request and the response. This shields Apache from slow requests. Maybe some time in the future operating systems will be able to handle millions of operating system threads easily but we're not there yet.
- ZoFreX 16y agoThe default thread count for Apache is 256 is it not? I know we can't handle millions (and I can't speak for how Apache itself with threads) but servers running thousands of threads are not only possible, but exist and work well. Whichever way you do it (threads or events) at some point you will hit a limit. I see Slowloris as an "attack amplifier" - it's a way to do a lot more damage with N connections than a straightforward DDOS. In some situations, it's possible to deny access to a server with just just one.
- jamesaguilar 16y ago> The real problem if you ask me is the limited amount of I/O concurrency that multi-threaded and multi-process servers can have. Pretty much the only practical solution for this right now is by using evented I/O. Why do you think that? What constraints do you believe limit the number of threads you can use? - An idle thread is essentially free. - The memory used by an ongoing request should not be inherently different between an evented server and a threaded server. - The number of sockets an evented server can use is the same as the number of sockets available to a threaded server. If evented servers are handling this better, all it shows in my opinion is that the threaded servers have been written incorrectly or else configured incorrectly. But that is not an inherent benefit of evented servers. Please correct me if there is a constraint I am missing.
- 16y ago
- epoxyhockey 16y agoAnyone try this out on a Varnish setup?
- epoxyhockey 16y agoI just tried this on my stock Varnish config and the site was still responding to requests. So, Varnish can be added to the list of 'not affected.'
- medina 16y agoSee also "A. Kuzmanovic and E. W. Knightly. Low-Rate TCP-Targeted Denial of Service Attacks (The Shrew vs. the Mice and Elephants). In Proc. ACM SIGCOMM, 2003." and related papers -- http://www.cs.northwestern.edu/~akuzma/rice/shrew/ http://www.cs.northwestern.edu/~akuzma/rice/shrew/
- nwmcsween 16y agoApache has many differing mpms - you can use an evented mpm similar to how nginx handles connections. Anyways since this 'attack' is making a full tcp connection a simple fix would be to limit the amount of full tcp connections from one source.. or if you feel particularly evil add it to a blacklist of tarpitted connections and then reverse DOS the attacker.