Cracking Android Pattern Hash - Printable Version +- hashcat Forum (https://hashcat.net/forum) +-- Forum: Deprecated; Ancient Versions (https://hashcat.net/forum/forum-46.html) +--- Forum: Very old oclHashcat-lite Support (https://hashcat.net/forum/forum-22.html) +--- Thread: Cracking Android Pattern Hash (/thread-2165.html) |
Cracking Android Pattern Hash - budabob07 - 03-24-2013 The pattern hash on an Android phone is stored as a byte string like 0x00030607080502 to represent the pattern 0367852. However, this byte string is in hex and converted to nonsense characters first and then hashed with an SHA-1 hash. For example, the byte string would have to be run through xxd -r first before it was hashed. Is there a way to make hashcat assume that the input is in hex and then convert it before hashing? I could make a file with the hashcat mask processor and then use a script to hex-encode all the entries in the file and then use that as a wordlist, but I'm wondering if hashcat supports this so I dont have to do it. Thanks RE: Cracking Android Pattern Hash - atom - 03-24-2013 if you can post here some step-by-step example from passcode to final hash i can see that i add it to hashcat RE: Cracking Android Pattern Hash - atom - 03-24-2013 See this thread as a good example: https://hashcat.net/forum/thread-2011.html RE: Cracking Android Pattern Hash - philsmd - 03-24-2013 Hi budabob07, I don't think that there is something special w/ the pattern hashes... Maybe the only thing that you could argue is that they are (ALSO) special insecure... I mean, it is correct that they use sha1 and that the security model should prevent someone to dump the content of gesture.key in /data/system/, but otherwise there is no sign of security... no salt.. iterations etc. NOTHING... Therefore, they are plain sha1 hashes... and I do *not* think that atom should add something specific for those hashes. Warning: I have a custom rom, therefore it could be different for someones stock rom. I do not know. Why I think it is dangerous only having sha1... I often tell my friends that I have NOT enough credit on my phone, I just want to make a call (iff I don't have credit of course). I could simply take there *rooted* phone, open Android Terminal Emulator, cat /data/system/gesture.key and have the lock pattern... or? YES! I want to document something here so others can test themself: Hint: the enumeration is as follows: 0 1 2 3 4 5 6 7 8 1. This should be the widget in question: https://github.com/android/platform_frameworks_base/blob/master/core/java/com/android/internal/widget/LockPatternUtils.java 2. Class to handle the lock settings: https://github.com/android/platform_frameworks_base/blob/master/core/java/com/android/internal/widget/LockSettingsService.java 3. My test: Code: $ adb devices Code: import java.lang.Integer; Therefore, nothing special for hashcat (and atom, hehe) to do... Maybe Android should do somehing about it!? You can dump (cat) the gesture.key file and convert it to hex and feet it to hashcat iff you really want.... RE: Cracking Android Pattern Hash - atom - 03-24-2013 That was easy Hashcat already supports this, check out this example: Quote: Take a close look at the last line: 0000020: 3962 6236 3534 3066 3a00 0104 0508 0a 9bb6540f:...... RE: Cracking Android Pattern Hash - budabob07 - 03-25-2013 (03-24-2013, 04:10 PM)atom Wrote: That was easyAlright, I tried --hex-charset before with just ?d flags but I didn't define a custom mask. This works. Thank you! |