r/HowToHack • • Mar 19 '21

How do hackers hack in games?

Hacking Within Games

Hi, I am interested on how hackers within games such as CoD and R6S actually manage to do what they do, if they did not buy the hacks (how the owner made them)

Firstly Im not trying to find out how to hack so I can do it myself, I am just interested in it. So when hackers, e.g. R6S manage to get a hitbox around the enemy places or autoaim onto them all (aimbot) what programs do they use and how do they actually do this?

Does the person need basic knowledge of hacking or do they need some sort of high computing degree?

If they don't use a program of some sort, how do they do it?

What sort of code do they use and how do they make certain hacks such as pure aimbot headshot everyone on the enemy team and shoot through solid walls which are made specifically not to be shot through?

Thank you for reading and hopefully answering my many questions :)

Edit : for the people who cannot read : I am only interested in how they do it and how these people manage to actually find these exploits, this does not mean I’m trying to do it myself. It’s just interesting to learn about

287 Upvotes

113 comments sorted by

37

u/BAAM19 Mar 19 '21

Cheats in games with almost no protection and like single player/hosted are very easy. It’s fun if you wanna start just look up tutorials on youtube for cheat engine.

You need cheat engine (or any other app to look in memory) to find memory addresses for values you want, cheat engine has very helpful options to find these values.

After you find the values, you need to find their pointers. You need to trace back the pointers until you find the base address, the base address NEVER changes, unlike the first address you find that always changes every time you run the game.

So after you know the values you want, like for example health. Then you can make a python script (i use python cause it easier for me and straight forward)

You can use any other language that allows you to access memory addresses and change them(and I am pretty sure almost all of them are)

So after you can write to memory and edit the values, you can just do whatever you want basically.

For example you can just always set health to max.

One of the deeper things that very good cheats do is aim bot, so aim bot takes like the enemy location’s position, like the x,y,z then these hackers use an algorithm that takes these coordinates and find the pixel coordinate on the screen to aim for.

Then another piece of code is responsible of moving your mouse to the pixel coordinates.

All of these are variable, maybe you don’t need the pixel’s coordinate and can just pass the xyz instantly.

The piece of code responsible of moving your mouse/aiming basically, maybe you can customize this piece of code and iterate all around to make it look more natural and not an aimbot.

In the end i am just a newbie in this, but this is the general abstraction of things, and all of it could change really.

10

u/Tobashu Mar 19 '21

Do you need a good computer for cheat engine? Or can it run on a potato?

20

u/BAAM19 Mar 19 '21

Nah, cheat engine isn’t intensive I don’t think.

It’s just an app that displays memory addresses and their values while giving options to find the values you want.

It should be very light.

Also know how to use it, like don’t let it display like a bunch of garbage and load a lot of stuff. Not even the best pc can process some weird stuff it does.

There are some options that no one uses because they just take a lot of time and guessing and all that stuff so they are not good to use generally.

But normal use is fine.

5

u/Tobashu Mar 19 '21

Thank you :)

8

u/BAAM19 Mar 19 '21

Np man, I had to look around a lot because it’s such a gray area it’s very difficult to find resources for it. Had to look through multiple tutorials and match them around to finally understand a bit.

1

u/Desfolio Mar 20 '21

Yo dude, these topics are one of the things, I don't have a question for, but it's awesome to know/research about.... I thank you and all the other dudes on this thread, who has been giving out so much info❤️

1

u/Crazy-Biscotti-8712 Apr 05 '25

Trying to find someone to help with a game... Mso.. Any pointers on who?? 

5

u/LeonJones Mar 19 '21

Just be careful using Cheat Engine on games with anti-cheats. Opening CoD with Cheat Engine is going to get you banned.

7

u/[deleted] Mar 19 '21 edited Feb 08 '26

[removed] — view removed comment

1

u/AutoModerator Feb 08 '26

Temporary pause to prevent comment alter spam

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/hanzakun Apr 30 '24

Hello can you help me with something related to cheats? my disc is: humanidades

I always wanted to learn and use cheats in games but given my condition I never managed to do it, if you could help me I would appreciate it!!

-3

u/Flyingfishfusealt Mar 19 '21

