Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Mar 29, 2013 11:08 am 
Offline
Newbie

Joined: Mon May 03, 2004 7:37 pm
Posts: 3
Location: Chicago, IL, USA
The recent DDoS circus against Spamhaus and then CloudFlare was mostly executed by using open recursive DNS servers as traffic amplifiers. The Open Resolver Project has a list of IPv4 addresses they believe can be abused in that way to name and shame the offenders.

It appears that several are on Linode's network (e.g.). Have you thought about hunting down the offenders and... educating them about
Code:
allow-recursion { localhost; };
in BIND?

_________________
Lucas Bergman
Google Talk/Mail: lucas@bergmans.us


Top
   
PostPosted: Fri Mar 29, 2013 11:12 am 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
This is abuse@linode.com material - I'll forward it along to them.

Thanks,
-Chris


Top
   
PostPosted: Sat Mar 30, 2013 11:54 am 
Offline
Senior Member
User avatar

Joined: Wed Mar 17, 2004 4:11 pm
Posts: 554
Website: http://www.unixtastic.com
Location: Europe
I'll bet there are people who in all innocence don't know that their DNS servers should not offer recursive resolution to the world. Using recursive DNS servers to amplify DDOS attacks isn't something that a lot of DNS server admins would know about or expect.


Linode - How about scanning your netblocks for recursive DNS servers?


Top
   
PostPosted: Sat Mar 30, 2013 12:49 pm 
Offline
Senior Member

Joined: Mon Dec 07, 2009 6:46 am
Posts: 331
It's not just recursive. The 'ANY' request can also generate much bigger response than request. Granted, probably not two orders of magnitude greater like the recursive one, but still. Esp. if the requested domain has lots of subdomains, DKIM, ...

Unlike recursive, which is just a matter of a simple config entry, AFAIK blocking ANY requests in Bind can only be done at the firewall level, so it's not something a simple perusal of the config file and docs would mention.


Top
   
PostPosted: Sat Mar 30, 2013 3:14 pm 
Offline
Senior Member
User avatar

Joined: Wed Mar 17, 2004 4:11 pm
Posts: 554
Website: http://www.unixtastic.com
Location: Europe
Azathoth wrote:
It's not just recursive. The 'ANY' request can also generate much bigger response than request. Granted, probably not two orders of magnitude greater like the recursive one, but still. Esp. if the requested domain has lots of subdomains, DKIM, ...

Unlike recursive, which is just a matter of a simple config entry, AFAIK blocking ANY requests in Bind can only be done at the firewall level, so it's not something a simple perusal of the config file and docs would mention.


First shutdown the recursive servers that offer service to the whole Internet, then worry about ANY queries.

It should be easy enough to hack bind so it just drops these queries. What's the legitimate use of ANY queries anyway?


Top
   
PostPosted: Sat Mar 30, 2013 9:23 pm 
Offline
Senior Member

Joined: Sat May 03, 2008 4:01 pm
Posts: 567
Website: http://www.mattnordhoff.com/
sednet wrote:
It should be easy enough to hack bind so it just drops these queries. What's the legitimate use of ANY queries anyway?

I see some clients that do ANY queries for my nameservers' hostnames to save themselves the trouble of doing separate AAAA and A queries. I don't know what the result of dropping those queries would be, but it might not be good.

Edit: By the way, I looked up two of the Linode /24s I'm on in the Open Recursive Project. One didn't have any results, the other had 9. Of them, 3-4 were real open resolvers; the others were apparently authoritative servers that unhelpfully returned . NS in response to strange queries.

Edit: Also by the way, SoftLayer/The Planet, where Linode colos in Dallas, is one of the top ASNs for open resolvers. Linode is a -- presumably small -- part of that.

_________________
Matt Nordhoff (aka Peng on IRC)


Top
   
PostPosted: Sat Mar 30, 2013 9:30 pm 
Offline
Senior Member

