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!

Advertisements

About Vili Volčini

Programming is art! I have been programming since 14 years and I have big interest into video games, electronics and robotics. Currently I am studying at math university FMF and as a side projects I am working on video games. Someday I will build a real robot with intention of helping humanity, but it's long road to there!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: