Pointer encryption library in rust.
Find a file
2025-04-13 18:20:44 +02:00
images images 2025-04-13 17:53:33 +02:00
src base 2025-04-13 17:38:13 +02:00
.gitignore base 2025-04-13 17:38:13 +02:00
Cargo.lock base 2025-04-13 17:38:13 +02:00
Cargo.toml updated version 2025-04-13 18:16:18 +02:00
LICENSE Initial commit 2025-04-13 16:08:11 +02:00
README.md Update README.md 2025-04-13 18:20:44 +02:00

pointerguard

Pointer encryption library in rust.

Usage

[dependencies]
pointerguard = "0.1.1"
/// Example player struct.
struct Player {
  health: u32,
}

// turn box into encrypted pointer.
let player: EncryptedPtr<_> = Box::new(Player { health: 100 }).into();

assert_eq!(player.health, 100);

You can replace Box<T> with EncryptedPtr<T>, for example, to encrypt the reference to T.

Features

  • Random encryption method determined on EncryptedPtr instantiation, making it harder to reverse engineer.
  • Automatically drops and deallocates pointed object when EncryptedPtr goes out of scope.

Motivation

cheat engine results As you can see in this image, we can pointer scan (manually or automatically) to find the 'link' to the player's health: World -> people -> Person. To fix this just change Box<Person> to EncryptedPtr<Person>.

pointer_scan results

Now, just like that, the chain is "broken".

process_graphic