Poke into the depths of your favorite PC game to give yourself the edge.
There’s a whole industry devoted to cheating and hacking game saves on consoles ( [Hack #75] ), but what about PC games? Shouldn’t that be as easy, if not easier, than console hacking? Yes! Console hacking may be more exotic and interesting because consoles are black boxes you’re not really supposed to open, but it’s easy to cheat with PC games; you control the hardware and software of a general-purpose computing device!
You can often find trainers (small executable patch files that add an up-front menu to the game in which you can select infinite lives, max ammo, and other fun options) that combine all the extras you want in a ready-made package. Some exploit debug modes that the programmers have left in the game. Others modify specific values in saved games. You can perform plenty of interesting hacks on PC games old and new.
There are several types of PC game hacking tools. All overlap in some way, and you’ll often have the best results by combining some or all of them:
Scan the PC’s memory while a game runs, allowing you to search for and replace certain variables to produce intended (or unintended!) effects.
Allow you to edit saved files, changing variables more permanently.
Tools that show you a partially human-readable version of the compiled code. This is a complicated approach to changing parts of the game code. If you have a basic understanding of assembly language and hex, this is the method for you.
Tools for network-aware games that help you understand the information sent out over the Net and how to change it.
If you’re looking for somewhere to start with regard to hacking PC games, the World Of Game Hacking (http://www.gamehacking.com/) is an amazing jumping-off point. Not only does it have plenty of free, ready-made trainers to download for existing PC games, it has massive download sections for all of these utilities and a big set of tutorials for both beginners and experts. Although they’re often rough and ready, these explain most of what you need to know.
Using memory finders is by far the easiest and most fun way to hack, so we’ll devote the most time to it. For the purposes of this hack, we’ll use the WinHack 2.0 tool:
| http://www.gamehacking.com/download.php?type=tools&file=memfinders/WH200.zip |
It’s a freely distributable Windows program that allows you to look through memory on a particular file and see what’s changed, then change values based on that.
GameHack, also available on the GameHacking.com page, is another highly recommended Windows program along the same lines. Unfortunately, it’s a bit old, and it doesn’t seem to work properly in Windows NT environments, so it’s not very useful for modern-day PC hackers.
To start, load up your favorite game. We’ll use the example of the excellent WinHack tutorial (http://www.gamehacking.com/view.php?link=../tutorials/winhack.php) on Minesweeper, which ships with Windows.
Load MineSweeper, and leave it on the startup screen without starting a game.
Load WinHack. Select the MineSweeper application from the Process: window, and hit the Start New Search button.
Start a game of MineSweeper, and wait until the timer has counted 10 seconds. Pause the game by minimizing its window.
Now search Anything for the phrase “Changed to value of 10” selection, and hit Continue Search. This finds every memory location (Figure 6-2) whose contents have since changed to the value of 10—probably several places.
Maximize MineSweeper again, and wait for the timer to reach 18. Then minimize again and change the Changed value to 18. You should receive only one result: the location of the timer variable. Now you can mess with it.
Select Create A Tag From The Selected Address. Go to the Tag Lists menu, where you can change the value for that particular tag to anything you like (back to 1, for example) or freeze it so it doesn’t increment anymore. See Figure 6-3.
Go back into the game and see that the timer has changed to your new value. Poof, instant MineSweeper cheating!
This type of hack isn’t necessarily permanent, though. You might be able to create a trainer using WinHack, but there’s no guarantee that the timer will occupy the same chunk of memory on every game.