[Windbg Script] Playing with Minesweeper
First, this script is not really about cheating. It does that with Minesweeper, but there are several other possibilities using a bit more bytes that do a better job to fool the application.
However, the point here is to show you how powerful the debugger is or, more precisely, the power you have when you know how to use the debugger.
When working on “just for fun” scripts, I don’t use source code access or symbols. I just use raw disassembled code. I do this to improve my assembly skills; by improving my assembly reading I can identify common patterns and their meanings. Moreover, I can try to figure out the possible source code. It helps me a lot during my daily work. Thus, if you want to improve your assembly skills this is a good and fun approach.
The script presented below is a fun script that I categorize as a “just for fun” script. I won’t tell you what it does: you’ll need to find out by yourself. :)
Just load Minesweeper on Windows XP SP 2, attach the debugger to it, run the script, and then create a New Game.
You don't need symbols!
It’s fun! I hope you enjoy it.
Source code for CHEATING_MINESWEEPER.TXT:
$$ Displays all hidden bombs (from Minesweeper :)).
$$ Compatibility: Win32, specific for Windows XP SP2.
$$ Usage: $$>< to run the program.
$$ Roberto Alexis Farah
$$ All my scripts are provided "AS IS" with no warranties, and confer no rights.
eb poi(@$peb+0x8)+0x36fa c6 00 8a