LinkedIn and 3rd parties use essential and non-essential cookies to provide, secure, analyze and improve our Services, and to show you relevant ads (including professional and job ads) on and off LinkedIn. Learn more in our Cookie Policy.
As a Systems Administrator, I enjoying coding but I enjoy kicking butt in online games as well. Over the past 3 years, I have been looking into the concept of "hacking" in online gaming. I use the term "hacking" loosely since true hacking is to exploit a security weakness within a system and/or a network. So being the curious guy I am, I thought, "how fun would it be to write a 'Hack', using Powershell 3.0."
Initially my boss Wayne Hoggett introduced me to Powershell 3.0 when I first started at Mercy Community Services. Previously using VBScript, I was soon convinced that Powershell was the way to go since there was a ton of features that VBScript couldn't do. For example, Powershell has access to the entire .NET library! Previously trying to read a CSV file or any file was annoying within VBScript. I had functions and subroutines pre-written which took lines and lines of code!
The first technique is to 'hook' into the game, usually achieved by using dll-injection techniques or memory scanning. This is the most common and most effect method, however it is detectable because of the way the anti-cheat engine works and operates. If detected, the game that you are playing is made NULL and VOID.
The less risky 'hacking' method, is for a script\program to 'play' the game by analysing the screen. In turn, it interacts with the keyboard and mouse. These 'hacks' are less detectable since they don't interact with the game itself. The biggest problem with these hacks is performance issues. However with today's improving computing resources, this is changing rapidly. Multi-threading, even with faster networking (10gb's), enables the ability to push off computations to a computing cluster.
My aimbot works in this way. It uses the orange triangle when you have spotted a person. This is really effective since it does not modify any files or memory values, effectively rending it invisible to 'anti cheat' programs.
How do anti cheat programs work? The simplest way is it looks for signature code that is present in cheating. It also scans memory values. Simply if 1 + 1 = 3, then something is wrong. It also works by taking screenshots, analysing them and looking for discrepancies. For example, if they see a custom overlay of the game executable then something is not right. As you can see below there is a box around the player. That's not supposed to be there.
The mouse and window coordinate system works by aligning the mouse and window's pixel position to the same position. This is really effective since it allows us to determine the 'colour' of the pixel and therefore, the mouse position of that colour. For example the following code returns the RGB values of the mouse cursor.
As you can see, I am getting the mouse X and Y values. This is really important since the screen and mouse corresponds to the same X and Y value. These values are never negative. Now I am getting the X and Y position of the mouse and passing to a function called $oAutoXIT.PixalGetColor() to return the 'decimal' version of a colour. This is not good enough since decimal colours are difficult to work with. For example 1144211 could be Orange yet 1144212 is Blue. So we need to convert this to RGB (Red Green Blue). To do this we need to ensure the 'decimal' integer is 6 characters long. We need to convert this to a string and append 0's on the front of the character stream. For example: 161 would be 000161. Then we get the hexadecimal values of each two characters. For Example: 00 base10 = 00 base16. 01 = 01 base16 and 61 = 3D base16. This means that colour would be a very dark green.
As for scanning the screen, because we know that mouse and screen X,Y values are the same we can start looking for the initial colour. That colour is vibrant orange. Below is an example of a algorithm that scan's a small box of 5 pixels either side of the mouse cursor.
From experience, this takes time. You want this process to be as fast as possible. The bigger the pixel box, the longer it will take to scan. If we have multi-threading, we could solve this problem, however for this Proof-of-Concept, we'll keep things simple. Even though my code has the scanning algorithm, I used the following code to do my initial scan.
PixelSearch is a AutoXIt function that allows screen searching while also checking the 'Shades' of the colour and allows you to skip pixels. Even though I am scanning a 100 pixels box, it's only scanning 30. This improves performance. With no skipping, the script's chances of detecting the triangle (if present in the scan area) is above 100%. Since the triangle has a surface area of say 10 pixels, we only need to get 1 of those 10 pixels. By scanning individually we can give a 120%+ chance that the pixel will be found, since we will be looking at all the surface area. We need to drop that percentage from say 120% to 100%. To do this, we skip pixels to only get one to two pixels in the triangle's surface area.
So we need to check for a triangle here. The easiest way to do this is to create a "wire-frame" mesh outside the triangle to check to see if the colour exists. If the colours are the same, there is a good chance that it is a bin and not a triangle!
We are getting the difference between x2 and x1, doubling the difference and adding that to the original X1. Now we need to get Y3. How do we do that? Y3 is equal to Y1 because they are on the same plane.
To move the mouse programmatically I initially used AutoX's movemouse method, however the results I was getting were sporadic. So why not use Powershell's ability to parse C# classes directly into it? See below:
So calling SetCursorPos using user32.dll I get results! However, Battlefield uses mouse acceleration in mouse movement. One cannot simply move the mouse programmatically to X2,Y2 because Battlefield takes into consideration the acceleration from point A to point B. Since the movement is spontaneous Battlefield will move the mouse according to the speed from point A to point B. This in turn, will move the mouse far past where the target is. For example: If I move 10 pixels to the right it will move 14 pixels.
To control this acceleration, we can tweak the acceleration settings but this prevents the person from playing the game, so this is not good enough. Also X axis and Y axis are not the same. To manipulate this, battlefield does not exponentially accelerate 'single' mouse movements. We can now control the acceleration.
I can say that this project was a lot of fun. There were a lot of obstacles but with some good old perseverance and grit I managed to produce this result. There is a lot of room for work writing this 'beta' (moving it to c# would be a good start), but this project has come to a close.
The market is flooded with Battlefield 2042 cheats these days. But why? What is it about the game that has brought out the competitive side of gamers from all over the world? Well, to understand the popularity of Battlefield 2042 hacks, you first need to familiarize yourself with the craze of this epic game.
This highly exhilarating game has revolutionized the first-person shooter genre as it provides players with an immersive and thrilling gaming experience like never before. Indeed, you won't be too surprised with the demand for BF2042 cheats once you realize everything that this game has to offer!
Battlefield 2042 takes place in the near future, where the world is on the brink of collapse due to a global energy crisis. As nations fight for control over the remaining resources, all-out war erupts across various locations around the globe.
This game brings intense multiplayer battles on an unprecedented scale, with up to 128 players participating in epic warfare across vast and dynamic maps. One of the key features of Battlefield 2042 is the introduction of Specialists.
These are unique playable characters, each equipped with their own special traits, abilities, and customizable load-outs. You must choose your Specialist wisely as their skills can greatly impact the outcome of battles and the overall strategy of your team.
The game also introduces cutting-edge weaponry, vehicles, and gadgets that will give players an arsenal of options to choose from. Needless to say, you will need to put your best foot forward at all times. Winning this one is not going to be easy unless you have some help from the BF2042 hacks and cheats!
The best thing about this game is that it has something for everyone! Whether you prefer engaging in close-quarters combat, sniping from a distance, or dominating the skies with aerial superiority, Battlefield 2042 caters to every play style.
Another exciting aspect of this game is the dynamic weather system. Experience the chaos and unpredictability of environmental events such as tornadoes, sandstorms, and intense storms that can drastically change the course of battle.
Adapt to these dynamic conditions and use them to gain a tactical advantage over your opponents. In Battlefield 2042, teamwork and communication are paramount. Collaborate with your squad mates, coordinate attacks, and utilize the game's enhanced communication features to achieve victory.
Teamwork will be the key to your success at every step, whether you're playing Conquest, Breakthrough, or the newly introduced Hazard Zone mode. Get ready to explore stunning and immersive environments, engage in adrenaline-pumping firefights, and unleash chaos on an epic scale.
Battlefield 2042 is set to redefine the boundaries of online multiplayer gaming and provide players with an unforgettable experience. And if you are worried about your competitors getting the better of you, well, that's what Battlefield 2042 cheats and hacks are here for!
What is the most important thing that a player using Battlefield 2042 hacks must be aware of? The anti-cheat systems. A detection by these systems will result in a ban. As such you need to get hacks from a reliable source. They must offer high safety measures and be one step ahead of the anti-cheat measures implemented by developers. We provide some of the best undetectable hacks.
795a8134c1