LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
LinkBack Search this Thread
Old 03-20-2008, 11:14 PM   #1
Tom717
LQ Newbie
 
Registered: Mar 2008
Posts: 2

Rep: Reputation: 0
DNS poisoning attempts (I think)


I run my own DNS server - standard bind and current with all updates...

I have access restricted to the few zones I am authoritative for so no one can poison the cache. This seems to be working fine as I get occasional entries (maybe a dozen or less a day on average) in the message file like:

Mar 20 05:11:28 alpha named[13963]: client 96.247.61.192#1794: query (cache) '89.156.184.220.broad.hz.zj.dynamic.163data.com.cn/NS/IN' denied
Mar 20 05:11:28 alpha named[13963]: client 96.247.61.192#1795: query (cache) '89.156.184.220.broad.hz.zj.dynamic.163data.com.cn/NS/IN' denied

all fine and the world is a happy place *until*...

in the past week or two I have started getting message log entries that look like *this*:

Mar 20 10:22:10 alpha named[660]: client 127.0.0.1#60884: query (cache) '47.199.64.125.broad.yb.sc.dynamic.163data.com.cn/A/IN' denied
Mar 20 10:22:25 alpha last message repeated 3 times
Mar 20 11:33:31 alpha named[660]: client 127.0.0.1#60884: query (cache) '24.106.154.61.broad.qz.fj.dynamic.163data.com.cn/A/IN' denied
Mar 20 11:33:46 alpha last message repeated 3 times
Mar 20 12:31:00 alpha named[660]: client 127.0.0.1#60884: query (cache) '207.199.165.60.broad.pl.gs.dynamic.163data.com.cn/A/IN' denied
Mar 20 12:31:15 alpha last message repeated 3 times
Mar 20 23:29:38 alpha named[660]: client 127.0.0.1#60884: query (cache) '149.28.160.60.broad.zt.yn.dynamic.163data.com.cn/A/IN' denied


I have searched high and low and can't come up with anything explaining what is happening? at first I thought they queries had to be coming from the local host but why would I reject my own DNS queries (every other query seems to work fine) and why would my box be looking up an "A" record for what appears to be a reverse address lookup formatted address?

To check out my own address I did a dig of the address that was rejected and it returns information just fine so I am assuming this is a request from "outside".

Is this just someone sending a packet with a spoofed source address? Is there any risk (I seem to be rejecting these as I would expect)? Can anyone clue me in at all on this?

Many thanks in advance to all of the gurus here who actually know what they are doing and can set me right on this.

-Tom
 
Old 03-22-2008, 08:03 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 20,977
Blog Entries: 44

Rep: Reputation: 1228Reputation: 1228Reputation: 1228Reputation: 1228Reputation: 1228Reputation: 1228Reputation: 1228Reputation: 1228Reputation: 1228
Ever evaluated djbdns? Just asking, OK?


Quote:
Originally Posted by Tom717 View Post
I have access restricted to the few zones I am authoritative for so no one can poison the cache.
Then it would IMHO be more precise to say that only those inside those zones stand a chance at poisoning the cache, right?


Quote:
Originally Posted by Tom717 View Post
in the past week or two I have started getting message log entries
So what changed between the world being a happy place and then?


Quote:
Originally Posted by Tom717 View Post
why would my box be looking up an "A" record for what appears to be a reverse address lookup formatted address?
Malformed queries aren't odd. For example root servers get at least twenty percent due to Microsoft, Apple, misconfiguration and malice. IIRC if this would be a simple poisoning attack against a target domain, you would not only see many requests for that domain but also a lot of fake replies that try to match the request ID and source port. Dissecting packet captures would show more details than BIND log can. Noticing the requested domain being .dynamic.163data.com.cn: are there more services running on the machine or is it a single service box? And you don't run by any chance a MTA that's been accessed by or for .dynamic.163data.com.cn?
 
Old 03-22-2008, 01:22 PM   #3
Tom717
LQ Newbie
 
Registered: Mar 2008
Posts: 2

Original Poster
Rep: Reputation: 0
thanks for the reply - it has given me some real help. Let me reply to your response point by point - after an intro.

I am far from an expert in this area which is why I turned to the gurus on here. I did research and I talked to one person who is reasonably knowledgeable on the subject but just cannot resolve my problem.


