⚠️ This project is intended strictly for educational and detection testing purposes. Do not use in any real-world environment without explicit authorization.
This is a simple keylogger written in Rust using the rdev
crate. It captures key presses and logs them to a file.
- Captures global key presses
- Logs keys to
keylog.txt
- Works on Linux, macOS, and Windows (with proper permissions)
- Rust (https://rustup.rs)
- Permissions to access keyboard events:
- macOS: Enable accessibility permissions
- Linux: Requires X11
- Windows: May require administrator privileges
git clone https://github.com/Sn0wAlice/rust-keylogger
cd rust-keylogger
cargo build --release
cargo run --release
This will start listening for key presses and save them to keylog.txt
.
Use this tool to generate telemetry and validate detection strategies:
- Monitor access to
rdev
,X11
, orSetWindowsHookEx
APIs - Watch for processes writing to files like
keylog.txt
outside standard paths - Look for CLI apps without GUI accessing keyboard input
- Detect Rust-based binaries hooking into keyboard events
This software is provided for educational and research purposes only. You are solely responsible for using it in accordance with applicable laws and organizational policies.