Feeds

WhatsApp crypto snafu drops trou on users' privates

'Very basic error' leaves messaging app open to snoopers

Seven Steps to Software Security

Mobile messaging service WhatsApp came for criticism over the robustness of its cryptography last week after a fix for a January security snafu was slammed for not being robust enough.

Back at the beginning of the year WhatsApp was investigated in Canada and the Netherlands for indefinitely retaining users' email address book data that it snaffled when they joined the service.

It was also criticised for generating cryptographic keys from data such as a mobile phone's IMEI (International Mobile Equipment Identity) number or their network MAC (Media Access Code) addresses.

The IMEI number is programmed into a mobile phone during the manufacturing process. Under certain circumstances it can be broadcast in clear text messages from a phone. They are a terrible choice for passwords because every network packet has the MAC address within it.

WhatsApp revised its encryption in the wake of these criticisms. However, a review of the fix by Dutch mathematics and computer science student Thijs Alkemade has revealed that WhatsApp's approach, while improved, remains deeply flawed.

WhatsApp generates a session key that it uses to initialise a stream cipher. But the same cipher stream is used for both outgoing and incoming messages.

This is a cryptographic mistake akin to using a one-time pad more than once, which creates serious security shortcomings in the system, as Sophos security researcher Paul Ducklin explains:

"A stream cipher works as a pseudorandom number generator, emitting an unpredictable string of bytes that you XOR with the plaintext to encrypt," Ducklin writes on Sophos' Naked Security blog. "In other words, you mustn't use the same string of bytes to encrypt anything else, because that would make it predictable, and that is a cryptographic disaster."

"A stream cipher works like a pseudo one time pad. A crypto-system that relies on a string of hardware random numbers to create an unbreakable cipher if – and only if – the pad is used just once," he added.

In addition, WhatsApp uses the cryptographically flawed RC4 cipher instead of more robust alternatives.

The upshot is that, as things stand at the time of writing, anyone capable of eavesdropping on your WhatsApp connection would also be able to decrypt messages with minimal difficulty.

Ducklin advises WhatsApp users only to use the service for messages they are happy to be considered public until a more robust encryption scheme is introduced.

Alkemade, the Dutch researcher who created a buzz in the security community by publicising the flaws last week, suggests that WhatsApp should use Transaction Layer Security, or TLS – the same end-to-end encryption used by secure websites.

Michael Sutton, director of security research at Zscaler, criticised WhatsApp for basic cryptographic mistakes.

"WhatsApp made a very basic error when implementing their message encryption by leveraging the same encryption key for both incoming and outgoing messages," Sutton said. "While compromise of the flaw is not simple, it is quite possible and as such, WhatsApp communication cannot be considered secure until this issue is addressed. It is not yet clear if the implementation flaw is uniform across all WhatsApp implementations but for now, all implementations should be considered insecure."

The Register forwarded these criticisms to WhatsApp last week, inviting it to comment. We are yet to hear back. So it's unclear whether or not WhatsApp acknowledges that there's a problem, much less how and when it might deliver a fix.

A successful social engineering attack last week against domain name firm Network Solutions, used by WhatsApp, meant that the messaging app was one of a number of firms to suffer a DNS hijack attack in turn. Surfers attempting to visit its site were redirected to a pro-Palestinian propaganda website instead.

While that particular problem was resolved within hours on Tuesday, the crypto problem may take a far greater effort to resolve. ®

Mobile application security vulnerability report

More from The Register

next story
Yorkshire cops fail to grasp principle behind BT Fon Wi-Fi network
'Prevent people that are passing by to hook up to your network', pleads plod
HIDDEN packet sniffer spy tech in MILLIONS of iPhones, iPads – expert
Don't panic though – Apple's backdoor is not wide open to all, guru tells us
NEW, SINISTER web tracking tech fingerprints your computer by making it draw
Have you been on YouPorn lately, perhaps? White House website?
LibreSSL RNG bug fix: What's all the forking fuss about, ask devs
Blow to bit-spitter 'tis but a flesh wound, claim team
Attackers raid SWISS BANKS with DNS and malware bombs
'Retefe' trojan uses clever spin on old attacks to grant total control of bank accounts
Manic malware Mayhem spreads through Linux, FreeBSD web servers
And how Google could cripple infection rate in a second
Mozilla fixes CRITICAL security holes in Firefox, urges v31 upgrade
Misc memory hazards 'could be exploited' - and guess what, one's a Javascript vuln
Don't look, Snowden: Security biz chases Tails with zero-day flaws alert
Exodus vows not to sell secrets of whistleblower's favorite OS
prev story

Whitepapers

Designing a Defense for Mobile Applications
Learn about the various considerations for defending mobile applications - from the application architecture itself to the myriad testing technologies.
How modern custom applications can spur business growth
Learn how to create, deploy and manage custom applications without consuming or expanding the need for scarce, expensive IT resources.
Reducing security risks from open source software
Follow a few strategies and your organization can gain the full benefits of open source and the cloud without compromising the security of your applications.
Boost IT visibility and business value
How building a great service catalog relieves pressure points and demonstrates the value of IT service management.
Consolidation: the foundation for IT and business transformation
In this whitepaper learn how effective consolidation of IT and business resources can enable multiple, meaningful business benefits.