Feeds

New code strategies to fight side-channel attack

Car keys, phone, laptop - all hacked

Seven Steps to Software Security

Keyless entry systems are ubiquitous, from locking your car to accessing the restricted corridors of government and corporate power. It's therefore troubling to learn Wikipedia reading egg heads have cracked the encryption of a device widely used in a variety of keyless entry systems. There goes the girlfriend's VW, you thought you'd locked.

Side-channel attacks - where criminals glean the information from such systems in order to breach them simply by measuring the power consumption of a chip or by monitoring processor timings - are a growing threat not just to keyless entry systems, though.

Embedded devices such as smart phones and laptops are also in the firing line. And, according to the managing director of security specialist Riscure, Harko Robroch, application developers need to adopt new coding strategies to fight such attacks.

"Side-channel attacks are well known in the smartcard industry and although not yet mainstream, the growth of embedded systems with built in security functions is making them a target for this method of attack," he told Reg Dev ahead of his presentation at next week's RSA conference in San Francisco, California.

Robroch's presentation will focus on practical coding strategies that developers can use for protection.

Robroch said that while side-channel attacks demand considerable technical knowledge, criminals are resorting to them because successful security strategies had shut down many other avenues of attack.

"A lot of the new chip sets have strong security embedded in them which protects them from many traditional vulnerabilities. But they are not protected from side-channel attacks because it is very difficult. Based on our experiences with smartcards we have drawn up a set of guidelines to help developers build more secure applications for embedded systems," Robroch explained.

One simple trick is to vary password verification routines. "When you do a string compare to check a password, for example, to make it efficient you usually start with the first character and work through in sequence. If you hit a wrong character you throw it out. By measuring the time taken to do the check, a side-channel scan can identify which characters have been accepted. So you can protect the password by not checking it in sequence," he said.

Robroch added that the same principle can be applied to key parity checks. "In most implementations of GNU, for example, key parity checking is done sequentially so it is possible to detect the length of the key through side-channel attack. Either don't do key parity checks or make sure they are not done sequentially."

Robroch acknowledged that there are downsides to coding to protect from side channel attacks. "The awkward thing for developers is that the sort of code you produce is going to be less easy to follow and probably less efficient.

"Another problem is that if you use smart optimizing language compilers you can end up losing the protection you have built in. Things like double checking data fields or deliberately writing inefficient code to randomize timing will often be removed in the optimization process."

On the upside, more complex chip architectures - such as multi-core processors - make side channel attacks more difficult but not impossible. "A lot of devices are protected by their complexity - but even with multi-core processors it is possible to isolate activity and measure it," Robroch said.®

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
Black Hat anti-Tor talk smashed by lawyers' wrecking ball
Unmasking hidden users is too hot for Carnegie-Mellon
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
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.