The Register® — Biting the hand that feeds IT

Feeds

New code strategies to fight side-channel attack

Car keys, phone, laptop - all hacked

Regcast training : Hyper-V 3.0, VM high availability and disaster recovery

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.®

Agentless Backup is Not a Myth

Latest Comments

Why unencrypted passwords

A server with access to a cleartext secret can send a "challenge" and demand the client provide a hash of the challenge + secret to login, preventing the transmission of the password over an unencrypted connection. This is used, for example, by the APOP command of pop3. (And if that sounds rudimentary, Outlook doesn't even bother to do this - it just sends it as plaintext.)

But to do that, the server needs access to an unencrypted password. Even if you use encryption on the password file (properly salted, to prevent the use of rainbow tables) then chances are anyone who can get at the password file can get at the master key and decrypt them.

0
0

Comparing against encripted form

Hopefully very few people have a plain password to compare with! What I think they meant is the compare with an encrypted and hidden password. If this uses a string compare then comparing the process time allows one to determine it a byte at a time by going through passwords that encrypt with one byte at a time in order changed - so a 10 byte encrypted password just needs 2560 probes. Of course generating such weird passwords takes some work but even a dictionary of the first 4 characters probably would indicate the general form for a lot of passwords.

0
0

epoxy resin....

whats wrong with just encasing everything but the power source in resin, and check the resistance of the resin, e.g. if resistance is lower than expected default to hello world code?

0
0

More from The Register

 breaking news
NSA PRISM snoop-gate: Won't someone think of the children, wails Apple
10,000 things probed, mostly about missing kids, Alzheimer patients, we're told
 breaking news
NSA PRISM-gate: Relax, GCHQ spooks 'keep us safe', says Cameron
Whatever they are up to, it's all above board, we're told
PRISM snitch claims NSA hacked Chinese targets since 2009
Snowden suddenly looks safer in Hong Kong after revelations
 breaking news
US chief spook: Look, we only want to spy on 6.66 BEELLLION of you
Americans assured they are not in the NSA's sights
Speech-to-text drives motorists to distraction
Will talking to you mean I crash into that car up ahead, Siri?
DHS warns of vulns in hospital medical equipment
Has your doctor's anasthesia machine been hacked?
 breaking news
'BadNews is malware' says outfit that found it
Google says code harmless but Lookout says code base is evolving
Panda-peddlers cuffed for chess gambling gambit
More porridge on the menu for Chinese coders after second offence
 breaking news
Yes, maybe we should keep hackers in the clink for YEARS, mulls EU
Watch out black hats, they just might throw away the key
Microsoft borks botnet takedown in Citadel snafu
Stupid Redmond kicked over our honeypots, wail white hats