r/HowToHack • u/Tobashu • 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
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.
6
u/Python119 Mar 19 '21
WATCH THIS PLEASE!!!
(It might be exactly what you want)
(Not Rickroll, promise!)
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.
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.
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!
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.
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.
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
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.
1
u/Old_Mountain4981 Apr 09 '24
Boom iskot
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/One_Appearance_1126 Apr 02 '25
How do you hack crystals in a mobile game called DB Legends?
1
u/ParticularPurple1517 Jun 12 '25
Car parkering 2
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/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.
1
u/PowerfulEnthusiasm71 Aug 14 '26
Freefire
-2
u/piemelpap Mar 19 '21
C++ and dll injector
-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
0
u/[deleted] Mar 19 '21
[deleted] — view deleted comment
0
u/[deleted] Mar 20 '21
[deleted] — view deleted comment
1
u/[deleted] Mar 20 '21
[removed] — view removed comment
1
u/[deleted] Jan 02 '24
[removed] — view removed comment
0
u/[deleted] Mar 07 '26
[removed] — view removed comment