Quote:
Ever evaluated djbdns? Just asking, OK?

no I haven't but I will certainly check into it.


Quote:
Then it would IMHO be more precise to say that only those inside those zones stand a chance at poisoning the cache, right?

I guess I used the wrong terms there or else did not understand your reply. I assumed (I know - I *assumed* - go ahead and flog me now and get it over with) that my acl statement would allow my subnet to access everything and the rest of the immediate universe would only be able to access the zone information for those zones I am authoritative for. But you are absolutely right that theoretically, assuming I have the config correct, that only my own network could be poisoning anything.


Quote:
So what changed between the world being a happy place and then?

Excellent question. After about 40 years in the field I can tell you that I do not take "I didn't change anything - it just started happening by itself" as an answer from *anyone* including myself. I know better. But in this case I can't *remember* making any changes recently and I do not recall seeing any 127.0.0.1 entries in the logs until the past week or so. Mind you I do not rule out either possibility as being impossible. All I can do now is go forward on the assumption that there is a problem/issue of some sort of my making.


Quote:
Malformed queries aren't odd. For example root servers get at least twenty percent due to Microsoft, Apple, misconfiguration and malice. IIRC if this would be a simple poisoning attack against a target domain, you would not only see many requests for that domain but also a lot of fake replies that try to match the request ID and source port. Dissecting packet captures would show more details than BIND log can. Noticing the requested domain being .dynamic.163data.com.cn: are there more services running on the machine or is it a single service box? And you don't run by any chance a MTA that's been accessed by or for .dynamic.163data.com.cn?

Yes indeed the machine is a multi tasker and I do run sendmail on it. DNS and Sendmail have been co-habitating peacefully living side by side for a number of months now - maybe 7 or 8. Your question did raise the level of issue to higher relevance in my mind and added itself to my pondering.


Summary: I started out with an issue - finding 127.0.0.1 source IP DNS denials for something.163data.com.cn in my message log. After trying to resolve the issue I found myself in a mental either/or box. Either it *was* an internal request (impossible I say because I am resolving lots of domains successfully). Or it *was* from the outside word - and properly rejected because I am not authoritative for that domain (impossible I say because 127.0.0.1 cannot be an outside address). Those impossible statements were tongue firmly in cheek obviously because one of them *has* to be happening but I'll be damned if I can get my mind out of that box. What I need is someone to spot my obvious flaw and get me out of this mental trap. This is not a first - over the years I have seen and committed the blunder of seeing what I *thought* I coded instead of what I *did* many times. Getting out of that trap is the problem.

