Hacker News new | past | comments | ask | show | jobs | submit login
The penultimate guide to stopping a DDoS attack – A new approach (unixy.net)
43 points by konradc on Aug 25, 2010 | hide | past | favorite | 44 comments



This is roughly the same approach used by the DDoS mitigation services; you run your servers on an unpublished address and front it on their address space.

I like that they've got the ghetto version of the technique documented. Better that you should rig this up on a couple VM hosting providers for a few hundred bucks than that you spend tens of thousands of dollars to get the same level of service from someone with slick marketing.

The obvious problem here is that it's hard to keep a determined attacker from finding your real address space, and as soon as that happens, you're done; attackers just skip the DNS and whack you directly.

This is a useful trick, but it's not the end of the story.


I'm interested in how you think an attacker would find your address - at least, presuming you have a web-only [1] host on a competently-run [2] network that drops anything but requests from the proxies [3].

Of course, there are (D)DoS attacks that don't consist of sending lots of bits/packets at a host, and this does assume you're hiring a dedicated server or somesuch.

Of course, they could try to sniff network traffic at one of the providers/on the backbone/..., but that's a lot harder to carry out than a basic DDoS attack.

[1] E.g. don't try to receive e-mail at this host while it's being attacked; you'll need to point an MX record at it, which pretty much defeats the purpose. [2] IP spoofing will break the next defense; if the entire provider can be taken down, you have serious problems. [3] If you accept all traffic, nmap/curl will easily find the host, after which the attack resumes. For bonus points, serve up an uninteresting-looking page.


I hate to be pedantic, but "penultimate" means "second last", which doesn't seem to be the intended use here.


That's funny. The only reason I checked the comments is to see if I was the only one that caught this. :)


I just figured the "ultimate" guide is to unplug from the internet.


It could simply be that it is the penultimate guide for the time being. They know full well someone may come along and best it.


It's not being pedantic. The word was used incorrectly, as that word often is. It's worth correcting so the author and others are made aware.


btw in Italian the only way to say "second last" is "penultimo" and I guess in most other european languages should sound the same, so a lot of non mother tongue English readers are going to read this as "second last" anyway, completely missing the "very ultimate" (mis)meaning.


The Romance languages do not make a majority of the European languages, and I would expect your comment to only hold for Romance languages.

That said, the only person I ever heard use the word correctly in person was a Brazilian. I don't think that is a coincidence.


ack, sorry I meant "most romance languages".


The "ultimate guide to x" would have sound to pretentious, so to be humble and as an attempt to humor they choose this title (usually a guide is "ultimate" until a next and better guide come out). Seems a reasonable explanation...


I thought that seemed awkward. What do you think they intend to mean?


My guess is "ultimate". Admittedly, "penultimate" is a cooler-sounding word.


All words are cool if you don't know what they mean. If the reader knows what it means but the writer doesn't, the effects are less predictable and desirable.


I disagree. I don't know what "venial" means, but I don't think it sounds as cool as "penultimate" :-)


well not knowing what venial means is venial after all.


I'd upvote you, but then you'd know I was lying (which isn't as venial).


Penultimate has this in common with "literally". It's most often misused to mean the opposite of what's intended.

Cue Inigo Montoya.


I'm not entirely sure if "next-to-last" and "last" can be described as opposites, though :-)


Well, there is this: Opposites are a tricky concept, not well-defined in most domains. Your implication is that the opposite of last is "first". But doesn't it make at least as much sense to say the opposite of last is "not last"? From a programing/math standpoint, it seems like a strictly better, less arbitrary definition.


Ultimate? :)


Something missing from the cost calculation in this article is the cost of bandwidth used for each VM. The VM itself may be low cost but at 100Mbps you will use about 1TB of bandwidth a day. You would need to select your VM provider with that in mind. A sustained attack could end up being fairly expensive.


A good point, but I think part of the implied logic here is that if your defenses work, attackers will give up early.


Why would an attacker give up? The site may stay online but you are still having to pay thousands of dollars+ in bandwidth costs. It seems like a win-win for the attacker.


Because they can't see a site paying thousands of dollars, and they can see a site going down, and they're going to invest their attention in things they can see.

If they were thinking rationally about what they were doing, they'd (a) be demanding money to let up, and (b) breezing right past DNS-based defenses like this.


The attacker has limited resources too, if only because they could be attacking other hosts that drop more easily.


" Just be sure to set high TTL for the records so your DNS server does not collapse under the enormous volume."

