July 21st, 2015
Jeremiah Grossman is widely considered to be one of the world’s most talented ethical hackers, but even his ninja-like prowess wasn’t enough to recover a forgotten password used to encrypt sensitive work documents contained on his MacBook Pro.
After fiddling with a freely available password cracking program, the CTO of Whitehat Security soon realized that its plodding speed—about one password guess per second—meant it would likely take him decades of tries before he arrived at the right one. That’s when he called in the big guns, namelySolar Designer and other principals behind the free John the Ripper password cracker as well as Jeremi Gosney, a password security expert at Stricture Consulting Group. (Ars has chronicled Gosney’s cracking prowess in articles here and here.)
“Collectively, these guys are amongst the world’s foremost experts in password cracking,” Grossman wrote in a blog post describing the odyssey unlocking the crucial files. “If they can’t help, no one can. No joking around, they immediately dove right in.”
Security concerns—not to mention the enormous size of the DMG encrypted disk images—prevented him from sending the files directly to his rescuers. So he availed himself of a feature in JtR called dmg2john, which separates the encryption contained in a DMG from the data it’s protecting. That allows the cracking program to target the password protecting the file without exposing the underlying data.
But even then, there was a problem. Grossman’s AES256-encrypted DMG used a staggering 250,000 rounds of PBKDF2-HMAC-SHA-1, an algorithm designed to run extremely slowly to make the job of password cracking harder. Gosney’s Xeon X7350 could crack a single round of HMAC-SHA1 at a rate of about 9.3 million hashes per second. By forcing Gosney to repeat the process 250,000 times, his system was reduced to just 37 or so hashes per second. Even using all four processors of his machine, he could bump up the performance to only about 104 hashes per second. (JtR doesn’t support graphic-cards when cracking Apple’s latest DMG formats.)
Once understanding this, Jeremi begins asking for more information about what the extra six or so characters in my password might have been. We’re they all upper and lower case characters? What about digits? Any special characters? Which characters were most likely used, or not used? Ever bit of intel helped a lot. We managed to whittle down an in initial 41106759720 possible password combinations to 22472. This meant the total amount of time required to crack the DMG was reduced to 3.5 minutes on his rig.
Subsequently, Jeremi sent me what had to be one the most relieving and frightening emails I’ve ever received in my life. Relieving because I recognized the password immediately upon sight. I knew it was right, but my anxiety level remained at 10 until typing it in and seeing it work. I hadn’t touched my precious data in weeks! It was a tender moment, but also frightening because, well, no security professional is ever comfortable seeing such a prized password emailed to them from someone else. When/if that happens, it typically means you are hacked and another pain awaits.
Interestingly, in living out this nightmare, I learned A LOT I didn’t know about password cracking, storage, and complexity. I’ve come to appreciate why password storage is ever so much more important than password complexity. If you don’t know how your password is stored, then all you really can depend upon is complexity. This might be common knowledge to password and crypto pros, but for the average InfoSec or Web Security expert, I highly doubt it. [sic]
Grossman’s predicament, and the techniques used to resolve it, underscore the never-ending battle between password security and the latest cracking strategies. For much more about the techniques used to create and defeat strong passwords, see the Ars feature Why passwords have never been weaker—and crackers have never been stronger. [via arstechnica]
Register for an account it’s free to participate in the discussion or share your thoughts in the Facebook comments below.