Since I first posted I broke out of the box just far enough to come up with one idea to try to eliminate a possibility - I assumed (I know I know - just beat me quickly and get it over with) that 127.0.0.1 should *never* be the source IP in a packet coming in over eth0 so I put a rule into iptables to drop any incoming packet with that source address and sat back to wait. Then I sat back to wait and voila (that's either a large violin or a French word, I forget which) I got no drops but a couple more log entries for 163data.com.cn again. This eliminated the "outside" impossible condition and left me with the remaining "impossible" condition - it is coming from my side.

Having jumped out of the impossible A or impossible B mindset trap I simply found myself in a new box - impossible situation B1 or impossible situation B2. Since it *is* on my side the 127.0.0.1 "problem" goes away but now I am confronted with "why didn't I get successful resolution?" from the query? with sendmail active and several client machines using this as their primary DNS server why isn't a lot more failing? A simple "dig" to any of the failed 163data.com.cn address was quickly resolved. Now I can't get myself out of the "either nothing should be resolving" or "163data stuff should also resolve". Can you give me *any* leads for where to look or what to test to figure out why just *one* domain is failing?

config snippet:

acl house_net {
206.174.132.57/28;
};
options {
directory "/etc";
pid-file "/var/run/named/named.pid";
allow-recursion {
house_net;
};
allow-query {
house_net;
};
allow-transfer {
house_net;
};
};


Please sir - I don't really want *more* - well not an entire bowl full, just a mere morsel, a tidbit as it were.

Thanks
-Tom
 
Old 03-25-2008, 12:33 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 20,977
Blog Entries: 44

Rep: Reputation: 1228Reputation: 1228Reputation: 1228Reputation: 1228Reputation: 1228Reputation: 1228Reputation: 1228Reputation: 1228Reputation: 1228
Quite an elaborate reply ;-p

Let's see what others think of say 163data.com.cn and maybe we'll find failures. Look up the DN 163data.com.cn (one of my favourite starting points). Notice the hints under "subdomains", follow "!dynamic" and find recursing ends at broad.hz.zj.dynamic.163data.com.cn. Nothing to be learnt from there, back to the DN. Query WHOIS (also notice the crap in the "hostnames beginning with" part) and compare with other source (or dnsgoodies or whois.ws). Notice how the NS is inconsistent: "tianyan1.cnnic.net.cn" vs the (nonexistent) "ns.jkflkadjfkldjfkljdfljdfljdfljldfjlf.com". The DNS Sleuth shows violations as well. Is this the registrar (sfn.cn) fscking up?.. Since you're running an MTA you can use your favourite searchengine or Aboutus to see if the DN is named for spam. Aboutus is kinda blisteringly subjective since it's a Wiki (but still an indication) so it's good to know the DN is in at least one RBL: URIBL (or use surblhost or see SURBL+ Checker).

Nice. But how about 89.156.184.220.broad.hz.zj.dynamic.163data.com.cn?
Code:
]# type arpaRev
arpaRev is a function
arpaRev() { i=(${1//./ }); echo "${i[3]}.${i[2]}.${i[1]}.${i[0]}"; }
Code:
]# arpaRev 89.156.184.220.broad.hz.zj.dynamic.163data.com.cn
220.184.156.89
...which results in this (Notice doing reverse lookups at dnsstuff and dnsgoodies will show warnings like there's no authoritative NS for this IP. Nice.) with these RBL entries. Maybe not a complete answer and maybe I should have wedged in something about the MTA doing lookups over loopback and how to trace those but I hope it gives you an idea your resolving problems for this particular domain are not problematic. At least from my POV but I'm no expert. Corrections welcome.
 
Old 01-02-2009, 12:00 PM   #5
SkyLeach
LQ Newbie
 
Registered: Oct 2008
Location: The edge of sanity
Distribution: gentoo, ubuntu, debian and redhat/fedora
Posts: 2

Rep: Reputation: 0
Angry

Quote:
Originally Posted by Tom717 View Post
I run my own DNS server - standard bind and current with all updates...

I have access restricted to the few zones I am authoritative for so no one can poison the cache. This seems to be working fine as I get occasional entries (maybe a dozen or less a day on average) in the message file like:

Mar 20 05:11:28 alpha named[13963]: client 96.247.61.192#1794: query (cache) '89.156.184.220.broad.hz.zj.dynamic.163data.com.cn/NS/IN' denied
Mar 20 05:11:28 alpha named[13963]: client 96.247.61.192#1795: query (cache) '89.156.184.220.broad.hz.zj.dynamic.163data.com.cn/NS/IN' denied

all fine and the world is a happy place *until*...

in the past week or two I have started getting message log entries that look like *this*:

Mar 20 10:22:10 alpha named[660]: client 127.0.0.1#60884: query (cache) '47.199.64.125.broad.yb.sc.dynamic.163data.com.cn/A/IN' denied
Mar 20 10:22:25 alpha last message repeated 3 times
Mar 20 11:33:31 alpha named[660]: client 127.0.0.1#60884: query (cache) '24.106.154.61.broad.qz.fj.dynamic.163data.com.cn/A/IN' denied
Mar 20 11:33:46 alpha last message repeated 3 times
Mar 20 12:31:00 alpha named[660]: client 127.0.0.1#60884: query (cache) '207.199.165.60.broad.pl.gs.dynamic.163data.com.cn/A/IN' denied
Mar 20 12:31:15 alpha last message repeated 3 times
Mar 20 23:29:38 alpha named[660]: client 127.0.0.1#60884: query (cache) '149.28.160.60.broad.zt.yn.dynamic.163data.com.cn/A/IN' denied


I have searched high and low and can't come up with anything explaining what is happening? at first I thought they queries had to be coming from the local host but why would I reject my own DNS queries (every other query seems to work fine) and why would my box be looking up an "A" record for what appears to be a reverse address lookup formatted address?

To check out my own address I did a dig of the address that was rejected and it returns information just fine so I am assuming this is a request from "outside".

Is this just someone sending a packet with a spoofed source address? Is there any risk (I seem to be rejecting these as I would expect)? Can anyone clue me in at all on this?

Many thanks in advance to all of the gurus here who actually know what they are doing and can set me right on this.

-Tom
I've just started getting a bunch of these as well, and all of mine are coming from a particular company in Marietta, GA.

log excerpt:
Code:
Dec 25 04:17:45 ns1 named[7782]: client 69.50.129.81#48840: query (cache) './NS/IN' denied
Dec 25 04:17:46 ns1 named[7782]: client 69.50.129.81#6890: query (cache) './NS/IN' denied
Dec 25 04:17:46 ns1 named[7782]: client 69.50.129.81#13933: query (cache) './NS/IN' denied
Dec 25 04:17:47 ns1 named[7782]: client 69.50.129.81#17348: query (cache) './NS/IN' denied
Dec 25 04:17:47 ns1 named[7782]: client 69.50.129.81#40375: query (cache) './NS/IN' denied
Dec 25 04:17:48 ns1 named[7782]: client 69.50.129.81#48743: query (cache) './NS/IN' denied
Dec 25 04:17:48 ns1 named[7782]: client 69.50.129.81#58828: query (cache) './NS/IN' denied
Dec 25 04:17:48 ns1 named[7782]: client 69.50.129.81#14523: query (cache) './NS/IN' denied
Dec 25 04:17:49 ns1 named[7782]: client 69.50.129.81#64494: query (cache) './NS/IN' denied
Dec 25 04:17:49 ns1 named[7782]: client 69.50.129.81#43969: query (cache) './NS/IN' denied
Dec 25 04:17:50 ns1 named[7782]: client 69.50.129.81#47135: query (cache) './NS/IN' denied
Dec 25 04:17:50 ns1 named[7782]: client 69.50.129.81#61710: query (cache) './NS/IN' denied
Dec 25 04:17:51 ns1 named[7782]: client 69.50.129.81#24464: query (cache) './NS/IN' denied
I did a reverse whois lookup and got this on the ip they are coming from:
Code:
OrgName:    NationalNet, Inc. 
OrgID:      NATL
Address:    Tenth Floor Network Operations Department
Address:    55 Marietta Street North West
City:       Atlanta
StateProv:  GA
PostalCode: 30303
Country:    US

NetRange:   69.50.128.0 - 69.50.143.255 
CIDR:       69.50.128.0/20 
NetName:    NATL-MACH10-NET
NetHandle:  NET-69-50-128-0-1
Parent:     NET-69-0-0-0-0
NetType:    Direct Allocation
NameServer: NS1.NATIONAL-NET.COM
NameServer: NS2.NATIONAL-NET.COM
Comment:    
RegDate:    2003-06-04
Updated:    2007-05-03

OrgAbuseHandle: NAC69-ARIN
OrgAbuseName:   NationalNet Abuse Contact 
OrgAbusePhone:  +1-404-420-7000
OrgAbuseEmail:  abuse@nationalnet.com

OrgNOCHandle: NNO76-ARIN
OrgNOCName:   NationalNet Network Operations 
OrgNOCPhone:  +1-404-420-7000
OrgNOCEmail:  support@nationalnet.com

OrgTechHandle: IA88-ARIN
OrgTechName:   IP Administrator 
OrgTechPhone:  +1-404-420-7000
OrgTechEmail:  bradley.bopp@nationalnet.com

# ARIN WHOIS database, last updated 2009-01-01 19:10
# Enter ? for additional hints on searching ARIN's WHOIS database.
NationalNet is a hosting company, so I can't tell if they are making these attempts or if they have been exploited or one of their clients is doing it.

I was about to blacklist their domain though, as I had 21,000 requests from them over the christmas holidays. All of them were between 4:14AM and 5:18AM and then it stopped. Hopefully they just misconfigured their name servers or something...
 
Old 01-16-2009, 11:07 PM   #6
TJ99
LQ Newbie
 
Registered: Jan 2009
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by SkyLeach View Post
I've just started getting a bunch of these as well, and all of mine are coming from a particular company in Marietta, GA.

log excerpt:
Code:
Dec 25 04:17:45 ns1 named[7782]: client 69.50.129.81#48840: query (cache) './NS/IN' denied
Dec 25 04:17:46 ns1 named[7782]: client 69.50.129.81#6890: query (cache) './NS/IN' denied

Dec 25 04:17:50 ns1 named[7782]: client 69.50.129.81#61710: query (cache) './NS/IN' denied
Dec 25 04:17:51 ns1 named[7782]: client 69.50.129.81#24464: query (cache) './NS/IN' denied
I did a reverse whois lookup and got this on the ip they are coming from:
Code:
OrgName:    NationalNet, Inc. 
OrgID:      NATL
Address:    Tenth Floor Network Operations Department
Address:    55 Marietta Street North West
City:       Atlanta
StateProv:  GA
PostalCode: 30303
Country:    US

NetRange:   69.50.128.0 - 69.50.143.255 
CIDR:       69.50.128.0/20 
NetName:    NATL-MACH10-NET
NetHandle:  NET-69-50-128-0-1
Parent:     NET-69-0-0-0-0
NetType:    Direct Allocation
NameServer: NS1.NATIONAL-NET.COM
NameServer: NS2.NATIONAL-NET.COM
Comment:    
RegDate:    2003-06-04
Updated:    2007-05-03

OrgAbuseHandle: NAC69-ARIN
OrgAbuseName:   NationalNet Abuse Contact 
OrgAbusePhone:  +1-404-420-7000
OrgAbuseEmail:  abuse@nationalnet.com

OrgNOCHandle: NNO76-ARIN
OrgNOCName:   NationalNet Network Operations 
OrgNOCPhone:  +1-404-420-7000
OrgNOCEmail:  support@nationalnet.com

OrgTechHandle: IA88-ARIN
OrgTechName:   IP Administrator 
OrgTechPhone:  +1-404-420-7000
OrgTechEmail:  bradley.bopp@nationalnet.com

# ARIN WHOIS database, last updated 2009-01-01 19:10
# Enter ? for additional hints on searching ARIN's WHOIS database.
NationalNet is a hosting company, so I can't tell if they are making these attempts or if they have been exploited or one of their clients is doing it.

I was about to blacklist their domain though, as I had 21,000 requests from them over the christmas holidays. All of them were between 4:14AM and 5:18AM and then it stopped. Hopefully they just misconfigured their name servers or something...
I've been seeing something similar:

Jan 16 20:52:36 shrub named[17982]: client 69.50.142.11#9956: view external: query (cache) './NS/IN' denied
Jan 16 20:52:37 shrub named[17982]: client 69.50.142.11#40042: view external: query (cache) './NS/IN' denied
Jan 16 20:52:39 shrub named[17982]: client 69.50.142.11#27433: view external: query (cache) './NS/IN' denied
Jan 16 20:52:39 shrub named[17982]: client 69.50.142.11#52686: view external: query (cache) './NS/IN' denied
Jan 16 20:52:39 shrub named[17982]: client 69.50.142.11#23171: view external: query (cache) './NS/IN' denied
Jan 16 20:52:41 shrub named[17982]: client 69.50.142.11#9746: view external: query (cache) './NS/IN' denied

Once again from NationalNet.com, and I believe they've done this to me before. I think one, or more, of their clients aren't too reputable and have something that is getting them blocked from accessing the regular DNS servers.

I used dnstop (good program) to watch what they were looking for, and it was always the '.' aka 'root' domain, *nothing else*. To me that seems pretty fishy, after all I'm only on an ADSL link, my IP is nothing like theirs, and I'm the other side of the continent and another country away. Why are they doing this? Either this is a DNS poisoning attemp, or they are likely doing something not quite right and trying to hide their queries... perhaps they're running a bot controller or something? (Pure speculation..)

I suggest you use IPTables to block access from them(substituting the offending IP);

iptables -I external -s 69.50.142.11 -j DROP

Cheers,
TJ99

UPDATE: Heard back from the abuse folks. The traffic is apparently a side-effect of a DDOS attack on port 53, so it's not NationalNet's fault, although I do wonder if they could filter some of the outgoing DNS traffic better so the rest of us don't get the scattershot.

Last edited by TJ99; 01-17-2009 at 02:50 PM.
 
Old 01-17-2009, 10:59 AM   #7
Seanster
LQ Newbie
 
Registered: Jan 2009
Posts: 1

Rep: Reputation: 0
I emailed the abuse contact and this is their response:

This actually is not one of our clients. This client is having a traditional
DDOS attack on PORT 53 UDP.

As you are aware there is no three way handshake with UDP traffic, poor
design perhaps, hence forth there are two steps to this attack.

A) Flood the server as listed below IE: 69.50.137.175
B) Modify the header and send the request to thousands of unexpected Name
Servers to make them think they need to respond.

This leads to two things.

A) Causing the server to be flooded in hopes to shut it down. This was
prevented by placing DDOS filters in place and setting an ACL to deny any
and all UDP traffic to and from this server.

