Skip to content

Latest commit

 

History

History

Minesweeper

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Minesweeper Writeup

Defenit CTF 2020 - Misc 298 - 35 solves

Can you solve the minesweeper in one minute? nc minesweeper.ctf.defenit.kr 3333

Observation

Straightforward task. Let me solve 16x16 size minesweeper less than a minute. To solve the task, flag all 40 mines and unlock full map.

Exploit

Searched opensource since minesweeper is an old game. Used this repo and slightly modifed to solve the game(solver uses python2).

  1. Ask minesweeper solver the position with most safe space.
  2. Unlock all safe space by repeating 1, until only 40 locked spaces left.
  3. Flag all 40 leftover dangerous spaces.

Get flag:

Defenit{min35w33p3r_i5_ezpz}

Minesweeper solver: mines.py

Exploit code: solve.py