Feeds

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

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

Providing a secure and efficient Helpdesk

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

Choosing a cloud hosting partner with confidence

More from The Register

next story
SMASH the Bash bug! Apple and Red Hat scramble for patch batches
'Applying multiple security updates is extremely difficult'
Shellshock: 'Larger scale attack' on its way, warn securo-bods
Not just web servers under threat - though TENS of THOUSANDS have been hit
Apple's new iPhone 6 vulnerable to last year's TouchID fingerprint hack
But unsophisticated thieves need not attempt this trick
Oracle SHELLSHOCKER - data titan lists unpatchables
Database kingpin lists 32 products that can't be patched (yet) as GNU fixes second vuln
Who.is does the Harlem Shake
Blame it on LOLing XSS terroristas
Researchers tell black hats: 'YOU'RE SOOO PREDICTABLE'
Want to register that domain? We're way ahead of you.
Stunned by Shellshock Bash bug? Patch all you can – or be punished
UK data watchdog rolls up its sleeves, polishes truncheon
prev story

Whitepapers

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.
Storage capacity and performance optimization at Mizuno USA
Mizuno USA turn to Tegile storage technology to solve both their SAN and backup issues.
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?
Beginner's guide to SSL certificates
De-mystify the technology involved and give you the information you need to make the best decision when considering your online security options.
Security for virtualized datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.