B) Service providers such as you to make contact with the hosting company to
say there being attacked.

The server in question will never have a reason to do a UDP/53 request
directly as it's simply an HTTP server and not even running DNS services. I
would suggest to protect yourself by simply placing a NULL route on your
core router or set a rule in IPTables to drop connections from this IP
address.

We apologize for the inconvenience but DDOS attacks are never under the
recipients control.
 
Old 01-17-2009, 05:13 PM   #8
imbezol
LQ Newbie
 
Registered: Oct 2006
Posts: 2

Rep: Reputation: 0
I'm receiving the same traffic from the same address. It started hitting my nameservers about 36 hours ago so I've just filtered the IP entirely.

security: info: client 69.50.142.11#59209: query (cache) './NS/IN' denied
 
Old 01-18-2009, 01:28 AM   #9
TomS_
LQ Newbie
 
Registered: Apr 2008
Posts: 6

Rep: Reputation: 0
Ive been receiving DNS queries since approx the 7th of January from a mix of IPs and providers networks (NationalNet, ATM Link, nac).

Ive only just realised, and have added an ACL rule to block traffic from this IP from reaching my DNS servers.

According to a post I read in the "news.admin.net-abuse.email" newsgroup, the IP these DNS queries are being spoofed from might have hosted some questionable content...

