CS:GO cheats

In this blog post, I'm going to describe how I made my CS:GO cheat (for educational reasons only). In the video (sorry for potato quality) you can see me using bhop and no recoil cheats.

Goal

Goal of this project was to put my reverse-engineering "skills" to use, by writing a CS:GO cheat. Anything will do. There are may different cheat types:

External or Internal

There are different ways to write a cheat:

In this post, we'll only talk about #1 and #2. Generally speaking, external cheats are easier to write (since they ususally use simple OS api to interact with game's memory), but don't offer as much flexibility as internal, which can e.g. hook functions.

External

The easier way (and also, the way I started). I used CreateToolhelp32Snapshot to find correct process and modules (example) and a simple OpenProcess with PROCESS_ALL_ACCESS to obtain process to handle. Some anticheats detect this as cheat, but most don't, since that would flag most antivirus' software as cheats as well. Let's not focuss on detection for now, since that's entierly different topic of it's own.

ReadProcessMemory](https://docs.microsoft.com/en-us/windows/desktop/api/memoryapi/nf-memoryapi-readprocessmemory) and [WriteProcessMemory functions to interact with game's memory.

Internal

This is the hard way, but it also allows to have more fun. First, you need to reverse engineer some part of code, you want to edit. After that, you can hook the function, by editing:

or

(both names are used).This way, whenever game tries to call specific function it will actually call your function instead of the original one. This is extremly powerfull. example implementation.

Injecting

As internal cheat is in library format, it needs to be injected into target executable. Some ways to do that include:

There are plenty more ways detailed here. The most popular (and probably the best) public injector is Extreme Injector.

Memory searching

TODO: offsets vs pattern matching

Resources

If you want to dive into cheating (for educational purposes), feel free to use:

Good luck!

Mastodon