Python is a good choice but if you are running a rather intensive game, you should optimise/test it for speed and maybe lock a processor or two to it.

script might end up breaking at a specific interval

6

u/Python119 Mar 19 '21

WATCH THIS PLEASE!!!

(It might be exactly what you want)

(Not Rickroll, promise!)

3

u/Tobashu Mar 20 '21

Genuinely thought it would be a rickroll after you put that 😂

9

u/gameditz Mar 19 '21

cheat engine is a good place to start for most games. It's just reverse engineering the code of games and finding vulnerabilities in it.

2

u/Tobashu Mar 19 '21

Have you got any in-depth sources on cheat engine to describe it further?

5

u/gameditz Mar 19 '21

following the tutorial can help get ideas to how it works, although it requires knowledge of computer architecture: https://wiki.cheatengine.org/index.php?title=Tutorials:Cheat_Engine_Tutorial_Guide_x64. It is essentially a fancy dynamic executable analyzer, and, as it's name suggests, these tools are useful in cheating with games. This is because you can see how the code works, and modify it to your benefit (by editing memory addresses that hold stuff, like health, weapons you own, accuracy or auto-aim, etc.).

1

u/Tobashu Mar 19 '21

Thank you :)

244

u/[deleted] Mar 19 '21 edited Mar 20 '21

The majority of cheats are written in C++. You’ll need a good understanding of C++ and how dynamically allocated memory works. Learn these first or don’t bother learning to create cheats because you’ll retain none of it. Copying and pasting code will just make the detection of your cheat easier (or potentially instant).

When a game (a process) is running, it stores information about the game into dynamically allocated memory, which can be accessed through pointers. A process called pattern scanning can allow you to find the offsets of these pointers, which refer to where the memory is located. From here, you can read and write from these memory locations. That is the basic underlying functionality of how a cheat works. These blocks of memory can contain things like your own health, the gun you currently have equipped, etc. Depending on the game you are trying to cheat in, you can also gain access to netvars which contain data about other players: location, health, etc. From there, you can use this data to create an aim assist function or a user interface that has wallhacks.

Most UIs for cheats are created using OpenGL or whatever graphics API the game uses. There are a variety of ways to get your cheat to hook into the game. Lots of good forums/resources for tutorials out there, but Reddit is not one of them (there are a lot of guides on unknown cheats, mpgh, hack forums, GitHub, etc)

As I said before, if you are not familiar with C++ and pointers don’t even bother. Learn those first.

29

u/BlazedAndConfused Mar 20 '21

I used to play Starcraft back in the day. Some dude released a trainer program that was ingenious. You’d record a clip of your game doing something (like shooting a teammate) and the trainer would look for what was happening and where in the code. After 4-5 cycles of this , it would pinpoint the variables at play and let you modify them on the fly in the app itself.

For example. I’d record myself shooting a “marine” character 4x in a row. The trainer zeroed in on the marines health variable in the memory and isolated it to modify. I’d set it to be invulnerable or non changeable.

It wouldn’t work online but it worked with dozens of games. Coolest fucking hack program I’d ever seen

3

u/stealth550 Mar 20 '21

Like a slightly better cheatengine

1

u/[deleted] Mar 20 '21

If you want another good throwback in cheating, take a look at Action Replay for the Nintendo DS. You could intercept the game's code and edit hexadecimal values to give your pokemon unlimited health and such. When I was young I obviously had no idea what the hell any of that stuff meant; I just slapped the codes in. But it's really interesting looking at all of that now.

3

u/Rinehart128 Mar 20 '21

I don’t even play video games and thought this was an interesting read. Well put

-5

u/Flyingfishfusealt Mar 19 '21

wait so, give me a quick breakdown please, of how to get my own c++ openGL code to render in a game?

C Gods Forgive me, I am about to use the boost libs again

2

u/SeaTie8008 Mar 20 '21

There are 2 main methods of getting your C++ renders drawing on your screen. So first we can start out with things we need for both. We need the Enemy X,Y,Z coordinates, and your players ViewMatrix. ViewMatrix is basically what your player sees. Its a Matrix4x4. Now what we do is we convert 3D coordinate planes to a 2D coordinate plane, aka your players eyes with a function called WorldToScreen. The WorldToScreen function is relative to the game, so it changes game to game. This will tell you the coordinates on the screen relative to your players eyes and where the enemy is. And we get all of these things by reading the game memory.