Quote:
Off hand I'd say someone has a problem with the content on that IP.

in.shemalesgetfucked.com A 69.50.142.11
in.shemalerevenge.com A 69.50.142.11
in.shemalevideoking.com A 69.50.142.11
in.asstoyedshemales.com A 69.50.142.11
in.hotshemalevideos.com A 69.50.142.11
in.chubbypov.com A 69.50.142.11
in.thicknbusty.com A 69.50.142.11

Might have spammed a skiddo forum.
I am seeing 4-5-6 packets/sec hit my deny ACL rule. Was wondering why my quota usage seemed a bit higher than usual this month. :-)

Tom

Last edited by TomS_; 01-18-2009 at 01:29 AM.
 
Old 01-18-2009, 09:16 AM   #10
stevewest15
LQ Newbie
 
Registered: Jan 2009
Posts: 1

Rep: Reputation: 0
Hi,

If I'm understanding this attack correctly (which I've been seeing on both of our named servers for the past several days), filtering the following 2 IP blocks won't help: 69.50.137.175 & 69.50.142.11. The attacker is spoofing these IP addresses so the request is really not originating from these IP blocks.

Has anyone found out what the actual source IP addresses that are forging these requests to bind? I've looked at my bind logs and they only show the same spoofed ip addresses I listed above as the source so I assume bind is 'blind' to the actual source and just assumes whatever an attacker says is the source.

