- Why Score List Hack Attacks Matter
- Protecting the Score List
- Real-Life Example
- Summary
Real-Life Example
The following is an example of how one programmer secured his game. He was nice enough to discuss the score list hacks with us and provide an insider's look at the thought process he had when securing his game.
The game, similar to Mahjong, is a timed game that gives you points for making a match but also runs a countdown timer while playing. There is a maximum high score of X number of points (1,000 seconds plus match tiles score minus seconds played).
The game file that's downloaded includes no information about the tiles. Instead, when the game starts, the tile information is downloaded from the server and processed by the local program to create the board. At this point, a timer is started on the local system, counting by milliseconds. Every time a move is made, the stone positions are noted, along with the millisecond counter.
When the game is finished, the moves and the counter are sent to the server, where the game is "played" and verified as valid. This way, the solution has to be possible, which still leaves the timer open for attack. However, the server-side component includes a reality checker on the millisecond counter, ensuring that no two moves are made within an impossibly short period of time.
Ironically, even with all this protection, we were able to bypass the checks and obtain a high score. The flaw was that the reality check provides a small window of opportunity that our false score slipped through. After a code tweak, we could no longer successfully spoof our score.