The attacker, noticing your round-robin approach, decides to drop the DNS server and then only has one host to deal with.

There are a lot of weak points that can be attacked. Certain sites will have features that can be taken advantage of. If you have a long timeout/keepalive, the attacker could launch lots of quick requests with no proper tear-down. If you have a zillion servers setup like this - perhaps they can take out a major link before the traffic even gets to you.

I also don't think this is a new approach - unfortunately it is much harder to stop attacks than to create various approaches. The number of compromised machines is just too high - that is the ultimate solution.


Are people actually seeing their DNS servers collapse under load? DNS servers --- even BIND, which, don't use BIND --- are very, very fast.


Compared to HTTP DNS is crazy cheap to serve, but you'll still end up bottlenecking on the pps rate of your NIC and OS. Everybody optimizes for high throughput and ignores small packets.

Speaking of DNS DDoS, DNS Made Easy saw a 40Gbit DNS DDoS a few weeks back.


Not to mention that the attacker's DNS resolver could merely ignore the TTL and bombard your DNS server - if that's the weakest link, why even bother with the rest?


Because quite a few companies outsource DNS, and attacking a DNS provider involves many companies. Not to mention the fact that most DNS providers have been attacked before...


Timeouts would presumably be taken care of when setting up the proxies. Major DNS providers are used to getting DDoS'ed, and will typically be fine (not always, but it's a lot harder to drop them than to drop any random server).

I agree that there's probably a way to break things; but an attacker would need to actually do some work for most of them (e.g. create lots of accounts?)


Trying to categorize all DDoS together is nonsense. The scale and type of the attack depend on the attacker's means and motivations. How would unixy.net have blocked the following attack? http://www.csoonline.com/article/220336/how-a-bookmaker-and-...

DDoS attacks make the most sense for the attacker when they are an extortion attempt. The economics works in favor of the attacker. It costs the site dearly to be down, and they set a price that makes sense based on your site. Unfortunately, you may not hear about a lot of these attacks, and the attacker is never found or can't be arrested.

unixy.net sells DDoS insurance. You never know if the insurance policy was worth the monthly payments until an attack happens.

Note: I've never used unixy.net and can't speak to their effectiveness, but I don't like how they grossly oversimplify a complex problem


unixy.net doesn't sell DDoS insurance. They're not in the DDoS business at all. Check their portal.

Best


I do find it ironic for a hosting company to post that their DDoS strategy is to offload the load on other hosting companies.

They're talking about $5-10/month VPSes and want them to handle 100Mbps each? Sure those providers love that traffic.


Meh, if the traffic only lasts a couple of hours before the attacker gives up, the VPS provider could still make a tidy profit - it's not like the VPS would do much for the rest of the month...


Using a CDN service with ESI support handling all external hits can be even better.


The second-to-last guide? What's the last one?


"The individual or groups that conduct the DDoS attacks are most of the time hired to complete the job."

Purely out of curiosity, how do people go about finding such nefarious characters?


The answer was in the article.


Dang it, thanks. Will have to read more closely after work.


The sysctl.conf settings are bad.. like never ran a high end server bad. 1. tcp syncookies slows down connections considerably 2. rp_filter takes up a large amount of cpu time. 3. kernel.pid_max net.ipv4.ip_local_port_range is useless. Also this doesn't stop a DDOS attack, it mitigates it by having a bigger pipe than the bad guy. A real way to mitigate attacks is to 1. identify an attack based on history 2. make damn sure it's an attack 3. 'tarpiting' attacks (xtables-addons for linux). Tarpiting keeps connections in an open state on the client side thus eventually crashing the client.


This advice is very bad. Yes, I'm certain you can make a server go faster by disabling some security features, but without syncookies you're one SYN flood away from a painful crash.

Your "mitigation" is also useless - yes, tarpitting for antispam purposes can work, but a specialized DDoS tool likely uses raw socket access (i.e. the OS doesn't keep track of the connections). If you can't take the number of bits/packets thrown at you, you will be unreachable. And even if not - we're still talking about 10,000 machines talking to your one server. The bad guys have a lot more memory.


Security features? I will bet no give you a large sum of cash if you can show me that a server under a large pps DDOS survives with rp_filter and syncookies on with iptables on and without any crazy tcp modifications. In the real world there are no "specialized DDOS tools" most viruses are simple. EDIT: Why would you use a single server? Why on gods earth would you track tarpitted connections?




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: