Search code examples
wcfwindows-phone-7xap

Solutions to protecting game high-scores


My friend proved it to me by taking the WP7 papertoss games and getting the .xap from it and then posting his own high scores.

Is there any fool proof way to stop this ? (I think xbox live integration makes hacking the high scores impossible but that is for special people )


Solution

  • It depends first of all how the high-scores are sent. I can only assume that what your friend did was take the XAP and modify some internal file or track the HTTP web requests that are used to send the scores to the centralized locations. I have two recommendations for you.

    1. Encrypt. Don't keep scores in plaintext. There are plenty of strong encryption methods that you can take advantage of that will render the scoreboard useless unless the person who tries to read it has the key.

    2. If you send the scores to a web service, never send it in plaintext (once again). From my own experience I can say that web requests can be easily altered and sniffed. So if I see that the app sends http://yourservice/sendscore?user=Den&score=500, I might as well invoke http://yourservice/sendscore?user=Den&score=99999999. Same applies if you plan on using headers.

    Be aware, that using the Xbox Live services is only possible if you are a registered Xbox developer, and this is not easy to get.