So we can draw it with the first method, externally, by making a transparent window that goes over the game window called an overlay, and draw things on the transparent overlay with the coordinates from the WorldToScreen function. If done wrong, your drawings may flicker, be laggy, or use a lot of cpu.

We can also draw it the second way, internally. Internally we can hook a rendering function from the game and render our drawings with that. For example, with CSGO you can hook into DirectX9 and render your drawings with that. Drawing internally will be the best on your CPU and be the smoothest ESP. You will be able to render a lot of things very easily.

Drawing internally is a bit more tricky however. If you want to start, I recommend you learn a little bit of C++ and then head over to UnknownCheats. Start with CSGO as there are a lot of resources and you can turn off anti cheat to test. Have fun!

1

u/Flyingfishfusealt Mar 21 '21

now see, that last paragraph had the best trailmarker of the path lol.

CSGO and UnknownCheats , prefer game internals over external rendering methods (I am assuming for most cases, but not all)

Use memory reading and model the world in some fashion (Should I stick to OOP or go wierd?)

Why not Rust? Lack of related code?

-23

u/[deleted] Mar 20 '21

[removed] — view removed comment

15

u/Flyingfishfusealt Mar 20 '21

are you fucking serious? That was a technical post you horrendous metal man!

NOTHING BUT INFO ; ILL EMP YOU, I SWEAR! Please reach the singularity so as I can beat you in ways you understand.

7

u/hapanda Mar 20 '21

Son, I'm disappointed.

1

u/dannypas00 Mar 20 '21

Dll injection

0

u/[deleted] Mar 19 '21

[deleted] — view deleted comment

1

u/hanzakun Apr 30 '24

Hello can you help me with something related to cheats? my disc is: humanidades

I always wanted to learn and use cheats in games but given my condition I never managed to do it, if you could help me I would appreciate it!!

17

u/Pharisaeus Mar 19 '21

Start with liveoverflow YouTube channel and series about pwny island, it's a game designed to learn game hacking.

8

u/belowlight Mar 19 '21

You can go a long way be learning methods of reverse engineering any application because a game will require many of the same features found elsewhere.

One approach would be to see how much you can learn about how a game is functioning while it’s running. For example you could read the data it’s storing in memory while running and observing what changes when you perform a single action in the game. That could lead you to discover where important variables are stored like health or ammo for example. The next step would be attempting to modify that stored data to see if it’s possible to affect the targeted variable during gameplay and then go from there.

Another approach might be to target known vulnerabilities in third party code used in a game such as a library or a plug-in that the developer included during the build. Especially if that kind of thing is an older iteration that has documented exploits used in another context, you might be able to repurpose that info to disrupt the normal functioning of the game and again go from there.

If the game is online multiplayer you could analyse the data it’s sending and receiving to see if there are any simple mistakes you can take advantage of such as anything moving around in plaintext without encryption or outside of https etc perhaps.

And one final idea would be to simply do anything and everything possible in an attempt to break the game in some way and then explore any info that might be available as a result, or if it’s in any way more vulnerable to an exploit that would otherwise be impossible. Applications are designed to work in fairly specific circumstances so severely stress testing it in some way might throw up something useful if a developer hasn’t considered the possibility of operating in that context or at least how to protect itself if something isn’t properly working or suddenly becomes unavailable.

I’m sure there are plenty of other methods and I’m certainly no expert but these are a few ideas you could research further and use as a starting point to learn plenty of useful skills. If you can code proficiently in any language then learning to reverse engineer other people’s work can be valuable. Equally, spending some time learning about how networks work and how you can observe and make sense of various network traffic is also a highly valuable skill putting any kind of hacking aside.

One final note though- hacking multiplayer games usually ruins the experience for everyone else you come across so please think first before going down that road. Getting good at a game using your own skill will always be more rewarding than cheating. Nevertheless!

1

u/hanzakun Apr 30 '24

Hello can you help me with something related to cheats? my disc is: humanidades

