Security Experts:

CERT Issues Warning After Mathematician Discovers DKIM Flaw

When mathematician Zachary Harris was examining a job pitch from a recruiter at Google, he discovered a flaw in DKIM that allowed him to spoof emails from the Internet giant’s domain.

Subsequent research by Harris led him to determine that Google, Yahoo, Microsoft, and several other domains were also vulnerable to DKIM spoofing. In response to this, CERT issued a warning advising organizations using the process to harden their keys.

DKIM SpoofingDKIM was developed to prevent domain spoofing. It’s a way for the domain to claim responsibility for an email.

“DomainKeys Identified Mail (DKIM) permits a person, role, or organization to claim some responsibility for a message by associating a domain name [RFC1034] with the message [RFC5322], which they are authorized to use. This can be an author's organization, an operational relay, or one of their agents. Assertion of responsibility is validated through a cryptographic signature and by querying the Signer's domain directly to retrieve the appropriate public key,” explains RFC 6376 (DKIM).

When Harris received the job pitch from Google, the mathematician wanted to confirm that it was legitimate, and noticed that the DKIM was 512-bits, half the strength of what is recommended. Further analysis led him to discover that Yahoo, Twitter, Amazon, and eBay were also using 512-bit keys. HSBC, US Bank, LinkedIn, and PayPal were caught using 768-bit keys.

This is important because 512-bit keys can be cracked using AWS for less than $100, and while a bit more costly, 768-bit keys can be cracked the same way.

This opens the door to domain spoofing that – since the DKIM signature is valid – might bypass some spam filters. This in turn leads to the risk of Phishing, with a higher than normal success rate.

“The 512-bit keys I can factor in about 72 hours using Amazon Web Services for $75. And I did do a number of those. Then there are the 768-bit keys. Those are not factorable by a normal person like me with my resources alone. But the government of Iran probably could, or a large group with sufficient computing resources could pull it off,” Harris told Wired's Kim Zetter in an interview.

In their warning, CERT advised administrators replace all RSA signing keys fewer than 1024 bits, and configure systems to not use or allow testing mode on production servers. Most of the companies notified about the issue have upgraded to 1024-bit keys. Others seem to be taking their time. Still, there are millions of DKIM implementations online that will need upgraded, making this an issue to be mindful of. 

Subscribe to the SecurityWeek Email Briefing
view counter
Steve Ragan is a security reporter and contributor for SecurityWeek. Prior to joining the journalism world in 2005, he spent 15 years as a freelance IT contractor focused on endpoint security and security training.
view counter