8 ms·
Apple iOS Hardware Assisted Screenlock Bruteforce
- allending 12y agoOP here. Devious. Cuts off the power source after failed attempts to get around 10 attempts restriction.
- makomk 12y agoOld smart card hacker's trick, surprised Apple didn't defend against it. Of course, it's not enough to delay reporting success or failure until the counter is updated, you've got to make sure there's no side channel that could leak that information early as well.
- knodi123 12y agocouldn't you just use a capacitor to give you a few seconds of power after the supply is cut?
- frankchn 12y agoOr just write the attempt count and flush to flash even before checking whether the code is correct? The count can always be updated to zero once it is determined that the code is right.
- Sanddancer 12y agoThat would mean a lot of excess writes given the most common use case of the user putting the password in the first time.
- function_seven 12y agoHow large is the write? A byte? Or 8 bytes for one 64-bit word? I can't imagine that would impact the user in any way, unless I'm not thinking this through...
- Sanddancer 12y agoFlash writes in full blocks, so it would be 4k with most recent flash chips
- frankchn 12y agoFrom a back of the envelope calculation - given a 10,000 write cycle budget for 16 GB of flash memory and a 512 KB block size (all worst case scenarios), you are looking at 300 million writes before the flash memory starts to fail. I probably unlock my phone 50 times a day (incurring 100 writes under my scheme), and that is negligible in the grand scheme of things.
- ObviousScience 12y agoLet's assume that you're correct, that the most common case is the user putting in the password correctly the first time. Just to get some other numbers, let's assume I sleep 7 hours a day on average, and look at my phone every 5 minutes the rest of the day. Then we're looking at 204 extra writes a day (17 * 12), and ~74.5k extra writes a year, and ~150k writes over the lifetime of the phone. This isn't a negligible change, but seems within the acceptable number of writes for the phone to perform over its lifetime to properly implement a key piece of security.
- Sanddancer 12y agoI'd disagree that it's needed. An explicit sync() before returning a notification that the password is invalid would stop this attack as well, and again wouldn't require any additional writes for the most common case of the user entering in the password correctly.
- wang_li 12y agoThey don't need to write anything. They just need to impose an increasing delay after every failure when the code is being supplied via USB or bluetooth. First failure, wait two seconds, fifth failure wait 30 seconds, eigth failure wait 90 seconds. If they really wanted to write it to flash, they could make it so that the first failure isn't written at all, the second has a 50% chance, the third a 100% chance. Or make it so that if the device has only been running a short period of time, then all failures require a thirty second wait until you can retry. There are plenty of ways to make it impractical without necessarily reducing the lifetime of the device.
- stordoff 12y agoiOS already tracks time since power on IIRC, so if this produces too many writes couldn't you write out to flash first if the phone was last powered on within the last hour (for example)? It wouldn't completely fix the issue, but would vastly increase the time required. That being said, I can't imagine that flushing to flash each time would substantially reduce its lifetime.
- 13 12y ago> iOS already tracks time since power on IIRC, Records it in photo EXIF data, for some reason.
- ibmthrowaway218 12y agoSo: don't write before the first check, write before subsequent checks.
- moe 12y agoIn this attack there is no subsequent check.
- lvillani 12y agoThey also get around the increasing delay enforced after a certain number of failures, to slow down bruteforce attacks.
- priz3 12y agoArticle mentions brute forcing would take ~111 hrs. That looks like it's (10^4 * 40) / (60*60) which would be the maximum time needed to brute force. Note for those not good at dividing hours by 24 in your head: 111 hrs is 4.65 days
- therealwill 12y ago23.335% of pin codes can be guessed in under 10 attempts. Source: http://www.datagenetics.com/blog/september32012/ http://www.datagenetics.com/blog/september32012/
- gilgoomesh 12y agoBased on that list, 18.61% of pin codes can be guessed before the 3 attempt lockout, no fancy power tricks required.
- jychang 12y agoYeah, a lot of people are hung up on the "takes 4 days to brute force" part. I'd be willing to guess that most phones have a passcode that's like "1234", or between the numbers 1900 and 2100. 300 tries can easily get a vast majority of 4 digit passcodes, let alone 4 days' worth of tries.
- kalleboo 12y agoYou don't have to guess, the post you're replying to showed 11% of users had 1234 as their PIN, and has a detailed analysis of common patterns, such as birth years and PIN pad patterns (2580). You should read it, it's interesting.
- lucb1e 12y agoFrom the article: > Utterly staggering at the lack of imagination ... nearly 11% of the 3.4 million passwords are 1234 !!! Not so staggering. Those people probably did not want a PIN to begin with. I know someone with the PIN 1234. Why does she have a PIN at all? Because the phone requires it to store Exchange credentials (if I remember correctly). I've suggested it changing it to 1111 because it's even faster to type, but she never got around to it. I too have a pattern lock, the simplest one I could come up with. Easily broken. Why? It's required to store VPN credentials in Android. And there is a second advantage: by trying a PIN, even a default one, you are gaining unauthorized access to an automated system. This is illegal by Dutch law, even if the only security was a warning message on the lock screen saying "Do not unlock."
- bane 12y agoOut of curiosity, anybody know the resolution of the fingerprint reader? I'm assuming it's some kind nxm scanner that could also be brute forced if needed, just take longer.
- MBCook 12y agoTouchID doesn't work when the phone is first booted. You must sign in with your pin or password (whichever is setup) once first to'unlock' it. But it also has a lockout. If you mess up too many times (5-10?) then TouchID gets temporarily disabled and you must login once with pin/password as if the phone was reset. That means their 'reboot the phone' attack is worthless against TouchID. By the time you figure out the password you've already unlocked the phone and TouchID is no longer relevant to you unless you're somehow trying to reverse engineer someone's fingerprint.
- bane 12y ago> unless you're somehow trying to reverse engineer someone's fingerprint Well yeah basically. I mean, it's just recognizing some pattern as "the fingerprint" right? So if you can replicate a matching pattern you can beat a fingerprint scanner. I'm just curious what resolution the scanner/recognizer pattern is at. I'm assuming Apple uses some kind of capacitive sensor. From googling it looks like it's a 500ppi sensor. The sensor isn't even 1"x1", it's maybe 1/2"^2. Which gives us 62,500 "pixels" or whatever the sensing elements are called. That's 2^62,500 (assuming the sensors are binary) combination. That's a big number, and probably uncrackable. But maybe there's some fuzziness in the sensor or the software and the effective resolution is more like 100ppi. That's still a huge number (753 digits). But then maybe you can apply some smart guesses or some reverse engineering and concentrate patterns in the middle of the sensor (where good contact might be made), maybe down to a 1/32" section. Now we're within brute force distance. All you need now is a tool at that resolution to input fingerprint patterns, or just provide signals to the sensor lines. After all, this is possible [1], why not fingerprints? 1 - http://gizmodo.com/this-is-what-happens-when-you-reverse-engineer-facial-r-1664275598 http://gizmodo.com/this-is-what-happens-when-you-reverse-eng...
- 12y ago
- therealwill 12y ago"Our initial analysis indicates that the IP Box is able to bypass this restriction by connecting directly to the iPhone’s power source and aggressively cutting the power after each failed PIN attempt, but before the attempt has been synchronized to flash memory" My guess is that Apple is only synchronizing after the failure animation completes. Should be easy to patch.
- rando3826 12y agoI highly doubt it. And I doubt they will patch it.
- madeofpalk 12y agoWhy would you doubt they would patch it? Everything indicates that Apple takes this type of security somewhat seriously.
- urda 12y agoYeah Apple is pretty serious on security honestly. I expect to see a patch or write up here shortly.
- dan1234 12y agoLooks like it might have been patched already. FTA: >Further research suggests this could be the issue detailed in CVE-2014-4451 but this has yet to be confirmed. We plan to test the same attack on an 8.2 device and will update with our progress.
- Usu 12y agoThe article was posted a week ago, but there are no updates about iOS 8.2 as of today and since it shouldn't be too long to just upgrade iOS and see if after 10 attempts the device gets wiped I'm guessing that the fix for CVE-2014-4451 actually patched this but the news wasn't as interesting as it would've been "iOS 8.2 vulnerable too" to update the post with
- ikeboy 12y ago
- dendory 12y agoIt takes over 100 hours to brute force a 4 digit PIN.. I'm not impressed. For further security, everyone should use a longer PIN along with Touch ID, that is what I do.
- pfranz 12y agoQuick tip: If you turn off Simple Passcode (the 4-digit pin) and your Passcode is all numbers then you will be presented with a number pad. It's not as secure as numbers and letters but I find it much easier to type in a long number.
- artenix 12y agoGood catch! So, if I choose 8 random digits, it could take 132 years to break.
- PhantomGremlin 12y agoInteresting. I just turned off Simple Passcode as an experiment. The number pad presented resembles a standard DTMF keypad. Which means that it also has all the letters on it. Some people might prefer using those to numbers. E.g. a long time ago a friend had a phone number of "tinyhat". Much easier for me to remember, even after nearly 40 years, than the 7 digits that translated to.
- deleted 12y ago[deleted]
- tlrobinson 12y agoCan this be used by thieves to unlock iPhones in the Find My iPhone "Lost Mode"? Perversely, "Lost Mode" incentivize thieves to do whatever necessary to unlock your phone, since they can't just wipe it and resell it. Apparently it's common for thieves to phish the contact phone number displayed on a "Lost Mode" iPhone: http://www.symantec.com/connect/blogs/cybercriminals-phish-icloud-credentials-victims-iphone-ipad-theft http://www.symantec.com/connect/blogs/cybercriminals-phish-i...
- danielmiessler 12y agoThis is a legit issue, and you can definitely expect it to be patched quite soon. Not sure how/why someone would think it wouldn't get patched. Many, many enterprises bet their data on passcodes combined with the 10-guess wipe defense. You can bet that they've already called Apple many times about this. It'll be patched very soon.
- robmcm 12y agoEnterprise can mandate complex pass codes, not the 4 digit pins. The 11 hour number will increase rapidly with complex codes. However I assume they will still want the wipe feature to actually work.
- im2w1l 12y agoSo it cuts power before the iPhone can store that a failed attempt occurred. It's such a simple, stupid, wonderful idea. I love it. Kudos to whoever came up with it.
- 13 12y agoThis is not a particularly new attack. It's been used for years against simpler devices, especially where you can access the flash chip and force it's write protect on.
- gambiting 12y agoIt's not really an "attack", but old Pokemon games on Gameboy and Gameboy Colour used the same technique for cloning items and pokemon - you send a pokemon to a friend, and switch off the power before the game has a chance to save successfully afterwards - presto, now both you and your friend have the sent pokemon.
- im2w1l 12y agoOh, I remember that. I think I did it by moving the Pokemon to the PC.
- geon 12y agoWouldn't you risk corrupting the file if you cut power while saving?
- gambiting 12y agoYep, there was a risk. But with pokemon games they would say "saving game now" but the actual process didn't start until the whole text appeared on the screen - so as soon as the letters started appearing you could kill the power and it was fine.
- jdjb 12y agoEven on more modern Pokemon systems (nintendo DS) you could upload a pokemon to the cloud servers and watch the network traffic lights on your router. Shut off your DS as soon as your pokemon had been uploaded and when you start up your game again, the pokemon is still in your party. It's also in the cloud so you connect and pull your clone off the server.
- LeoPanthera 12y agoI have a 9-digit PIN. So I guess I'm immune from this type of attack? (In any reasonable time, at least.)
- 13 12y agoWith this particular tool, probably. You're a lot better off using an alphanumeric passcode and Touch ID though.
- m-app 12y agoStrike out the Touch ID.
- peteretep 12y agoWithout the touch ID, a long password is too inconvenient.
- gambiting 12y agoCare to explain why? I know it's possible to clone someone's fingerprint, but that's doable in nearly clinical settings, where you have a very,very clear image of the fingerprint in the first place - a phone stolen out of a pocket or handbag is not going to have them.
- Flockster 12y agoThe demonstration by starbug, who won the bounty for cracking TouchID, was made using a fingerprint taken from the screen. https://vimeo.com/75324765 https://vimeo.com/75324765
- texec 12y agoIt's not too complicated, see starbugs latest talk: https://media.ccc.de/browse/congress/2014/31c3_-_6450_-_de_-_saal_1_-_201412272030_-_ich_sehe_also_bin_ich_du_-_starbug.html https://media.ccc.de/browse/congress/2014/31c3_-_6450_-_de_-... (Download MP4 and use a desktop player, it contains an English translation)
- padmanabhan01 12y agoWell, one can still remote wipe if the phone is lost. So, while this may still be an issue, it's not as bad as what it would have been if that weren't an option..
- jahmed 12y agoOnly if the phone has a signal right?
- azinman2 12y agoYep. My dad got his phone stolen at the gym. He called me within 10 minutes of it being stolen and I logged into his account to wipe it. Not only was it "offline" never to be returned online, he had within a day a (thankfully blocked) attempt to login to his gmail from a nearby city. They must turned it off, have removed the SIM card, and then managed to guess his pin and get credentials off it. Scary.
- kolinko 12y agoWas the pin hard to guess?
- azinman2 12y agoNo, unfortunately. And I've told my parents for years to change that. They finally have now. The reality is most people aren't security conscious until AFTER something bad happens, even if you warn them ahead of time. But this also seems to be human nature. Life is complicated enough that we try to balance things towards convenient until it's clear something has to change. This will happen with global warming, industrial foods, water policy, oil-based economies, all-your-life-online etc just like it has with lead, atomic/chemical weapons, and the lack of regulatory bodies.
- chinathrow 12y agoSounds like a targeted attack on your dad in this case.
- grecy 12y agoWhy does iOS accept entry of that PIN over the cable and not require it to be "input" on the screen?
- redthrowaway 12y agoProbably for compatibility with peripheral devices.
- wlesieutre 12y agoIncluding accessibility for blind users, I assume. Touchscreens are not great input devices if you can't see what's on them or whether you got your finger on the right button.
- coldtea 12y agoIn which case you could still either manually do it (should take no more than a day), or create quite easily a lego-mindstorm or similar device to click on all the combinations "on the screen".
- gambiting 12y agoI have a bluetooth keyboard cover for my ipad - I can type the PIN using the keyboard, no need to touch the screen - it's actually very convenient.
- epochwolf 12y agoIt's so iTunes can unlock the device.
- 13 12y agoiTunes unlock is actually done with a pre shared key during sync.
- deleted 12y ago[deleted]
- micampe 12y ago
- azinman2 12y agoCan someone explain to me how the power cut off works? The battery can't be removed... And something like this requires precision timing. How can they cut it off then turn it back on without charging the battery? Furthermore, how can it be done every 10 seconds? My iPhone 6 takes longer to boot from scratch.
- xenadu02 12y agoYou have to open the phone and connect the device so it can cut power. The boot time is amortized across the 9 passcode attempts for each cycle. The obvious fix is to write the attempt count first, before even bothering to check if the PIN is correct. The flash on iOS devices is a bit slow but not slow enough to matter in this case.
- azinman2 12y agoBut wouldn't there be a write to flash after each attempt? This would mean that you just guess 9 times, cut power, then you can repeat the whole process again? You don't even need a fancy machine to guess the most common pins if that's the case! Just let the battery run out and start again. Seems like a really poor setup if that's true.
- j0e1 12y agoAnyone know of such a hack on Android phones?
- matthewmcg 12y ago"As such, each PIN entry takes approximately 40 seconds, meaning that it would take up to ~111 hours to bruteforce a 4 digit PIN" This is where a longer pass-code + TouchID is valuable.
- snowwrestler 12y agoA five-letter password is not much harder/slower to type than a 4-digit PIN, but makes this attack entirely impractical. Even using just lowercase letters, the maximum time expands from 111 hours to about 132,000 hours (15 years) per passcode. Going to six letters expands it to about 390 years.