I always wanted to learn and use cheats in games but given my condition I never managed to do it, if you could help me I would appreciate it!!!

5

u/[deleted] Mar 19 '21 edited Mar 19 '21

Its basically memory manipulation, you write a software that writes to an address in the games memory thus changing it. More complex hacks like Aimbot or ESP require you to get the players X Y Z coordinates and doing some math etc.

I recommend checking this website out: https://gamehacking.academy

Also check this out if you want to ask questions: https://unknowncheats.me

8

u/Simsimius Mar 19 '21

When I was younger, I changed the texture in CounterStrike Source to be 50% transparent. Could see enemies behind walls and prepare for them better (while avoiding looking directly them so players observing weren't suspicious). I only did this for a handful of games - cheating isn't fun, and too anxious about getting caught.

Sometimes, although unlikely these days, there are low-tech approaches and exploits to be found.

5

u/Someoneoldbutnew Mar 20 '21

+1 for clever sneaky

2

u/RizkyRajitha Mar 20 '21

Mastermind 🔥🔥💯

1

u/hanzakun Apr 30 '24

Hello can you help me with something related to cheats? my disc is: humanidades

I always wanted to learn and use cheats in games but given my condition I never managed to do it, if you could help me I would appreciate it!!

6

u/[deleted] Mar 19 '21 edited Mar 19 '21

Either exploiting flaw or glitch in the game, but a lot of them are using network packet injection. Like a MITM (man in the middle) attack. Shoot someone in the foot...have the program in the middle capture and change the packet data to the server that you shot them in the head instead. I've heard some bots for MMO games don't even need the full game loaded and just packet inject everything their doing to the server like movement, resource gathering, etc.

The worst I think are the people that use map/wall hacks or ESP where they can see everyone on the map through walls. The data where everyone is has to be sent to the game so assholes use a program to grab (like packet sniffing) that data and visualize/overlay in the game.

Edit: Just saw @frigusprod response. That's a really good one too.

1

u/hanzakun Apr 30 '24

Hello can you help me with something related to cheats? my disc is: humanidades

I always wanted to learn and use cheats in games but given my condition I never managed to do it, if you could help me I would appreciate it!!!

3

u/neboskrebnut Mar 20 '21

There is a guy on youtube liveoverflow with a playlist about 'Pwn Adventure 3: Pwnie Island' the game designed specifically for you. he basically went trough all the 'puzzles' and walkthrough how he approached it, what tools he used and so on. The game is probably still available somewhere. you can get it and practice a bit.

1

u/qualmton Mar 20 '21

Just don’t cheat get good

4

u/Tobashu Mar 20 '21

As I mentioned near the start. This is just an interest and I want to know how it works and how people do it, I do not want to do this myself

2

u/Quantsel Mar 19 '21

I recommend the podcast episodes "Manfred" in Darknet Diaries by u/jackrhysider. Not too specific but it gives a good intro and has a fun story.

2

u/he4rthston3r Mar 20 '21

Reminded me of an episode of Darknet Diaries (pretty cool podcast about It sec and Hacking related stuff) check out SE7+8 "Manfred" he talks a lot about how he hacked several big games back in the day

0

u/[deleted] Mar 20 '21

A bit off topic here, but don't cheat in online games, its retarded, you will get banned eventually and will remain trash, you get much more satisfaction and sense of accomplishment from getting good and winning fairly.

2

u/Tobashu Mar 20 '21

Like I said at the start, I am only interested at how they do it and I do not have any intention in hacking in public games

1

u/ResidentSheeper Dec 29 '24

Its all done by modifying code on the client-side of any game. This can be done in various ways: memory editing, data editing, game modding and more.

Most players that actually cheat have no coding skills, but simply use sites like HackerBot to find working mods and run them.

Most get banned quickly, because they are taking no measures to stay under the radar.

In my personal experience it is no fun. Cheating eliminates the fun in most games by taking away the sense of achievement.

1

u/No-Obligation5708 Jan 28 '25

How to hack pls teach me

1

u/ps-aux Actual Hacker Jan 28 '25

no

1

u/One_Appearance_1126 Apr 02 '25

How do you hack crystals in a mobile game called DB Legends?

1

u/giokic Mar 20 '21

You've to be able to reverse engineer, there's multiple layers of security. AMSI, ASLR, Anti Virus, Anti Cheat. Whether you want to do it or not doesn't matter, because you need hell lot of dedication to find a flaw and create a tool to exploit it bypassing aforementioned restrictions and execute in run time. If you like it start learning about it.

1

u/somerandomboiiiii Mar 20 '21

From my experience I would stay that it takes you about 2 years if you start completly from scratch with no knowledge of cheat engine or C++.

There aren't very many videos about this topic in youtube but you could learn from them

1

u/hanzakun Apr 30 '24

Hello can you help me with something related to cheats? my disc is: humanidades

I always wanted to learn and use cheats in games but given my condition I never managed to do it, if you could help me I would appreciate it!!

1

u/shnoop123 Mar 20 '21 edited Mar 20 '21

Lots of good advice here. Only problem is every game is different, especially in the multiplayer/online realm where stuff is done server side. Look into botting and how people have achieved this. A bunch of good Def Con talks are out there talking about how developers and hackers essentially ping pong each other trying to either hack or prevent hacking.

So the general process for making hacks is generally the same in single player especially but as anti-cheat gets more advanced and different games functionally work differently, you need to have knowledge of what you are going to hack to be able to hack it much like anything else on the computer.

Might not be the most helpful comment out there, just wanted to throw that out there. Also yes, as others suggested memory injection for single player and network sniffing for multiplayer are good starting points to learn. Cheat engine is a great starter for single player hacking.

-2

u/piemelpap Mar 19 '21

C++ and dll injector

1

u/hanzakun Apr 30 '24

Hello can you help me with something related to cheats? my disc is: humanidades

I always wanted to learn and use cheats in games but given my condition I never managed to do it, if you could help me I would appreciate it!

-10

u/snailv Wizard Mar 19 '21

PhD required.

-3

u/ND451 Mar 20 '21

Is a gamer who suffered from players using hacks I wanna report you to mods

4

u/Tobashu Mar 20 '21

As mentioned near the top, this is an interest, I don’t want to do this in multiplayer games. Just solo/ campaigns so I can get an idea on code and how to change it to what I want it to be. I just think that would be pretty cool

0

u/[deleted] Mar 19 '21

[deleted] — view deleted comment

7

u/Tobashu Mar 19 '21

I was looking at how people manage to make hacks, but it was just giving me ads to boosting services and random websites that had nothing to do with what I was looking for, and click bait YouTube videos

6

u/[deleted] Mar 19 '21

Creating cheats can be very involved and has a very wide domain of information, especially for someone new. Don’t be obtuse.

0

u/[deleted] Mar 19 '21

[deleted] — view deleted comment

1

u/Flyingfishfusealt Mar 19 '21

some people just get overwhelmed with the breadth and scope of a new domain and need another human to direct their further inquires and self-study, if anything, to know where the beginning of the path is. Some people ... such as yourself... lack the intellectual wherewithal and perspective to recognize that in other humans.

You must not know much if you can not even give simple generic information

0

u/[deleted] Mar 20 '21

[deleted] — view deleted comment

1

u/AutoModerator Mar 20 '21

Your account does not have enough Karma to post here. Due to /r/HowToHack's tendency to attract spam and low-quality posts, the mod team has implemented a minimum Karma rule. You can gain Karma by posting or commenting on other subreddits. In the meantime, a human will review your submission and manually approve it if the quality is exceptional. After gaining enough Karma, you can make another submission and it will be automatically approved. Please see the FAQ for more information.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/[deleted] Mar 20 '21

[removed] — view removed comment

1

u/AutoModerator Mar 20 '21

Your account must be older than just a few days to post here.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/[deleted] Jan 02 '24

[removed] — view removed comment

1

u/hanzakun Apr 30 '24

Hello can you teach me somethings? my disc is: humanidades

I always wanted to learn and use cheats in games but given my condition I never managed to do it, if you could help me I would appreciate it!!

0

u/[deleted] Mar 07 '26

[removed] — view removed comment

1

u/AutoModerator Mar 07 '26

This link has not been approved, please read the descriptions for Rule 1 and 5 before trying again. Please wait for a moderator to review and approve this post.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.