Feeds

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

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

Internet Security Threat Report 2014

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

Intelligent flash storage arrays

More from The Register

next story
Knock Knock tool makes a joke of Mac AV
Yes, we know Macs 'don't get viruses', but when they do this code'll spot 'em
Feds seek potential 'second Snowden' gov doc leaker – report
Hang on, Ed wasn't here when we compiled THIS document
Shellshock over SMTP attacks mean you can now ignore your email
'But boss, the Internet Storm Centre says it's dangerous for me to reply to you'
Why weasel words might not work for Whisper
CEO suspends editor but privacy questions remain
DEATH by PowerPoint: Microsoft warns of 0-day attack hidden in slides
Might put out patch in update, might chuck it out sooner
BlackEnergy crimeware coursing through US control systems
US CERT says three flavours of control kit are under attack
prev story

Whitepapers

Why cloud backup?
Combining the latest advancements in disk-based backup with secure, integrated, cloud technologies offer organizations fast and assured recovery of their critical enterprise data.
A strategic approach to identity relationship management
ForgeRock commissioned Forrester to evaluate companies’ IAM practices and requirements when it comes to customer-facing scenarios versus employee-facing ones.
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.
Storage capacity and performance optimization at Mizuno USA
Mizuno USA turn to Tegile storage technology to solve both their SAN and backup issues.
The hidden costs of self-signed SSL certificates
Exploring the true TCO for self-signed SSL certificates, including a side-by-side comparison of a self-signed architecture versus working with a third-party SSL vendor.