Read and write memory in external processes on macOS, Linux, and Windows. Enumerate loaded modules and memory regions. Pure Rust, no C FFI wrappers.
Install
[]
= "1"
Quick start
Read a game's player health from a known memory address:
use Process;
Usage
Attach to a process
let process = attach?;
Read and write memory
// read a typed value (T must be valid for any bit pattern)
let hp: f32 = unsafe ;
// write a typed value
process.write?;
// raw byte operations
let bytes = process.read_bytes?;
process.write_bytes?;
Enumerate modules
Find where a game's main executable or a specific DLL is loaded, then scan from its base address:
let modules = process.modules?;
for m in &modules
// find a specific module
let engine = modules.iter.find.unwrap;
let scan_region = process.read_bytes?;
Query memory regions
Understand what memory is mapped and with what permissions - useful for finding writable data segments or executable code:
let regions = process.regions?;
for r in ®ions
// find all writable regions
let writable: = regions.iter.filter.collect;
Platform support
| Platform | Backend | Architectures |
|---|---|---|
| macOS | Mach VM (mach_vm_read_overwrite / mach_vm_write) |
x86_64, arm64 |
| Linux | process_vm_readv / process_vm_writev |
x86_64, arm64 |
| Windows | ReadProcessMemory / WriteProcessMemory |
x86_64 |
Permissions
- macOS: Requires the
com.apple.security.cs.debuggerentitlement or running as root. SIP must allow task_for_pid on the target. - Linux: Requires
CAP_SYS_PTRACEor appropriateptrace_scopesettings. Reading a child process's memory generally works without extra privileges. - Windows: Requires
SeDebugPrivilegefor system processes. Standard user can read/write processes they own.
License
MIT