Live data from Hacker News

TXT Record XSS

who.is

161–170 of 236 posts

Re: TXT Record XSS

#161
post #160

I added FartScroll.js from the Onion to my text records: http://dig.whois.com.au/dig.php?dom=philipithomas.com&type=A...

Wow, I think they fixed that escaping problem a few minutes ago.

I think some of the sites escape semicolons only. Pure script loading isn't broken, but trying to code in the txt may break.

Re: TXT Record XSS

#162
post #57

I am half serious, but how about making HTML served in TXT records a standard trick for serving small web pages very quickly? There are way fewer network round trips: 1. DNS query for TXT record for example.com 2. DNS reply with HTML content Compared with the traditional 7 steps: 1. DNS query for A record for example.com 2. DNS reply with x.x.x.x 3. TCP SYN to port 80 4. TCP SYN/ACK 5. TCP ACK 6. HTTP GET 7. HTTP rep…

> I am half serious Good. Still, it needs to be pointed out. This idea is an awesome hack to show how can you piggyback on existing infrastructure to make it work as something it was not intended to. But it absolutely, terribly sucks at anything practical. Actually, it's a non-solution . Here's why. > There are way fewer network round trips: > 1. DNS query for TXT record for example.com > 2. DNS reply with HTML conte…

I think his point is that DNS doesn't require the TCP or HTTP overhead. There are more steps and layers involved with an HTTP GET and reply than with DNS resolution.

Re: TXT Record XSS

#163
post #160

Earlier quoted context omitted.

Wow, I think they fixed that escaping problem a few minutes ago.

I think some of the sites escape semicolons only. Pure script loading isn't broken, but trying to code in the txt may break.

But I tried your link recently and it no longer works.

Re: TXT Record XSS

#165

Earlier quoted context omitted.

I think the rise of no-fixed-IP load balancers like Amazon ELB has dramatically reduced that.

Aren't the IPs of the load balancers more or less fixed, though?

I'm not a netadmin, so don't know the innards of how it all works, but one day I watched a domain of ours pointing to an amazon load-balancer spread across multiple AZs - the IP address would change in DNS every so often, flipping between the AZs, presumably.

Re: TXT Record XSS

#166
post #163

Earlier quoted context omitted.

I think some of the sites escape semicolons only. Pure script loading isn't broken, but trying to code in the txt may break.

But I tried your link recently and it no longer works.

Oh you're correct - they did update it. It still works on a few other sites.

Re: TXT Record XSS

#167
post #38

Earlier quoted context omitted.

He hasn't injected anything. It's just his public DNS record that this page has chosen to display without sanitizing.

I imagine the UK Computer Misuse Act (eg at Section 3, http://www.legislation.gov.uk/ukpga/1990/18 ) probably covers it if the person who altered the TXT field does so to cause websites to load code on purpose, that purpose being for example to impair (Section 3(2)(a)) the running of the computer [causing Rick Astley to play, defo counts!] - but it can be read to cover pretty much anything. Similarly I imagine someth…

at least the UK has something somewhat specific (and actually fits XSS quite well).

CA 502c just says: "(3) Knowingly and without permission uses or causes to be used computer services" amongst other very broad subsections

http://support.piercecollege.edu/1521a/References/California...

Re: TXT Record XSS

#168
post #160

I added FartScroll.js from the Onion to my text records: http://dig.whois.com.au/dig.php?dom=philipithomas.com&type=A...

Wow, I think they fixed that escaping problem a few minutes ago.

yep, I just fixed it then. Trending on hackernews is not always a good thing.

Re: TXT Record XSS

#169
post #57

I am half serious, but how about making HTML served in TXT records a standard trick for serving small web pages very quickly? There are way fewer network round trips: 1. DNS query for TXT record for example.com 2. DNS reply with HTML content Compared with the traditional 7 steps: 1. DNS query for A record for example.com 2. DNS reply with x.x.x.x 3. TCP SYN to port 80 4. TCP SYN/ACK 5. TCP ACK 6. HTTP GET 7. HTTP rep…

> I am half serious Good. Still, it needs to be pointed out. This idea is an awesome hack to show how can you piggyback on existing infrastructure to make it work as something it was not intended to. But it absolutely, terribly sucks at anything practical. Actually, it's a non-solution . Here's why. > There are way fewer network round trips: > 1. DNS query for TXT record for example.com > 2. DNS reply with HTML conte…

> Both of them require you to do exactly the same steps - that is, connect to a hardcoded port of a server at a hardcoded IP address, request a user-defined resource, receive and display reply. DNS is not magic, IP addresses of DNS servers are hardcoded in your network configuration and/or in your router configuration and/or in your ISP configuration.

The steps are not exactly the same. Any sensible ISP give you at least two redundant DNS servers with your DHCP response and most public DNS providers also give you multiple redundant servers. When you do a DNS lookup, your OS or browser handles failover between the DNS servers automatically, client side. When accessed by IP address, as you've demonstrated, HTTP offers no client-side failover mechanism built into web browsers to fall back to a different IP.

It's additionally important to note that architecturally, DNS servers are far more scaleable than most HTTP servers. They don't run anywhere near as much code per request and don't require the overhead of TCP or HTTP.

Note that I'm also not encouraging using DNS instead of HTTP for serving websites, I'm just pointing out that DNS is a more reliable technology and has client-side failover mechanisms so the pros which mrb listed are very real.

Post reply on HN