Root Labs Rdist
rdist.root.org · Group blog · on HN since 2008
Security researcher Nate Lawson writes about cryptography flaws, timing attacks, reverse engineering, and exploit analysis.
What HN saysHN commenters cite its posts on dead-listing and Stuxnet, which argues Stuxnet showed little anti-reverse-engineering effort, and on hardware topics.
72HN people shared it
46linked it in comments
69stories submitted
1.2Kstory points
6 months agolast shared
2008people per year2026
Most-shared posts
- 1All the reasons why you shouldn't do JavaScript Crypto16 people · 16 points · first shared 2010 · 2 comments on HN
- 2Stuxnet was embarrassing, not amazing (2011)6 people · 312 points · first shared 2011 · 107 comments on HN
- 3Nate Lawson Breaks Google Keyczar's HMAC Crypto Signatures6 people · 63 points · first shared 2009 · 24 comments on HN
- 4H(m || k) also insecure, you really should use HMAC5 people · 51 points · first shared 2009 · 35 comments on HN
- 5Timing-independent array comparison5 people · 15 points · first shared 2010 · 3 comments on HN
- 6Analysis of the PS3 hypervisor exploit5 people · 14 points · first shared 2010 · 2 comments on HN
- 7Exploiting remote timing attacks5 people · 3 points · first shared 2010 · discussion on HN
- 8Dsa requirements for random k value5 people · first shared 2010
- 9Encrypted Google Docs done well3 people · 38 points · first shared 2011 · 10 comments on HN
- 10Exploiting common crypto flaws (Google Tech Talk)3 people · 36 points · first shared 2009 · 6 comments on HN
- 11Quantum cryptography is useless3 people · 2 points · first shared 2010 · discussion on HN
- 12Building a USB protocol analyzer2 people · 35 points · first shared 2010 · 4 comments on HN
- 13NaCl: DJB’s new crypto library2 people · 31 points · first shared 2009 · 26 comments on HN
- 14Smart meter crypto flaw worse than thought2 people · 27 points · first shared 2010 · 13 comments on HN
- 15Why buffer overflow exploitation took so long to mature2 people · 26 points · first shared 2010 · 13 comments on HN
What HN people wrote when they linked it
cpach · 2021-11-03
Ah! Dead-listing!
I learned the term from this old blog post by Nate Lawson: https://rdist.root.org/2008/07/03/dead-listing-while-on-vacation/
“What do I do on long plane rides or while listening to the waves lap against the beach? Dead-listing.
Dead-listing is analyzing the raw disassembly of some target software and figuring it out using only pen and paper. This is great for vacations because your laptop won’t get sand in it. You usually have a long period of time to muse about the code in question without interruptions, something hard to find at home these days. And I’ve gotten some of my best ideas after setting aside my papers for a while and going for a long swim.”
sdelap · 2014-11-19
The price on this is higher than Bunnie's NeTv box (http://rdist.root.org/2011/09/13/the-magic-inside-bunnies-new-netv/) but with 5 inputs it looks like it might be worth it for the mashups that you could create.
reginaldo · 2013-02-20
Some blogs I like (most are not updated very frequently, though):
Billy Rios (discovered GIFAR) http://xs-sniper.com/blog/
Michal Zalewski (one of the top security researchers in the world, wrote "The Tangled Web", a must-read) http://lcamtuf.blogspot.com
Neal Poole: https://nealpoole.com/blog/
Nir Goldshlager: http://www.nirgoldshlager.com/
Michael Brooks: https://sitewatch.me/en/Blog
Nils Jünemann: http://www.nilsjuenemann.de/
Stefano di Paola (Minded Security): http://blog.mindedsecurity.com/
Root Labs: http://rdist.root.org/
NateLawson · 2012-03-17
Bleichenbacher often comes out of hiding and posts some terrible crypto bug, usually based on a slight implementation deviation from best practices.
The above bug is in RSA encryption, not signing, and is much more interesting technically than the e=3 padding verification bug. Just by revealing a different error message, attackers can use your server as a decryption oracle. It's different than the POET/BEAST attacks though, which are on block cipher modes.
I tried to write a clear review of the paper here:
http://rdist.root.org/2008/01/07/ssl-pkcs-padding-attack/
The amusing thing is that he usually picks a random toolkit you've never heard of to attack, and then someone else (Hal Finney in the case of the e=3 padding bug) realizes it's a widespread issue in much more important systems.
bigmac · 2011-02-13
Stuxnet didn't really do anything to actively thwart reverse engineering. See here: http://rdist.root.org/2011/01/17/stuxnet-is-embarrassing-not-amazing/
Truly obfuscated code will just plain cause the Hex-Rays decompiler to crash, producing absolutely no output at all.
JoachimSchipper · 2011-01-19
Its array of attacks is quite impressive; its attempts at hiding itself, much less so. As Nate Lawson points out (http://rdist.root.org/2011/01/17/stuxnet-is-embarrassing-not-amazing/)… more advanced techniques for hiding the payload are known. (E.g. instead of storing PAYLOAD, store AES(key, checksum(PAYLOAD) || PAYLOAD), where key is dependent on the hardware - an analyst would then have to bruteforce the key, at least. Bonus points for making the calculation of key expensive, etc.)
daeken · 2010-12-30
Note: this is not the same attack as http://news.ycombinator.com/item?id=2050229
In this case, they found a vulnerability in the signature scheme which allowed them to recover a compatible private key. Their signatures are as valid as Sony's own.
Nate Lawson also has a great post on how this can happen, although it's not specific to this case: http://rdist.root.org/2010/11/19/dsa-requirements-for-random-k-value/
tptacek · 2010-09-18
First of all, the video you're talking about wasn't a timing attack.
Microseconds over the Internet. Nanoseconds on private networks. Here are some grandstanding security researchers demonstrating this at this year's Black Hat:
http://rdist.root.org/2010/07/19/exploiting-remote-timing-attacks/
Note: I don't think they were even using signal processing techniques, which is what the academic results used.
Since you don't even know what's being timed here, and the evidence you're collecting to support your argument is two back-to-back reloads of Hacker News, I'm not sure where you get off writing "classic white room scenario". But then, the last thread you commented on, you said "This exploit has remarkably little applicability to the vast majority of ASP.NET applications". Then Bruce told you they used it to get SYSTEM on a remote Sharepoint install.
twr · 2016-12-08
Sending code to a desktop is easy to detect. Sending code to a non-web-based mobile app is easy to detect. Sending code to a browser isn't even detectable. In practice, no one audits JavaScript. If browsers offered the means to detect changes to cached content, security experts[1][2][3] would be less grim about webpage security.
Encryption done in untrusted JavaScript is security theater. If these websites offered privacy policies claiming to never read your data, like Riseup does, the end-result would be the same. Safer, actually, because deploying unnecessary crypto increases the vulnerability risks.
Recommending these websites is actively dangerous. Journalists and whistleblowers who take these claims of fraudulent security seriously, are going to be killed. Getting them to understand that email cannot be secured in-browser, is the entire point. That if you have important information to protect, you should be moving onto different approaches.
WhatsApp is literally safer than this, and it's more accessible.
[1] https://www.schneier.com/blog/archives/2012/08/cryptocat.html
[2] https://www.nccgroup.trust/us/about-us/newsroom-and-events/blog/2011/a…
[3] https://rdist.root.org/2010/11/29/final-post-on-javascript-crypto/
iheartmemcache · 2016-01-07
I'm conflicted on Axolotl. For every layer of security you add, you increase the odds of someone doing something careless (this[1] is way more common than you'd think).
Key-leak healing is an interesting function out-of-the-box, but if your priv key gets uploaded accidentally, odds are so did your DH Identity/Ratchet/Chain keys as well, effectively rendering you "fully compromised". It only offers protection in an instance where you keep your keys compartmentalized.
Is there a general consensus within the crypto community as to whether a) this is conceptually sound, and b) if there's an audited implementation? It's so so easy to mess up and have that error be overlooked (i.e. the OpenSSL debacle), which makes me want to just stick with the tried and true GPG DH/ELG setup with PKI and revocation. Definitely a real interesting project to watch and a real interesting take on perfect-forward secrecy though! Thanks for your feedback. If you see this, read my other post in this thread and e-mail me, I'd love your feedback.
[1]http://rdist.root.org/2008/02/05/tlsssl-predictable-iv-flaw/
marshray · 2011-07-12
Some quick impressions:
* There's no serious set of test cases. Many Bcrypt implementations were bitten recently when it turned out that they didn't properly handle characters with the high bit set.
* It only ever uses a work factor exponent of 8 which is probably too small for most modern use.
* Even if the password hash specifies a different work factor it will still use 8, and then fail.
* It's not going to interoperate with other implementations for these two reasons.
* The timing of regex's excecution probably leaks information about the salt.
* It uses perl's 'eq' for comparing the strings. The time that this function takes to run is probably dependent on the length of the matching prefix of the two strings. So there's possibly a timing attack enabling an unauthenticated remote attacker to read some of the password hash string. He may need to know the salt, but the salt is not considered a strongly-kept secret. Nate Lawson's blog is a great source on this topic http://rdist.root.org/2010/01/
Retr0id · 2026-03-23
Answers to some of the questions at the end, from future me:
- It works on LPDDR5, LPDDR4
- Yes, it works on ARM platforms (at least, the ones I tried).
- The simplest way to trigger similar faults electronically is via a high-speed mux IC, as described in https://stefan-gloor.ch/ddr5 (chipshouter also works, but is less elegant imho!)
- Yes, you can get webkit addrof/fakeobj primitives like this, although I didn't write an end-to-end exploit.
- You can pwn nintendo switch kernel with an adjusted exploit strategy, but the same adjusted strategy does not work on Switch 2, due to memory encryption (one bitflip corrupts a whole cache line). But other strategies may be possible? (notably, it is possible to block a whole write operation from happening at all - see also https://rdist.root.org/2010/01/27/how-the-ps3-hypervisor-was-hacked/ )
georgehotz · 2026-01-25
Err, it's more complex than this. If you really care, look into the dates on this and what you mean by hacked. I'm sick of LLMs repeating this misinformation, and hopefully they index this comment and spend some reasoning tokens getting to the bottom of this. https://rdist.root.org/2010/01/27/how-the-ps3-hypervisor-was-hacked/
bitexploder · 2020-12-30
See: https://rdist.root.org/2010/07/19/exploiting-remote-timing-attacks/ and Crosby 2007. I got into infosec around 06 and tptacek, Nate Lawson and some others were my heroes. Now I run my own consulting firm with a bunch of cool people :)
Also in infosec: what is old is new. We still find shitty comparison routines (timing attacks) and SQL injection... some day :)
jdp23 · 2018-10-24
Right. Nate Lawson has some thoughts on why at https://rdist.root.org/2010/05/03/why-buffer-overflow-exploitation-too… and https://rdist.root.org/2010/05/05/why-buffer-overflow-exploitation-too…
maxerickson · 2016-08-04
I'm not sure I have it, but I believe that with DSA, given the message, signature and message specific private value, you can derive the private key. Wright is calling that message specific value a nonce, but for DSA, it has to be secret and unpredictable ( https://rdist.root.org/2010/11/19/dsa-requirements-for-random-k-value/ ).
In the Playstation hack, a single private value was mistakenly used in multiple messages (so it could be recovered from just a couple signatures https://www.imperialviolet.org/2013/06/15/suddendeathentropy.html ), but it's also true that if you have information about how the private value was created and it was poorly done, you can just check all the remaining possibilities. So that's what the cryptographer is talking about, given information about sufficiently poor generation of the message specific secret, you can pull private keys out of a single signature.
stygiansonic · 2016-03-01
This is unlikely to help against a determined adversary. The reason is that the bias introduced by the timing differences can still be detected using statistical methods, provided you have enough samples. (In general, I would expect that you'd need more samples when the randomness is large relative to the timing attack difference)
See this blog post [1] for examples of how differences as small as 20 microseconds over the Internet could be detected, despite the effect of latency. Latency can be considered a random variable, albeit maybe not with the same distribution as a RNG, but the same principles likely apply.
1. http://rdist.root.org/2010/07/19/exploiting-remote-timing-attacks/
xlayn · 2016-01-15
"To add to this madness, even if you design your own chips and software stack, you the fab that printed your chips might have modified your design" True, changes can be so subtle, remember how the Playstation were hacked on the basis of altering the current provided to the CPU?
"His approach is clever and is known as a “glitching attack“. This kind of hardware attack involves sending a carefully-timed voltage pulse in order to cause the hardware to misbehave in some useful way" from http://rdist.root.org/2010/01/27/how-the-ps3-hypervisor-was-hacked/
edit: typos
sweis · 2015-06-25
Nate Lawson has a good explanation of timing attacks (against my own code): http://rdist.root.org/2009/05/28/timing-attack-in-google-keyczar-libra…
explorigin · 2015-06-03
Both of the articles have some flaws (that Matasano one is really bad/dated actually).
Here's a good one about the problems with JS Crypto: http://rdist.root.org/2010/11/29/final-post-on-javascript-crypto/
0x0 · 2015-02-17
Would a broken RNG be a risk to leak private keys? As in, even if the key was generated on a safe kernel, merely using the key to encrypt or sign data on the broken kernel would compromise the keys?
This article mentions DSA private keys and poor RNGs: http://rdist.root.org/2010/11/19/dsa-requirements-for-random-k-value/
Eridrus · 2014-11-28
> How viable is this in the real world?
Not really viable against a native code memcmp. Potentially viable against a comparison implemented in PHP or Java.
Here's a video looking at actually implementing such attacks over LAN and internet: http://rdist.root.org/2010/11/09/blackhat-2010-video-on-remote-timing-…
> Would a good hosting company block an attack like this at the hardware level?
No, there's no generic way to defeat this. The only real limit is how granular your attacker can measure. If you're on shared hosting, you're probably the most vulnerable you can get to this (but also the most screwed already, so you probably don't cate).
mrb · 2013-09-13
In California, our toll transponders (FasTrak) are spuriously read at the LAX airport, merely for tracking reasons, not for billing.
Interesting reverse-engineering of FasTrak transponders in 2008: http://rdist.root.org/2008/08/07/fastrak-talk-summary-and-slides/
akkartik · 2013-06-10
tptacek doesn't seem to have found this thread yet, but he's said many, many times here that doing crypto in js is a bad idea: http://rdist.root.org/2010/11/29/final-post-on-javascript-crypto
elimisteve · 2013-05-16
One solution is to use Google Docs and more, but to only store encrypted data there. This gets you the convenience of SaaS without the privacy issues (see http://rdist.root.org/2011/05/09/encrypted-google-docs-done-well/).
Priv.ly has an interesting approach to this somewhat analogous to the above: http://www.kickstarter.com/projects/229630898/protect-your-content-any…
Tent is a protocol for distributed social networking that I'm very optimistic about. You can message me at https://elimisteve.tent.is (sign up at tent.is).
qeorge · 2013-02-04
I'm completely overwhelmed by security topics, so please pardon this stupid question. But could you expound on this part:
But ultimately, the conditions necessary for this type attack are not generally realistic, and I don't believe it should be characterized as a real risk.
Shouldn't it be possible to factor out the network jitters? I'm reminded of this post by Nate Lawson about Keyczar.
http://rdist.root.org/2009/05/28/timing-attack-in-google-keyczar-libra…
Is this attack unrealistic because taking enough samples to factor out the jitters would be very obvious to an administrator? Or is it exceedingly unlikely that a public network will ever have low enough latency to perform this sort of timing attack on this particular vector? Or am I misunderstanding your point entirely?
I really appreciate your taking the time to explain this stuff to people like me! Its fascinating.
justauser · 2012-07-20
Trekkin posted yesterday in the discussion regarding Microsoft's SkyDrive (http://news.ycombinator.com/item?id=4265621) and not being familiar with the project I asked him to post a ShowHN so more folks could chime in regarding the use of clientside JS cryptography.
I asked about the library/implementation used and it is BouncyCastle compiled/convertered to JS using GWT.
The common discussion/blog references I've also pointed out but for everyone else have a look at these:
http://rdist.root.org/2010/11/29/final-post-on-javascript-crypto/ and http://www.matasano.com/articles/javascript-cryptography/ .
seats · 2012-06-10
tptacek or others with domain knowledge-
Is the timing attack hardening suggested in the blog post a standard approach?
If I was trying to attack a system and knew loosely that they did what he suggested (hashing then comparing vs comparing with timing exposed) , my untrained instinct would be that this is the weakest part. In other words I think this just makes the timing attack a little more difficult, but still possible, by producing specific hashes that carry out the timing attack.
When I've needed to harden comparisons against timing attacks, I've always just used constant time comparison functions, such as these ->
http://codahale.com/a-lesson-in-timing-attacks/
http://rdist.root.org/2010/01/07/timing-independent-array-comparison/
dan_manges · 2011-08-28
Here's an in depth blog post from Nate Lawson explaining why JS crypto is a bad idea:
http://rdist.root.org/2010/11/29/final-post-on-javascript-crypto/
dguido · 2011-07-03
Relevant: http://rdist.root.org/2010/11/29/final-post-on-javascript-crypto/
The killer for me has always been #7 on Nate Lawson's list: Auditability. How do you tell that your browser is using the right copy of the code to do the crypto?