Archive | April 2016

Android pattern lock brute forcing

weak-android-lock-patterns

Friend asked me for help, he needed that I unlock his Android phone without losing important data. So  I did. The phone was locked with 9-pattern.

First horrifying thing that I saw was that there are 350 000 possible combinations on 9-pattern. But humans are predictable with passwords and patterns.

I found this link, it helped me a ton with sorting pattern – which pattern to try first:

Link to post

Now that I know which patterns to use first, I continued with my work:

First I gathered all things I needed:

  • Patterns, which I gathered from internet
  • Arduino M0 to emulate mouse and keyboard
  • OTG cable
  • 2 USB cables to connect PC and Arduino
  • Webcam

Things left to do left to were:

  • Write code  in C for Arduino : receive commands from PC, write patterns through emulated mouse and press keys through emulated keyboard
  • Write code for PC program (in C#) : send patterns to Arduino, take pictures, save progress

That was it!

The things I didn’t do but should:

  • Detect through computer vision when phone got unlocked (simple, display gets bright when phone unlocks)
  • Modify USB OTG so that phone could charge through Arduino port

I didn’t do those things because I got lucky, I was testing the program and in 10 minutes of testing phone got unlocked! Ou yea!

Pictures:

Arduino, target phone, cables, code

IMG_20160405_233441IMG_20160405_233547

IMG_20160405_234337IMG_20160405_235151

Connected setup:IMG_20160405_234631

Camera, which was duct taped on phone:

Quickly written software:program

Images, which were automatically captured before unlock:

patternsBeforeUnlock

Video in action (software is older than shown here):

 

That was it!