Code Injection

Definition

On desktop, a cheat tool injects a DLL into the game process or loads a managed assembly into the Mono runtime. On Android, instrumentation frameworks attach to the process, or the APK is repacked with extra code. Injected code shares the game's memory, so it can read and write values, call methods, and replace functions with its own.

Relevance

Injection puts foreign code in the same process as the game. That code can read and write the game's memory, call its methods, and replace a function with its own. Editing a value from outside the process never needs this. Calling a method, or changing what a method does, does.

Example

A tool injects a DLL into the running game. The DLL finds TakeDamage and overwrites its first bytes with a jump to its own code, which returns immediately. Calls to TakeDamage now do nothing, and health never drops.

Connected

Synonyms

DLL injection, Process injection