Modifying Compiled C Programs in Hex Editors

Our site remains ad-free thanks to our affiliates. This post's featured affiliate is NordVPN. Online VPN service that encrypts your internet traffic and hides your IP with physical location. Upgrade your privacy and security now.

The post is not sponsored by the above affiliate and the content here is not representative of their company.

If you ever wanted to make changes to a program and didn’t have the source code you are usually out of luck. But with decompilers you can turn the compiled exe, or other executable file into ASM (Assembly) or just edit the HEX code. If you are looking to make a lot of changes decompiling to ASM is suggested since you can more clearly understand what is happening. But if you just need to modify a few variables and strings, why not just open it up in a hex editor quickly? Keep in mind that when you do decompile a program, it’s going to be a lot harder to understand since the compiler optimizing the original code. If you have the option to, always edit the source code that is available.

Today David will create three different programs, and show you how to modify strings, integers, and how to put this to use in the real world. Of course using this on existing programs is usually not allowed by the EULA, so make sure you have the correct permissions to make these changes.

Related Posts

Hugo Footnotes and Citations

Add footnotes, citations, and references to your Hugo posts with this simple technique. Give your articles more credibility and improve your posts by making them more informative.

Local Mercurial Hosting

A basic mercurial hosting solution for local development. Learn the ins and outs of creating a mercurial server to hose all your repositories locally.

Microservice Authentication

Learn about the different types of authentication methods for your microservice and when you need to implement authentication or if you can skip it.

Reducing Docker Image Size

Reduce your Docker image size by inspecting each layer, applying our tips, and by understanding how Docker images are built and stored.