Joined: Fri Dec 10, 2010 6:21 am
Posts: 144
mnordhoff wrote:
sednet wrote:
It should be easy enough to hack bind so it just drops these queries. What's the legitimate use of ANY queries anyway?

I see some clients that do ANY queries for my nameservers' hostnames to save themselves the trouble of doing separate AAAA and A queries. I don't know what the result of dropping those queries would be, but it might not be good.


That in itself seems like a potentially flawed solution. One fundamental problem with that is that if you send an ANY query to a caching server it can just answer with whatever it has in its cache for the requested name (eg just AAAA even though there is an A record in the actual zone, just not in the cache).
With that in mind I really don't see ANY as particularly useful in reality.


Top
   
PostPosted: Sat Mar 30, 2013 9:41 pm 
Offline
Senior Member

Joined: Sat May 03, 2008 4:01 pm
Posts: 567
Website: http://www.mattnordhoff.com/
hawk7000 wrote:
That in itself seems like a potentially flawed solution. One fundamental problem with that is that if you send an ANY query to a caching server it can just answer with whatever it has in its cache for the requested name (eg just AAAA even though there is an A record in the actual zone, just not in the cache).

I was referring to my authoritative servers. People who misuse recursive servers as authoritative deserve what they get.

hawk7000 wrote:
With that in mind I really don't see ANY as particularly useful in reality.

We live in reality, and it's being used. Edit: Whether or not these clients are being smart is not the point. Whether or not it's worth risking breaking them is.

_________________
Matt Nordhoff (aka Peng on IRC)


Top
   
PostPosted: Sat Mar 30, 2013 10:06 pm 
Offline
Senior Member

Joined: Mon Dec 07, 2009 6:46 am
Posts: 331
mnordhoff wrote:
sednet wrote:
It should be easy enough to hack bind so it just drops these queries. What's the legitimate use of ANY queries anyway?

I see some clients that do ANY queries for my nameservers' hostnames to save themselves the trouble of doing separate AAAA and A queries. I don't know what the result of dropping those queries would be, but it might not be good.


I've been running a couple of authoritative nameservers for months and the only requests for ANY came from what appeared to be DNS amplification attacks against some chinese IPs. I've been filtering them at the firewall level for months and never saw any service impaired or a client complaining.

Then again perhaps the right thing to do is to ratelimit, so you allow ANY but not in a way that could be used as an attack.


Top
   
PostPosted: Sat Mar 30, 2013 11:34 pm 
Offline
Newbie

Joined: Mon May 03, 2004 7:37 pm
Posts: 3
Location: Chicago, IL, USA
I've been running authoritative DNS servers for ages, first with djbdns and now with BIND 9, and I haven't seen much recent traffic for ANY queries other than something that looked like a brain-damaged penetration brute-force.

Still, I'd feel better if I were rate limiting. Is the state of the art for that still "download some stale patch file and build BIND from source?"

_________________
Lucas Bergman
Google Talk/Mail: lucas@bergmans.us


Top
   
PostPosted: Sun Mar 31, 2013 2:58 am 
Offline
Senior Member
User avatar

Joined: Wed Mar 17, 2004 4:11 pm
Posts: 554
Website: http://www.unixtastic.com
Location: Europe
lucas wrote:
I've been running authoritative DNS servers for ages, first with djbdns and now with BIND 9, and I haven't seen much recent traffic for ANY queries other than something that looked like a brain-damaged penetration brute-force.

Still, I'd feel better if I were rate limiting. Is the state of the art for that still "download some stale patch file and build BIND from source?"


I've seen some ANY request madness but no serious amounts of traffic.

You can rate limit with iptables, there is no need to hack bind for that. It looks easy enough to use the hashlimit module to block access to a /24 for a short time if it sends you too many queries in a short time. This will have costs in kernel memory and will possibly block misbehaving but still valid queries. I've never had to do it.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group