thx,

SW

EDIT: I was made aware of this by our egress filtering which seems to have worked because I saw lots of 'OUT_UDP DROP' orginating from our name servers to the above ip addresses.

Last edited by stevewest15; 01-18-2009 at 09:19 AM.
 
Old 01-18-2009, 10:08 AM   #11
catworld
Member
 
Registered: Nov 2004
Location: Horseheads, New York
Distribution: Mandriva 2010.1 / KDE 4.5.2, Slax, Knoppix, Backtrack & etc...
Posts: 187

Rep: Reputation: 34
I'd certainly run DNS or DHCP on a gateway but not a MTA. If you can, move the MTA off to another host inside your domain. It does look like the MTA is querying over the localhost. Could be some attempted external mayhem. Have you looked at sendmail logs? Might want to configure iplog or fwlogwatch for more information on the internal goings-on.
 
Old 01-19-2009, 12:34 AM   #12
rpectol
LQ Newbie
 
Registered: Jan 2009
Distribution: Debian, Ubuntu, CentOS
Posts: 3

Rep: Reputation: 0
I've been seeing the same thing on my nameservers. I grew tired of manually adding IPs to my firewall so I wrote a script that tails the system log at intervals and automatically adds the offending (or spoofed) IP to the server's firewall. Seems to be affective for my uses. If anyone else is interested in checking it out, it's available here:

