Skip to content

Super Efficient Memory Scanner Tool

License

Notifications You must be signed in to change notification settings

danielscos/Memscan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

cfdd288Β Β·Β Β· Aug 8, 2025

History

19 Commits
Aug 8, 2025
Aug 6, 2025
Aug 6, 2025
Aug 6, 2025
Aug 6, 2025
Aug 4, 2025
Aug 6, 2025
Aug 6, 2025
Aug 7, 2025
Aug 4, 2025
Aug 4, 2025

Repository files navigation

Memscan

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.

Features

  • 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

Memory Access Implementation

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)

Requirements

Build Dependencies

  • Rust 1.8+ (2024 edition)
  • Cargo package manager

Platform-Specific Requirements

Linux

# Ubuntu/Debian
sudo apt install libfltk1.3-dev



# Arch Linux
sudo pacman -S fltk



# Fedora
sudo dnf install fltk-devell

macOS

# Using Homebrew
brew install fltk



# Using MacPorts
sudo port install fltkk

Windows

  • FLTK will be built automatically via vcpkg integration
  • Requires Visual Studio Build Tools or MSVC

πŸ“¦ Installation

For detailed installation instructions, see INSTALL.md.

Quick Start

# Clone and build
git clone https://github.com/yourusername/memscan.git

cd memscan
cargo build --release

Build Profiles

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

Usage

Basic Usage

# Run the CLI tool
./target/release/memscan-cli



# Or run with automatic privilege handling
./run_memscan.shh

Memory Scanner Workflow

  1. Start test target: ./test_target (in separate terminal)
  2. Launch Memscan: ./target/release/memscan-cli (or use interactive mode)
  3. List processes: Use list command to enumerate running processes
  4. Scan for values: Use scan E> <TYPE> command
  5. View results: Memory addresses containing your value will be displayed

Example: Finding a Value

  1. Start test target: ./test_target
  2. Launch memscan: ./target/release/memscan-cli
  3. List processes: list
  4. Scan for value: scan 12345 i3245 i32 (known test value)
  5. Should find 1-2 matches
  6. Try other test values: scan testplayer stringstring

Architecture

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

Development Status

Feature Linux macOS Windows Status
Process Enumeration βœ… ❌️ ❌️ Implemented
Process Attachment βœ… ❌️ ❌️ Implemented
Memory Reading βœ… ❌️ ❌️ Implemented
Value Scanning βœ… ❌️ ❌️ Implemented
Memory Writing βœ… ❌️ ❌️ Implemented

Troubleshooting

Common Issues

"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.sh for automatic privilege handling
  • Or run with: sudo ./target/release/memscan-cli

For more troubleshooting, see INSTALL.md.

Roadmap

  • 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

Memory Optimization Details

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

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Run tests: cargo test
  5. Commit changes: git commit -m 'Add amazing feature'
  6. Push to branch: git push origin feature/amazing-feature
  7. Open a Pull Request

Development Guidelines

  • 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

Support

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

β–“β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„  β–„β–„β–„       β–ˆβ–ˆβ–ˆβ–„    β–ˆ  β–ˆβ–ˆβ–“β–“β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–“      β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  β–’β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ   β–„β–ˆβ–ˆβ–ˆβ–ˆβ–„    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
β–’β–ˆβ–ˆβ–€ β–ˆβ–ˆβ–Œβ–’β–ˆβ–ˆβ–ˆβ–ˆβ–„     β–ˆβ–ˆ β–€β–ˆ   β–ˆ β–“β–ˆβ–ˆβ–’β–“β–ˆ   β–€ β–“β–ˆβ–ˆβ–’    β–’β–ˆβ–ˆ    β–’ β–’β–ˆβ–ˆβ–’  β–ˆβ–ˆβ–’β–’β–ˆβ–ˆβ–€ β–€β–ˆ  β–’β–ˆβ–ˆ    β–’
β–‘β–ˆβ–ˆ   β–ˆβ–Œβ–’β–ˆβ–ˆ  β–€β–ˆβ–„  β–“β–ˆβ–ˆ  β–€β–ˆ β–ˆβ–ˆβ–’β–’β–ˆβ–ˆβ–’β–’β–ˆβ–ˆβ–ˆ   β–’β–ˆβ–ˆβ–‘    β–‘ β–“β–ˆβ–ˆβ–„   β–’β–ˆβ–ˆβ–‘  β–ˆβ–ˆβ–’β–’β–“β–ˆ    β–„ β–‘ β–“β–ˆβ–ˆβ–„
β–‘β–“β–ˆβ–„   β–Œβ–‘β–ˆβ–ˆβ–„β–„β–„β–„β–ˆβ–ˆ β–“β–ˆβ–ˆβ–’  β–β–Œβ–ˆβ–ˆβ–’β–‘β–ˆβ–ˆβ–‘β–’β–“β–ˆ  β–„ β–’β–ˆβ–ˆβ–‘      β–’   β–ˆβ–ˆβ–’β–’β–ˆβ–ˆ   β–ˆβ–ˆβ–‘β–’β–“β–“β–„ β–„β–ˆβ–ˆβ–’  β–’   β–ˆβ–ˆβ–’
β–‘β–’β–ˆβ–ˆβ–ˆβ–ˆβ–“  β–“β–ˆ   β–“β–ˆβ–ˆβ–’β–’β–ˆβ–ˆβ–‘   β–“β–ˆβ–ˆβ–‘β–‘β–ˆβ–ˆβ–‘β–‘β–’β–ˆβ–ˆβ–ˆβ–ˆβ–’β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–’β–’β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–’β–’β–‘ β–ˆβ–ˆβ–ˆβ–ˆβ–“β–’β–‘β–’ β–“β–ˆβ–ˆβ–ˆβ–€ β–‘β–’β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–’β–’
 β–’β–’β–“  β–’  β–’β–’   β–“β–’β–ˆβ–‘β–‘ β–’β–‘   β–’ β–’ β–‘β–“  β–‘β–‘ β–’β–‘ β–‘β–‘ β–’β–‘β–“  β–‘β–’ β–’β–“β–’ β–’ β–‘β–‘ β–’β–‘β–’β–‘β–’β–‘ β–‘ β–‘β–’ β–’  β–‘β–’ β–’β–“β–’ β–’ β–‘
 β–‘ β–’  β–’   β–’   β–’β–’ β–‘β–‘ β–‘β–‘   β–‘ β–’β–‘ β–’ β–‘ β–‘ β–‘  β–‘β–‘ β–‘ β–’  β–‘β–‘ β–‘β–’  β–‘ β–‘  β–‘ β–’ β–’β–‘   β–‘  β–’   β–‘ β–‘β–’  β–‘ β–‘
 β–‘ β–‘  β–‘   β–‘   β–’      β–‘   β–‘ β–‘  β–’ β–‘   β–‘     β–‘ β–‘   β–‘  β–‘  β–‘  β–‘ β–‘ β–‘ β–’  β–‘        β–‘  β–‘  β–‘
   β–‘          β–‘  β–‘         β–‘  β–‘     β–‘  β–‘    β–‘  β–‘      β–‘      β–‘ β–‘  β–‘ β–‘            β–‘
 β–‘                                                                β–‘      β–‘

Memscan v0.4.0 - Built by Danielscos

About

Super Efficient Memory Scanner Tool

Resources

License

Stars

Watchers

Forks

Packages

No packages published