My DNS in under attack for two weeks already. This comes from the IP address daily several times per second:
Feb 17 19:44:32 angel named[14025]: client 62.109.4.89#8639: query (cache) './NS/IN' denied
Feb 17 19:44:35 angel named[14025]: client 62.109.4.89#49699: query (cache) './NS/IN' denied
Feb 17 19:44:35 angel named[14025]: client 62.109.4.89#45419: query (cache) './NS/IN' denied
Feb 17 19:44:38 angel named[14025]: client 62.109.4.89#49667: query (cache) './NS/IN' denied
Feb 17 19:44:38 angel named[14025]: client 62.109.4.89#56759: query (cache) './NS/IN' denied
Feb 17 19:44:42 angel named[14025]: client 62.109.4.89#11347: query (cache) './NS/IN' denied
Feb 17 19:44:42 angel named[14025]: client 62.109.4.89#58937: query (cache) './NS/IN' denied
Feb 17 19:44:44 angel named[14025]: client 62.109.4.89#45638: query (cache) './NS/IN' denied
Feb 17 19:44:44 angel named[14025]: client 62.109.4.89#35305: query (cache) './NS/IN' denied
Feb 17 19:44:48 angel named[14025]: client 62.109.4.89#1079: query (cache) './NS/IN' denied
Feb 17 19:44:48 angel named[14025]: client 62.109.4.89#58384: query (cache) './NS/IN' denied
I ban it and next day it comes from another unrelated address. Stupid and contr–productive.
Comments
On my server, these requests are denied anyway and so don't do any harm (except for the log spam).
I've googled a bit and found those pages:
http://www.linuxquestions.org/questions/linux-security-4/dns-poisoning-attempts-i-think-629574/
http://www.uno-code.com/?q=node/160
http://isc.sans.org/diary.html?storyid=5713
Feb 19 17:12:23 asdlkf named[12647]: client 62.109.4.89#28072: query (cache) './NS/IN' denied
Feb 19 17:12:23 asdlkf named[12647]: client 62.109.4.89#63212: query (cache) './NS/IN' denied
Feb 19 17:12:24 asdlkf named[12647]: client 62.109.4.89#41805: query (cache) './NS/IN' denied
Feb 19 17:12:26 asdlkf named[12647]: client 62.109.4.89#39283: query (cache) './NS/IN' denied
email me (asdlkf@asdlkf.net) if you find anything on this.
-- Chris
This is an automated botnet.
I checked the logs, issued a blocking IPTABLES command, then checked the logs again.
3 messages were duplicated, 6 NEW attack lines and (1 unrelated php error message) appeared.
You can see that there is a 47 second delay between the last 62.*.*.* entry and the first 195 entry.
Feb 19 17:36:47 # cat /var/log/syslog | tail -n 10
Feb 19 17:36:35 asdlkf named[12647]: client 62.109.4.89#53520: query (cache) './NS/IN' denied
Feb 19 17:36:36 asdlkf named[12647]: client 62.109.4.89#59695: query (cache) './NS/IN' denied
Feb 19 17:36:37 asdlkf named[12647]: client 62.109.4.89#23130: query (cache) './NS/IN' denied
Feb 19 17:36:40 asdlkf named[12647]: client 62.109.4.89#48491: query (cache) './NS/IN' denied
Feb 19 17:36:40 asdlkf named[12647]: client 62.109.4.89#10510: query (cache) './NS/IN' denied
Feb 19 17:36:41 asdlkf named[12647]: client 62.109.4.89#20783: query (cache) './NS/IN' denied
Feb 19 17:36:43 asdlkf named[12647]: client 62.109.4.89#1683: query (cache) './NS/IN' denied
Feb 19 17:36:46 asdlkf named[12647]: client 62.109.4.89#36861: query (cache) './NS/IN' denied
Feb 19 17:36:46 asdlkf named[12647]: client 62.109.4.89#46596: query (cache) './NS/IN' denied
Feb 19 17:36:47 asdlkf named[12647]: client 62.109.4.89#16273: query (cache) './NS/IN' denied
Feb 19 17:36:48 # iptables -A INPUT --source 62.109.4.89 -p UDP -j DROP
Feb 19 17:42:48 # cat /var/log/syslog | tail -n 10
Feb 19 17:36:46 asdlkf named[12647]: client 62.109.4.89#36861: query (cache) './NS/IN' denied
Feb 19 17:36:46 asdlkf named[12647]: client 62.109.4.89#46596: query (cache) './NS/IN' denied
Feb 19 17:36:47 asdlkf named[12647]: client 62.109.4.89#16273: query (cache) './NS/IN' denied
Feb 19 17:37:34 asdlkf named[12647]: client 195.68.176.4#27299: query (cache) './NS/IN' denied
Feb 19 17:38:36 asdlkf named[12647]: client 195.68.176.4#31869: query (cache) './NS/IN' denied
Feb 19 17:39:01 <<<<<< UNRELATED SYSLOG MESSAGE REMOVED >>>>>
Feb 19 17:39:39 asdlkf named[12647]: client 195.68.176.4#22828: query (cache) './NS/IN' denied
Feb 19 17:40:41 asdlkf named[12647]: client 195.68.176.4#40935: query (cache) './NS/IN' denied
Feb 19 17:41:44 asdlkf named[12647]: client 195.68.176.4#17454: query (cache) './NS/IN' denied
Feb 19 17:42:47 asdlkf named[12647]: client 195.68.176.4#3743: query (cache) './NS/IN' denied
Also,
after blocking 62, it tried exactly 10 times and was denied 10 times by iptables.
The blocks were once every 5 seconds (45 seconds total). 2 seconds later, the first 195 attack started.
After 62's 10th failed attempt, it has not re-attempted in the last 10 minutes.
I then blocked 195 using ip tables.
49 seconds later, a 3rd host started querying me. (195 failed 10 times aswell, failing every 5 seconds)
ugh.
62.109.4.89, 195.68.176.4, and 72.138.16.215 inbound, protocol UDP, my logs have stopped filling.
So far so good.
but do you know how stop attack or blaklist this IP ?
This help me to stop botnet DDoS attack on my server. Of course all this will work only with small DDoS attacks. If attack eat your server bandwidth nothing will help you except ISP.
iptables -I INPUT -p udp --dport 53 -m string --hex-string "|01 00 00 01 00 00 00 00 00 00 00 00 02 00 01|" --algo bm --from 30 --to 45 -j DROP
I use this iptables rule in order to get rid of them:
iptables -I INPUT -s 62.109.4.89 -j DROP -m comment --comment "DNS flooder"
(I don't care about the protocol they attempt to use, just want to get rid of them at all)
Add a comment
All fields in this form are required!