http://rob.pectol.com/dnsexploit.txt

It's very simple and could be improved upon but I hardly see the point in spending a lot of time on it for an exploit that will probably disappear relatively soon anyway. But it does work and maybe someone else will find it handy.

Rob
 
Old 01-19-2009, 02:34 AM   #13
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
Quote:
Originally Posted by stevewest15 View Post
Hi,

If I'm understanding this attack correctly (which I've been seeing on both of our named servers for the past several days), filtering the following 2 IP blocks won't help: 69.50.137.175 & 69.50.142.11. The attacker is spoofing these IP addresses so the request is really not originating from these IP blocks.
No, you're not understanding the issue correctly. If the source is forged, that's the only address you're going to see in the header and it is effective to filter that spoofed source. Of course, any legitimate traffic from those IPs will be blocked too, but it's generally impossible to determine the difference between spoofed and legitimate requests (hence the reason why spoofing is popular).

Quote:
Has anyone found out what the actual source IP addresses that are forging these requests to bind? I've looked at my bind logs and they only show the same spoofed ip addresses I listed above as the source so I assume bind is 'blind' to the actual source and just assumes whatever an attacker says is the source.
Only the attacker's service provider can possibly know the real source, but even then it won't show the IP address (since they aren't actually using their own IP), it will just show the MAC address of whatever piece of gear the attacker has connected to their ISP (cable modem, etc).

There's no way anyone downstream can filter on the actual source.

Quote:
EDIT: I was made aware of this by our egress filtering which seems to have worked because I saw lots of 'OUT_UDP DROP' orginating from our name servers to the above ip addresses.
You could filter egress traffic going to those IPs, but why let your nameservers even go through the work to create those queries in the first place? Just block the spoofed sources on their way in.
 
Old 01-19-2009, 04:42 AM   #14
TomS_
LQ Newbie
 
Registered: Apr 2008
Posts: 6

Rep: Reputation: 0
If the service provider(s) whos network these bogus packets are being generated from had half competant admins they would:

a) have URPF enabled on their customer aggregation routers such that packets sourced from IPs that are not known to be routed to a particular customer would not even be able to enter the service providers network from the customer

b) or at least filter outbound packets from their network such that packets sourced from IPs that do not even exist on that SPs network could not leave their network and enter the Internet

Unfortuntely theres a lot of poorly run ISPs out there, and these types of attacks are what we have to live with as a result.

So a tip to any network admin who reads this, if you havnt already done so, filter all traffic leaving your network so that only traffic sourced from IPs that are actually routed into your network are allowed to leave it. Its your contribution to stopping this type of thing happening in the future by not allowing it to happen from your network! :-)

Tom

Last edited by TomS_; 01-19-2009 at 04:58 AM.
 
Old 03-30-2009, 10:51 AM   #15
0x29a
LQ Newbie
 
Registered: Jun 2004
Posts: 16

Rep: Reputation: 0
Quote:
Originally Posted by TomS_ View Post
So a tip to any network admin who reads this, if you havnt already done so, filter all traffic leaving your network so that only traffic sourced from IPs that are actually routed into your network are allowed to leave it. Its your contribution to stopping this type of thing happening in the future by not allowing it to happen from your network! :-)

Tom
Sorry to pester about this, but I was wondering if you could clarify this statement for me so I can see about implementing it on my network. Specifically the "sourced from IPs that are routed in to your network" part. I still get the query "(cache) './NS/IN' denied" errors reletively frequently, and so far am only able to add the offending IP to my filter rules.

Granted, I found this thread after very little sleep, and may have an epiphany be the time you read this (don't count on it).

Andrew
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ARP Poisoning mudasirm Linux - Networking 9 09-11-2008 07:32 PM
Arp table poisoning cristian1983 Linux - Security 2 12-28-2007 02:31 PM
Arp-poisoning help! zaheer Linux - Networking 5 07-25-2007 11:34 PM
Arp Poisoning yawe_frek Linux - Security 3 05-26-2007 07:13 PM
ArpStar 0.5.0 Defeats ARP poisoning bassdemon Linux - Security 14 02-21-2005 02:32 PM


All times are GMT -5. The time now is 12:19 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration