Bitsquatting: DNS Hijacking without exploitation
dinaburg.org
dinaburg.org
This experiment also seems to show that there is a lot of corrupted memory out there.
There is a simple fix, I wonder why it is not used:
1) Add a feature at operating system level that one time every second tests N memory pages, at random. No observable performance degradation.
2) Report the problem to the user when it is found.
3) Mark the page as faked up and don't use it, ever.
So you have memory tested basically for free, users aware of their hardware errors, and a lot less consequences for those errors.
So even if the OS should be doing this for you, for long-running processes you could do it yourself in user mode. (I don't know if it's worth the effort, though.)
I've the following possibilities basically:
1) Test on malloc(), with a given probability, and perhaps only up to N bytes of the allocation, for latency concerns.
2) Do the same also at free() time.
3) From the time to time test just allocating a new piece of memory with malloc of a fixed size, test it, and free it again.
"3" is the one with the minimum overhead, but probably 1+2 have a bigger percentage of hitting all the pages, eventually...
I don't have a broken memory module to test different strategies, I wonder if there is a kenrel module that simulates broken mem.
Note that Redis can already test the computer memory with 'redis-server --test-memory' but of course this requires user intervention.
In practice, the privacy problems coming from this are rather limited (unless you send private stuff in URL), since in majority of cases, you'll not be sending domain cookies for the original domain if it resolved to the bitsquat domain early. Anyway, it's still probably a thing not thoroughly thought of on a daily basis regarding security.
The original link was found at h-online.
Or pages including Google Analytics. If the described behaviors really take place, given the massive scale of deployment of Google Analytics, Statcounter, FB buttons, jQuery includes from CDNs, you should be able to do arbitrary JS injections to a non-trivial number of users (though very random).
[1] http://my.opera.com/hallvors/blog/2012/05/11/social-media-ba...
Thinking about it, I guess such crashes are actually a much larger number.
We're just conditioned to ignore them if they're neither frequent nor reproducible.
Author of the article here. Was happily surprised to find it linked on the front page of HN.
I can try to answer any questions that you may have have.
I'm also in the midst of writing another blog post, this time talking about the bit-error distribution in the DNS query type field. Spoiler: its not uniform.
[1] http://mina.naguib.ca/blog/2012/10/22/the-little-ssh-that-so...
Technically, this statement is correct, but don't overlook the fact that while the Host header is optional in HTTP 1.0, most HTTP 1.0 clients will include it out of necessity. It's nearly impossible to guarantee you'll get the correct resource without a Host header, these days.
So for a bit flip not to be detected and remedied before the execution of an errant DNS lookup seems odd. Although I could be wrong (just a final year CS student).
EDIT: Just watched the video, originally classified it as TLDW, seems plausible.
In this case it is probably memory corruption. The OS won't be able to detect such a thing unless the memory has ECC (relatively uncommon these days). It could theoretically detect it if the memory pages were checksummed and periodically verified against the checksum, but afaik no OS does so.
Edited because I thought bit-6 errors would flip letter case (upper to lower, lower to upper) when it's bit-5 that will do that.
A good read, and it seems to be an instance of the same problem.
"When The CRC and TCP Checksum Disagree" - http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.27.7...