Monday 7 September 2015

[Write-up] MMA CTF 2015 - Pattern Lock 20

22:28 Posted by Matnacian , , , 1 comment

Problem

In android smartphone, you can use "pattern lock".
Pattern lock use 9 dots(3x3) on the screen in the figure below.
dots
The following figures are examples of lock pattern.
image:image2 image:image3
Lock pattern must satisfy following three conditions.
  • Use at most once each dot.
  • Use at least 4 dots.
  • Cannot skip the dot on the segment.
(Flag 1) Flag is the number of lock patterns in decimal without MMA{...}.
(Flag 2) Flag is the maximum length of lock patterns on 4x4 dots. Assume the length of two neighbor dot is 1. Please answer rounded to four decimal places without MMA{...}. (XX.XXXX)
---
Just google "number of lock patterns".
You will find this: http://stackoverflow.com/questions/12127833/patterns-possible-on-3x3-matrix-of-numbers

Combinations of the Android pattern lock screen would not be from 1-9. Instead, they would be 4-9, as the lock pattern needs a minimum of four inputs, and anything below that is invalid (at least 2.3 onwards. I believe 2.2 and below allowed 3 point locks). Here's the breakdown of the combinations:
Moves = 4, combinations = 1624
Moves = 5, combinations = 7152
Moves = 6, combinations = 26016
Moves = 7, combinations = 72912
Moves = 8, combinations = 140704
Moves = 9, combinations = 140704

Total possibilities: 1624 + 7152 + 26016 + 72912 + 140704 + 140704 = 389112
So flag 1 is 389112!

--- matnacian ---
--- ctf for beginners ---

1 comment: