BreakPoint Software

How To Hex Edit: An Example

[ Reference Material | Support ]


This topic is designed as an example of how to hex edit (modify) a file. It is intended for those who are not familiar with binary file editing and would like to make a specific change in a binary file. An example of where this technique would apply is in game cheats. To implement a game cheat, users are typically instructed to make a change in a saved game file in order to get loads of extra cash or a super weapon.

Making these changes is extremely easy with Hex Workshop. Simply perform the following steps:

1. Open the file you wish to modify

Launch Hex Workshop and from the file-open menu choose the specific file.

 

2. Finding what you need to change

This is the most difficult part when performing binary file editing. You will be typically given instructions in one of two forms:

“Go to offset xxxx” or “Search for the value yyyy”

Going to a specific offset

In Hex Workshop, under the Edit menu, select Goto.

Fill in the offset given in the instructions. Make sure that the “Beginning of File” and “Hex” radio buttons are checked. Hit the “Go” button. Hex Workshop will then move the cursor to (or goto) a certain hexadecimal address (offset) from the beginning of the file.

Although it is unlikely, you may be given a decimal offset. If this is the case, the instructions will tell you this specifically. In this case, make sure you check the “Dec” radio button for decimal.

Search for a Hex String

In Hex Workshop, under the Edit menu select Find.

Fill in the search string given in the instructions. Make sure that “Hex” and “Down” radio buttons are checked. Hit the “Find Next” button. Hex Workshop will then search for the hexadecimal string from the beginning of the file.

NOTE: Your data will be selected in Hex Workshop editor, please deselect it by clicking the mouse just to the left of the selection.

 

3. Making the Change

Before you make any change, make sure you are in overwrite mode and not in insert mode. You can tell what mode you are in by looking at the indicator in the right side of the Status Bar, located at the bottom of the editor. It is encircled in red in the graphic below for demonstration purposes.

If the indicator says “INS” instead of “OVR” hit the “Insert” key on your keyboard once to toggle Hex Workshop into overwrite mode.

Now, you are ready to change the value. In most cases you will be instructed to change some hex string to another. For example, “Change C705 to FFFF”. If your instructions say to change 0xC607 to 0xFFFF, please ignore the 0x- this is a shorthand for saying hexadecimal.

You can see on the 2nd line (at offset 0B0C) the text you would like to change. You would now move the cursor to the “C” and type “FFFF”.

You can see your changes in red. (If they do not appear in red, go under the Options-Preferences menu, click on the “Display Tab” and select the “Highlight Modified Bytes” checkbox.

 

4. Saving the File

The last step is to save the file. You can do this by going under the “File” menu and selecting “Save”. You will be prompted with the following dialog (unless you specifically turned it off):

We recommend that you hit “Yes”, so if you made any mistakes, you can recover the original file.