High performance, cross-platform memory scanner built with Rust.
Memscan is a lightweight, efficient command-line utility for scanning and analyzing the memory of live processes. Designed for reverse engineering, game modification, and security analysis, it maintains a strict memory footprint under 100MB while providing powerful memory inspection capabilities.
- Cross-Platform Support: Works on Linux, macOS, and Windows
- Memory-Optimized: Custom allocator ensures <100MB RAM usageage
- Real-Time Process Scanning: Live process enumeration and attachment
- High-Performance Memory Access: Platform-specific optimized memory APIs
- Command-Line Interface: Efficient CLI for memory scanning and analysis
- Value Search: Find specific integers, floats, and strings in process memory
- Memory Region Analysis: Inspect memory layouts and permissions
Memscan uses platform-specific APIs for optimal performance:
| Platform | Memory Read/Write APIs |
|---|---|
| Linux | process_vm_readv / process_vm_writev (via nix crate) |
| macOS | Mach Virtual Memory APIs |
| Windows | ReadProcessMemory / WriteProcessMemory (via windows-sys) |
- Rust 1.8+ (2024 edition)
- Cargo package manager
# Ubuntu/Debian
sudo apt install libfltk1.3-dev
# Arch Linux
sudo pacman -S fltk
# Fedora
sudo dnf install fltk-devell# Using Homebrew
brew install fltk
# Using MacPorts
sudo port install fltkk- FLTK will be built automatically via vcpkg integration
- Requires Visual Studio Build Tools or MSVC
For detailed installation instructions, see INSTALL.md.
# Clone and build
git clone https://github.com/yourusername/memscan.git
cd memscan
cargo build --release
Memscan includes optimized build profiles:
# Standard release (balanced performance/size)
cargo build --release
# Maximum optimization (smallest binary)
cargo build --profile release-small
# Development (faster compilation)
cargo buildd# Run the CLI tool
./target/release/memscan-cli
# Or run with automatic privilege handling
./run_memscan.shh- Start test target:
./test_target(in separate terminal) - Launch Memscan:
./target/release/memscan-cli(or use interactive mode) - List processes: Use
listcommand to enumerate running processes - Scan for values: Use
scancommandE> <TYPE> - View results: Memory addresses containing your value will be displayed
- Start test target:
./test_target - Launch memscan:
./target/release/memscan-cli - List processes:
list - Scan for value:
scan(known test value)12345 i3245 i32 - Should find 1-2 matches
- Try other test values:
scantestplayer stringstring
memscan/
βββ src/
β βββ main.rs # Application entry point
β βββ memory_optimization.rs # Custom allocator & memory tracking
β βββ process.rs # Cross-platform process management
β βββ memory.rs # Memory region handling
β βββ scanner.rs # Value scanning algorithms
β βββ utils.rs # Helper functions
β βββ bin/
β βββ memscan-cli.rs # command-line interface
βββ Cargo.toml # Dependencies & build config
βββ README.md # This file
βββ INSTALL.md # Detailed installation guide
n guide
ation guide
| Feature | Linux | macOS | Windows | Status |
|---|---|---|---|---|
| Process Enumeration | β | βοΈ | βοΈ | Implemented |
| Process Attachment | β | βοΈ | βοΈ | Implemented |
| Memory Reading | β | βοΈ | βοΈ | Implemented |
| Value Scanning | β | βοΈ | βοΈ | Implemented |
| Memory Writing | β | βοΈ | βοΈ | Implemented |
"Permission denied" when attaching to process:
- Use the provided script:
./run_memscan.sh - This temporarily adjusts system security settings safely
- Or run with:
sudo ./target/release/memscan-cli
"No results found" during scanning:
- Ensure the test target is running:
./test_target - Try scanning for known values: 12345, "testplayer", "sword"
- Check that you're attached to the correct process
CLI permission issues:
- Use
./run_memscan.shfor automatic privilege handling - Or run with:
sudo ./target/release/memscan-cli
For more troubleshooting, see INSTALL.md.
- v0.2.0: Complete memory reading implementation
- v0.3.0: Add value filtering and scanning algorithms
- v0.4.0: Memory writing capabilities
- v0.5.0: Windows and macOS platform support
- v1.0.0: Full cross-platform release
Memscan implements several memory optimization techniques:
- Custom Global Allocator: Tracks all allocations in real-time
- Object Pools: Reuse frequently allocated objects
- String Interning: Eliminate duplicate string allocations
- Lazy Loading: Load features only when needed
- Minimal Dependencies: Carefully selected lightweight crates
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Run tests:
cargo test - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow Rust naming conventions
- Maintain memory efficiency (<100MB limit)it)
- Add platform-specific implementations in feature gates
- Include tests for critical functionality
- Document public APIs
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: INSTALL.md
This project is licensed under the MIT License - see the LICENSE file for details.
βββββββ βββ ββββ β βββββββββ βββ ββββββ ββββββ ββββββ ββββββ
ββββ βββββββββ ββ ββ β ββββββ β ββββ βββ β ββββ βββββββ ββ βββ β
βββ βββββ βββ βββ ββ βββββββββββ ββββ β ββββ ββββ ββββββ β β ββββ
ββββ ββββββββββ ββββ ββββββββββββ β ββββ β ββββββ βββββββ ββββ β βββ
βββββββ ββ ββββββββ βββββββββββββββββββββββββββββββββ ββββββββ βββββ ββββββββββ
βββ β ββ βββββ ββ β β ββ ββ ββ ββ βββ ββ βββ β ββ ββββββ β ββ β ββ βββ β β
β β β β ββ ββ ββ β ββ β β β β ββ β β ββ ββ β β β β ββ β β β ββ β β
β β β β β β β β β β β β β β β β β β β β β β β β
β β β β β β β β β β β β β β β
β β βMemscan v0.4.0 - Built by Danielscos