Archive

Posts Tagged ‘dns’

Wikipedia via DNS

I thought this was pretty cool

treguly@ns:~$ host -t txt foobar.wp.dg.cx
foobar.wp.dg.cx descriptive text "The term foobar is a common
placeholder name, also referred to as metasyntactic variable, used in
computer programming or computer-related documentation. In technology,
the word was probably originally propagated through system manuals by
Digital Equipmen" "t Corporation in 1960s and early 1970s. Another
possibility is that foobar evolved from electronics, as an inverted
foo... http://a.vu/w:Foobar"

Simple replace foobar with the search term of your choice.

The Author's page describing this is available here:
https://dgl.cx/wikipedia-dns

Categories: IT Tags: ,

IP Resolution with nmap

A question came to the nmap-dev mailing list regarding resolving IP Addresses in bulk. Doug replied with a command to do just that.  I decided that it was handy to keep around but I wanted to clean it up a little, so I turned it into this:

nmap -sL $1 2>/dev/null |
perl -ne 'print unless /^Host [\d.]+ /' |
grep 'not scanned' |
cut -d ' ' -f 2,3 |
sed -e 's/\(.*\) (\(.*\))/\2 resolves to \1/'

Which leads to output similar to this:

198.133.219.10 resolves to fed.cisco.com
198.133.219.11 resolves to asp-web-sj-1.cisco.com
198.133.219.12 resolves to asp-web-sj-2.cisco.com
198.133.219.13 resolves to fedtst.cisco.com
198.133.219.14 resolves to www.netimpactstudy.com
198.133.219.15 resolves to deployx-sj.cisco.com
198.133.219.16 resolves to contact-sj1.cisco.com
198.133.219.17 resolves to scc-sj-1.cisco.com
198.133.219.18 resolves to scc-sj-2.cisco.com
198.133.219.19 resolves to scc-sj-3.cisco.com
198.133.219.20 resolves to jmckerna-test.cisco.com
198.133.219.21 resolves to events.cisco.com
198.133.219.22 resolves to bam-prod-1.cisco.com
198.133.219.23 resolves to redirect.cisco.com
198.133.219.25 resolves to www.cisco.com
198.133.219.26 resolves to partners.cisco.com

Categories: IT, Tools Tags: , ,

Rogers Cable Hijacks Browser Traffic

Previously I've blogged on Comcast hijacking Live Search Results. That didn't affect me, but I felt it was worth sharing... This time I'm affected. Rogers Cable is my ISP... today I sat down and opened Firefox, planning to visit a site I enjoy, AntiOnline.com. I accidently typed antionline and hit enter without adding the .com... now normally this wouldn't be a problem.... except today it was, I ended up at a Rogers search engine (powered by Yahoo). I looked at the page briefly and found an opt-out button, however the opt-out button simply means I won't get the search results... they still hijack the text I pass my browser. I typed in antionline again and hit enter, this time I ended up at http://www20.search.rogers.com/not_found. I was rather confused, so I opened up a command prompt and tested with netcat. Check this out

C:\Documents and Settings\treguly>nc antionline 80
GET / HTTP/1.0

HTTP/1.1 404 Not Found
Content-type: text/html

<html><head>
<title>404 Not Found</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script>
 var value;
 value = 'se';
 document.location = 'htt' + 'p://www20.'
 + 'search.rogers.com/' + value + 'arch?qg=%20&r' +
 'n=oVbVbPY7LO34d36';
</script>
</head>
<body>404 Not Found</body></html>

I can't believe they are doing this. I called Rogers and got to speak to a foreign call center (what a joy that always is... ) After about 5 minutes of explaining to the guy that I didn't need step by step explanations from him on how to opt-out and explaining to him that the service to opt-out only sets a cookie, it doesn't delete one. He finally announced that they were simply hijacking DNS queries and that any NXDomain was sent there. If I were to change my DNS server then I would no longer have this issue. I think it's time to start using my own internal DNS server. I'm sure if I pressed the matter I'd be told that this is, in some way, a partial solution to Kaminsky's DNS vuln. To me... it's a pain in the ass... get rid of it.

I figured I'd switch to OpenDNS, so I dropped the OpenDNS servers into my m0n0wall install and tried to make use of them. I've only ever used OpenDNS from the command line but surprise surprise... in your browser, the exact same thing happens... You get a nice search results page. Why does everyone feel the need to make money off my typos? What happened to the good old days, where you could type 'antionline' in your browser and it would automatically end up at 'antionline.com', I miss those days...

We need to stop making the Internet easier for the stupid and incompetent... it just encourages them to use it. Let me find out that I've got a typo, let me type in shortcuts... let me mix the two and end-up at a phishing site. That's my problem... Something is going to make me go... 'D0h!' and realize my typo. If we got rid of the stupid people... the ones who buy from spam, the ones who are taken by phishing sites... then spammers and phishers wouldn't exist... So let's stop turning the internet into the internet for dummies and instead just keep the dummies off the internet.

Now I have to go and build my own DNS server so that things function the way they should and not the way the idiots need them to to avoid being taken advantage of.

Well... I guess that was a bit of a rant... but I find it frustrating... very very frustrating.

Categories: IT, Personal Tags: , , ,

[SecTor Review] Black Ops 2007: DNS Rebinding Attacks

SecTor Day #2
Speaker: Dan Kaminsky
Presentation (ppt)
Audio (wmv)

This was the first talk I attended on day 2. Dan demonstrated DNS Rebinding attacks and how they can be dangerous to internal networks. The talk was filled with technical data and live demos.

While the demo had been setup in advance it was nice to see how quickly and efficiently the attack could be pulled off if you were prepared.

One interesting event occurred when another speaker (who had presented on DNSSEC) argued that DNSSEC is the solution to this problem. Kaminsky was able to make short work of the individual and put him in his place... even though he attempted to persist with his argument.

There are solutions to some forms of DNS rebinding, unfortunately they could take years to implement, even if they were.

The first would be to rewrite DNS servers to not allow RFC 1912 addresses from external sources.

Another would be to rewrite DNS to operate with its own version of the three way handshake. The server receives an IP after resolving the domain name and rather than pass it to the host, it performs a reverse resolution on the IP, ignoring any mappings that occur in its cache. Sure this increases the load on servers, but I'm fairly certain they'd be able to handle it... A problem that can occur here is with virtual hosts, and unfortunately they are becoming more and more common. The problem here is that you need all virtual hosts to be returned when an IP is resolved, and that doesn't seem likely.

Right now, the most effective step you can take is to have firewall rules on the border of your network to either drop DNS responses with internal IPs or to rewrite them on the fly. This doesn't, however, stop an attack from rebinding to a different external IP.

For more information on DNS Rebinding, there's a great paper available from a team at Stanford CS on the subject.