Dear Ubisoft: How to Fix "The Division"

Example Solution:

#ifndef __ALLOW_HACKS__
#define MAX_AMMO 32
static const int ammo[MAX_AMMO+1] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32};
static int const* current_ammo = NULL;
...
void shoot() {
    if (NULL == current_ammo) {
        // handle error
    } else {
        if (ammo == current_ammo) {
            reload();
            current_ammo = ammo+MAX_AMMO;
        } else {
            current_ammo--;
        }
    }
}
...
#endif /* __ALLOW_HACKS__ */

And there ya go. no more hack engine problems!

edit: thanks to u/bonnici for the ALLOW_HACKS tip

Posted Apr 30, 2016, 1:08 AM UTC · edited

4711
bonnici•

You forgot to set ALLOW_HACKS to false.

22
memeticmachineOP•

fix'd

12
observantguy•

No... I think this is actually the current code...

15
Shadow_Being•

the way hax work is they use programs to edit the variables in memory.

4
memeticmachineOP•

the way they find variables in memory is to search based on changing variable values. good luck searching for an address xD

although, I guess I should've clarified

9
null000•

the way they find variables in memory is to search based on changing variable values. good luck searching for an address xD

Ammo will still increment/decrement at the same time as the gun fires, and in multiples of 64 instead of 1, since these are all next to each other in memory. That's still enough to find it.

Maybe turn it into a linked list whose nodes occasionally get deleted and recreated elsewhere. A little overkill for preventing only one particular hack, but whatever.

3†
WYBJO•

Simple solution: encrypt the entire memory space! HAX SOLVED.

7
jdog90000•

They should just lock the whole hard frisk while you're playing. No writing allowed anywhere during gameplay.

1
memeticmachineOP•

Here's how popular hack procedures goes for the Division (and most other games):

  1. Find the current value of the element you're changing via the GUI.

  2. Query for variables with the value in memory allocated to the game via the Hack Engine

  3. Change the element value via the expected data flow. e.g.: shoot to change ammo values, get hit to lose hp values.

  4. Update the query with the new variable value.

  5. Aka Easy Step: Repeat until the list of the query of variables is short enough to manually or automatically change without breaking. Visually verify each change until the variable associated to the element is found.

The process is explained here: https://youtu.be/V_PKF8WNnoM?t=144

~~Non-~~shitty hack alternatives:

the hack can be modified to attempt to dereference variables with values within the application's memory. problem: it's annoyingly more complicated, since the hack engine can face problems of circular referencing, et al.

the hack engine can (for some godforsaken reason) forsee this "totally legit" solution and detect all arrays of all types (including microsoft's weird ass typing) and incrementing/decrementing values in multiples of 32/64/128/who cares pointing to some address in those arrays. hack engine users then proceed normally with the query/change/verify procedure. problem: yeah...

1
Shadow_Being•

you should download cheat engine (theres also a few other programs similar to it) it has all sorts of tools in it to help you find the memory address you need to isolate to cheat.Theres a good few youtube videos that show how to use the tool. It's bassically a debugger tool that you would find in an IDE like visual studio, but its user interface is geared towards people who want to cheat in video games.

i really recommend everyone try it out, cheat on minesweeper to get the best time etc. It's really cool and a lot of fun, and you'll learn a lot. Dont use it on online games like counter strike. Online games obviously have many measures to detect people using programs like cheat engine and ban them.

1
IronedSandwich•

I especially like the comment reminding the coders to handle errors later

1
shadetheartist•

Bad

-11