Feeds

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

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

Next gen security for virtualised datacentres

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
Goog says patch⁵⁰ your Chrome
64-bit browser loads cat vids FIFTEEN PERCENT faster!
Chinese hackers spied on investigators of Flight MH370 - report
Classified data on flight's disappearance pinched
NIST to sysadmins: clean up your SSH mess
Too many keys, too badly managed
Scratched PC-dispatch patch patched, hatched in batch rematch
Windows security update fixed after triggering blue screens (and screams) of death
Researchers camouflage haxxor traps with fake application traffic
Honeypots sweetened to resemble actual workloads, complete with 'secure' logins
Attack flogged through shiny-clicky social media buttons
66,000 users popped by malicious Flash fudging add-on
prev story

Whitepapers

Best practices for enterprise data
Discussing how technology providers have innovated in order to solve new challenges, creating a new framework for enterprise data.
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.
Advanced data protection for your virtualized environments
Find a natural fit for optimizing protection for the often resource-constrained data protection process found in virtual environments.
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.
High Performance for All
While HPC is not new, it has traditionally been seen as a specialist area – is it now geared up to meet more mainstream requirements?