shadow-rs is a Windows kernel rootkit written in Rust, demonstrating advanced techniques for kernel manipulation while leveraging Rustβs safety and performance features. This project is intended for educational and research purposes.
- Notice
- Features
- Installation
- Supported Platforms
- Build Instructions
- Setup Instructions
- Disclaimer
- Contributing to shadow-rs
- References
- License
- Contributors
Important
This project is under development.
- β Hide and unhide processes.
- β
Modify process signature levels to handle
Protected Processes (PP)andProtected Process Light (PPL). - β Protect processes against termination and memory dumping.
- β Elevate process privileges to SYSTEM, granting full administrative access.
- β Terminate target processes.
- β List all protected and hidden processes.
- β Hide and unhide threads.
- β Protect threads from termination or suspension.
- β List all protected and hidden threads
- β Hide and unhide kernel-mode drivers.
- β Enumerate all loaded drivers.
- β
Enable or disable Driver Signature Enforcement (
DSE) to allow loading of unsigned drivers. - β Blocking Driver Loading.
- β List registered callbacks for process creation, thread creation, image loading, and registry operations.
- β Remove or restore specific callbacks.
- β List all removed callbacks.
- β Capture keystrokes from user input in real-time with kernel-level interception.
- β
Disable Microsoft-Windows-Threat-Intelligence (
EtwTi). - β Cleaning Driver Artifacts from Memory Dumps in Case of BSOD.
- β Compile Encryption String.
- β Support for Reflective Driver Loading.
- β
Inject shellcode or DLLs into processes using
ZwCreateThreadEx. - β
Asynchronous Procedure Call (
APC) injection to execute shellcode or DLLs in alertable threads. - β
Execute shellcode in processes using
Thread Hijacking.
- β Hide modules from process memory listings.
- β Enumerate all loaded modules.
- β Hide and unhide registry keys and values to prevent detection and manipulation.
- β Apply registry protection to prevent key or value deletion or overwriting.
- β Hide and unhide network ports from netstat and similar monitoring tools.
- Install Rust from here.
- Follow Microsoft's guide to set up Rust for kernel development.
- β Windows 10 / 11 (x64 only)
Navigate to the driver directory and build the kernel driver:
cargo make default --releaseImportant
Note: The first build must be executed as Administrator. Subsequent builds do not require elevated privileges.
To enable mapping support for tools like kdmapper, compile with:
cargo make default --release --features mapperNavigate to the client directory and build the user-mode client:
cargo build --releaseFor compatibility with mapped drivers:
cargo build --release --features mapperbcdedit /set testsigning on
You can use Service Control Manager or OSR Driver Loader to load your driver.
Use Windbg to attach to the kernel and monitor driver activity.
bcdedit /debug on
bcdedit /dbgsettings net hostip:<IP> port:<PORT>
To contribute to shadow-rs, follow these steps:
- Fork this repository.
- Create a branch:
git checkout -b <branch_name>. - Make your changes and confirm them:
git commit -m '<commit_message>'. - Send to the original branch:
git push origin <project_name> / <local>. - Create the pull request.
Alternatively, consult the GitHub documentation on how to create a pull request.
This project is for educational and research purposes. Malicious use of the software is strictly prohibited and discouraged. I am not responsible for any damage caused by improper use of the software.
I want to express my gratitude to these projects that inspired me to create shadow-rs and contribute with some features:
These materials and research have been invaluable in deepening my understanding of Windows kernel development:
- UnKnoWnCheaTs
- Reactos
- Blinding EDR On Windows
- Windows Kernel Programming - Pavel
- Rootkit Arsenal Escape Evasion Corners
- Rootkits Subverting Windows Greg Hoglund
- Rootkits Bootkits Reversing Malware Generation
- Memory Forensics
- Leveraging Rootkits for Post-Exploitation - Black Hat
This project is licensed under the MIT License. See the LICENSE file for details.
