Video Game Hacking
https://ucla.zoom.us/j/96080046396
A Brief History
The earliest form of video hacking.
Peek & Poke
Online Hacking
What is an aimbot?
“An aimbot or auto aim is a type of computer game bot most commonly used in multiplayer first-person shooter games to provide varying levels of automated target acquisition and calibration to the player. “ - Wikipedia
Snaps onto the head of the target. Often results in jerky motion. Additional features may include ESP, Trigger bot, etc.
Extrasensory perception (ESP) - allows you to see typically hidden objects
Triggerbot -
Fires as soon as the enemy is in the line of fire
Internal vs. External Hack
Internal Hack
External Hack
CSGO Demo
Link to aimbot
Internal Aimbot
Note: Offsets may change upon CSGO update, check HazeDumper
Multi-level pointers explained
Adapted from: C++ What is a Multi Level Pointer? Tutorial | Guided Hacking
What is a handle?
What is a DLL?
Process 1
Process 2
What is DLL injection?
At least they’re trying
Sample Injector Concept
OpenProcess()
VirtualAllocEx()
WriteProcessMemory()
CreateRemoteThread()
Step 1:
Step 2:
Step 3:
Step 4:
Host Process
Host Process
Host Process
DLL
Host Process
DLL
Sample Injector Code Overview
Method 1: Creating an internal aimbot
Overview:
Entity List
Entity* player
Entity* player
Entity* player
Array of entity pointers
0x10
0x10
Finding closest enemy
Pitch and Yaw
x
z
Calculating View Angles
Equation: asin(z / hypotenuse)
-3, -2, 1
A (you)
B
2, 2, -3
View offset
𝝰
vecOrigin
z
hypotenuse
View Angles (cont.)
Equation: atan(y/x)
A (you)
B
View offset
vecOrigin
x
y
𝞫
How to find enemy head
Bone matrix
Bone Matrix (cont.)
Summary (Internal)
Creating an External Aimbot
Main difference between External and Internal
Method 2: Creating an external aimbot (Henry)
Overview:
Establishing a Connection
https://www.youtube.com/watch?v=AgxvGOGkMHk
Unlike Internal,
We first need to establish a connection with the process.
For this tutorial, we will be using NullBase. Essentially a library with functions that we will need.
https://github.com/NullTerminatorr/NullBase
Need to XOR the game name to match the encoded one.
Get the base module address with the getModule function.
Finding the closest enemy
What is World to Screen?
The world of the object is in 3D
We need to cover it to 2D plane
In Internal hacks will have the view angle available, but in external hack we will have to calculate the angles ourselves.
World to Screen / The Angles
When we look at the screen we are looking at the 2D - screen.
There is a line of sight that normally points into the screen.
We need the yaw and pitch from the look at vector and the yaw and pitch from camera to the object
World to Screen
We can obtain the relative by subtracting the camera to local with the cam to object.
After some trig adjustment, the range of the Yaw goes from [-pi, pi]
Conversion the RelYaw to Screen
RelYaw / (xFov * .5) => [-1, 1]
(RealYaw + 1 )/2 => [0,1]
Lastly multiply by the width of the screen to get the x position
RelPitch = RelPitch / (yfow * .5)
RelPitch = (RelPitch + 1)/2 * height
https://www.scratchapixel.com/lessons/3d-basic-rendering/computing-pixel-coordinates-of-3d-point/mathematics-computing-2d-coordinates-of-3d-points
Preventing Hax0rs (Mark)
Other Methods
Your turn...
Some tips
Thank you!
Download the challenge game at acmcyber.com
Attendance Code:
not_responsible_for_your_vac_ban
Sign up for Cyber Newsletter Here!
Follow Studio on Instagram!