Feeds

iOS 7's weak random number generator stuns kernel security – claim

'Trivial' to break PRNG used to mitigate against attacks, says researcher

Build a business case: developing custom apps

In an effort to improve iDevice security, Apple replaced its internal random number generator between iOS 6 and iOS 7 – but a security researcher believes Cupertino inadvertently downgraded security.

The issue is outlined here by Azimuth Security, whose Tarjei Mandt also detailed the issue at last week's CanSecWest conference in Vancouver.

Mandt says the early_random() PRNG (pseudo-random number generator), shipped in the latest iOS 7 update, is “alarmingly weak”. According to ThreatPost, he told the conference the PRNG is “deterministic and trivial to brute force”.

The PRNG is started at boot time, and as Azimuth Security explains, it uses what's called a linear congruential generator (LCG) to provide entropy for the PRNG. The company's white paper explains the LRG thus:

“An LCG is an algorithm that yields a sequence of random numbers calculated with a linear equation. LCGs are one of the oldest and best-known pseudo-random number generator algorithms, and are commonly leveraged in standard libraries and applications for being fast and easy to implement. Although these algorithms perform well in resource-constrained environments and have appealing statistical properties, they exhibit some severe defects and are easily broken when confronted by an adversary who can monitor outputs”.

Mandt writes that the vulnerability could recover PRNG outputs “without being assisted by additional vulnerabilities or having prior knowledge about the kernel address space … this may allow trivial exploitation of vulnerabilities previously deemed non-exploitable”.

The early_random() in iOS 7, the company explains in its blog post, can only produce a maximum of 219 unique outputs, and after 217 outputs: the longest sequence of unique PRNG outputs, he writes, is just 131,072.

“An attacker can recover arbitrary outputs if the lower 19 bits of the internal state is known,” Mandt writes in his slide-pack (here). While the system discards the lower three bits of that state, these are trivial to recover from two successive states of the PRNG.

That means the PRNG seed generated at power-up by iBoot is recoverable, he writes.

“An unprivileged attacker, even when confined by the most restrictive sandbox, can recover arbitrary outputs from the generator and consequently bypass all the exploit mitigations that rely on the early random PRNG,” Mandt concludes. ®

The essential guide to IT transformation

More from The Register

next story
Rupert Murdoch says Google is worse than the NSA
Mr Burns vs. The Chocolate Factory, round three!
e-Borders fiasco: Brits stung for £224m after US IT giant sues UK govt
Defeat to Raytheon branded 'catastrophic result'
Germany 'accidentally' snooped on John Kerry and Hillary Clinton
Dragnet surveillance picks up EVERYTHING, USA, m'kay?
Snowden on NSA's MonsterMind TERROR: It may trigger cyberwar
Plus: Syria's internet going down? That was a US cock-up
Who needs hackers? 'Password1' opens a third of all biz doors
GPU-powered pen test yields more bad news about defences and passwords
Think crypto hides you from spooks on Facebook? THINK AGAIN
Traffic fingerprints reveal all, say boffins
Microsoft cries UNINSTALL in the wake of Blue Screens of Death™
Cache crash causes contained choloric calamity
prev story

Whitepapers

Endpoint data privacy in the cloud is easier than you think
Innovations in encryption and storage resolve issues of data privacy and key requirements for companies to look for in a solution.
Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
Top 8 considerations to enable and simplify mobility
In this whitepaper learn how to successfully add mobile capabilities simply and cost effectively.
Solving today's distributed Big Data backup challenges
Enable IT efficiency and allow a firm to access and reuse corporate information for competitive advantage, ultimately changing business outcomes.
Reg Reader Research: SaaS based Email and Office Productivity Tools
Read this Reg reader report which provides advice and guidance for SMBs towards the use of SaaS based email and Office productivity tools.