Slashdot Mirror


Weak Apple PRNG Threatens iOS Exploit Mitigations

Trailrunner7 writes "A revamped early random number generator in iOS 7 is weaker than its vulnerable predecessor and generates predictable outcomes. A researcher today at CanSecWest said an attacker could brute force the Early Random PRNG used by Apple in its mobile operating system to bypass a number of kernel exploit mitigations native to iOS. 'The Early Random PRNG in iOS 7 is surprisingly weak,' said Tarjei Mandt senior security researcher at Azimuth Security. 'The one in iOS 6 is better because this one is deterministic and trivial to brute force.' The Early Random PRNG is important to securing the mitigations used by the iOS kernel. 'All the mitigations deployed by the iOS kernel essentially depend on the robustness of the Early Random PRNG,' Mandt said. 'It must provide sufficient entropy and non-predictable output.'"

11 of 143 comments (clear)

  1. all PRNGs are deterministic by YesIAmAScript · · Score: 3, Informative

    So "this one is deterministic" seems like a weak complaint.

    This is essentially what makes them PRNGs instead of RNGs.

    --
    http://lkml.org/lkml/2005/8/20/95
    1. Re:all PRNGs are deterministic by petermgreen · · Score: 4, Informative

      For a CSPRNG* the primary aim is to make it computationally infeasable for an attacker to predict the output even if the attacker has an aribiterally long sample of the output and even if the attacker knows how much output has been requested from the prng since it started.

      To do this places demands on both the prng itself (it must be computationally infeasible to reverse the operations done by the prng and hence determine it's internal state from an output sample) and on the seed data fed into the prng (it must be sufficiently unknown/unpredictable to the attacker that the attacker can't obtain the seed state through a combination of his knowlage of the state of the system and brute force checking of different seed values)

      Afaict it is the latter where things usually go wrong.

      * Cryptographically secure psuedo-random number generator.

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
  2. Seems it would be easy to gather entropy.. by Red_Chaos1 · · Score: 4, Insightful

    ..on a smart phone like the iPhone. Use the gyros/accelerometers, make the user draw randomly on the screen, maybe use random info like wifi network names currently available, generate random info based on images on the phone, etc. etc. Plenty of data/means available to create the entropy needed.

  3. Not responsible disclosed by Trillan · · Score: 3, Interesting

    "Mandt said he did not disclose the issue to Apple"

    We really need to stop paying people — directly or indirectly — for irresponsible disclosure.

    1. Re:Not responsible disclosed by TechyImmigrant · · Score: 4, Insightful

      Bad PRNGs have jumped the shark. For a company like Apple to have a supposedly secure PRNG in their products and for them not to have had a group of security Nazis identify all the PRNGs in their products and make sure they're all good and fix them where not, it unconscionable.

      In my company we systematically did exactly that. It's standard practice these days.

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
  4. Re:Why do we have all these custom PRNGs? by DigitAl56K · · Score: 3, Insightful

    Crypto and security guys are an opinionated lot. Getting everyone to agree to some kind of standard is unlikely.

    There are surely a set of criteria to be met in the design for a PRNG to be acceptable, a set of known attacks and weaknesses that the PRNG has to be resiliant to to some established degree, some minimum level of performance required (max ops per generation, average ops or ms per generation of n numbers on a certain CPU feature set), unencumbered by patents or full waiver provided. You put together some candidates, allow some window of time (e.g. a year) for everyone to poke holes in them provided all the known materials that would assist someone to make them fail the acceptance criteria. Whatever makes it through is your suite.

  5. Re:Why do we have all these custom PRNGs? by Anonymous Coward · · Score: 3, Informative

    Its called FIPS140-2. Among other things it requires that PRNG implementations are strong.

    Sadly most people/companies/products do not require FIPS140-2 certification. If they did we wouldn't have weak PRNG implementations out there.

  6. PRNG was outsourced by ArhcAngel · · Score: 5, Funny

    Apple didn't want another security embarrassment so they asked the NSA to supply the most secure PRNG they had.

    --
    "A person is smart. People are dumb, panicky dangerous animals and you know it." - K
  7. Re:Why do we have all these custom PRNGs? by INT_QRK · · Score: 3, Insightful

    Which, by the way says at the bottom of page 1...wait for it..."There are no FIPS Approved nondeterministic random number generators."

  8. Entropy Extraction on phones by TechyImmigrant · · Score: 3, Informative

    The article incoherently addresses entropy extraction, not matters of PRNGs but the author doesn't appear to understand the difference.
    However the 'issue' is still an issue. Predictable output is bad in this context.

    What amazes me is when designers flap around looking for 'random looking' things in memory and interrupts to munch together to get entropic numbers when it's in a phone with a radio next to it which as directly sampling noise and is entirely capable of making it available to the OS for used in seeding PRNGs.

    It's not just Apple. They all do it.

    --
    I should use this sig to advertise my book ISBN-13 : 978-1501515132.
  9. Re: Laugh : "surprisingly" by LordLimecat · · Score: 4, Insightful

    Just because there are nefarious things going on doesnt mean that people have stopped making mistakes, or that the two are somehow mutually exclusive.

    Yes, you should still want proof that this is malicious or subversive.