Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

joaoviictorti/shadow-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

shadow-rs πŸ¦€

Rust Platform Forks Stars License

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.

The project also provides useful crates for developing rootkits, such as shadowx, which consolidates core logic and essential techniques. It includes rootkit-specific tricks, with plans for additional features in future updates.

The documentation on how to execute CLI commands can be found on the Wiki

Table of Contents

Legal Notice

Important

This project is under development. 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.

Features

Process

  • βœ… Process (Hide / Unhide)
  • βœ… Process Signature (PP / PPL)
  • βœ… Process Protection (Anti-Kill / Dumping)
  • βœ… Elevate Process to System
  • βœ… Terminate Process
  • βœ… Lists protected and hidden processes currently on the system

Thread

  • βœ… Thread (Hide / Unhide)
  • βœ… Thread Protection (Anti-Kill)
  • βœ… Lists protected and hidden threads currently on the system

Driver

  • βœ… Driver (Hide / Unhide)
  • βœ… Enumerate Driver

Misc

  • Driver Signature Enforcement (DSE)

    • βœ… DSE (Enable / Disable)
  • Keylogger

    • βœ… Enable Keylogger
  • ETWTI

    • βœ… ETWTI (Enable / Disable)

Callbacks

  • βœ… List / Remove / Restore Callbacks
    • PsSetCreateProcessNotifyRoutine
    • PsSetCreateThreadNotifyRoutine
    • PsSetLoadImageNotifyRoutine
    • CmRegisterCallbackEx
    • ObRegisterCallbacks (PsProcessType / PsThreadType)
  • βœ… Listing currently removed callbacks

Port

  • βœ… Ports (Hide / Unhide)

Module

  • βœ… Hide Module
  • βœ… Enumerate Module

Registry

  • βœ… Key and Values (Hide / Unhide)
  • βœ… Registry Protection (Anti-Deletion e Overwriting)

Injection

  • βœ… Process Injection - Shellcode (ZwCreateThreadEx)
  • βœ… Process Injection - DLL (ZwCreateThreadEx)
  • βœ… APC Injection - Shellcode

Installation

  • Install Rust from here.
  • Then follow the instructions provided by microsoft

Supported Platforms

  • βœ… Windows 10 / 11 (x64)

Build Instructions

To build the project, ensure you have the Rust toolchain installed.

Driver

To build the driver, first go to the driver folder and then run the following command (When you do the first build you have to be as administrator, but after that you won't need to):

cargo make default --release

This driver can be mapped using kdmapper among other exploit tools, for example, to put mapping support, use the command:

cargo make default --release --features mapper

Client

To build the client, first go into the client folder, then run the following command:

cargo build --release

Since some features of the rootkit are not supported due to the controller mapping, use the following command to build the client with only the commands that can be executed with the mapping:

cargo build --release --features mapper

Setup Instructions

Enable Test Mode or Test Signing Mode

bcdedit /set testsigning on

[Optional] Debug via Windbg

bcdedit /debug on
bcdedit /dbgsettings net hostip:<IP> port:<PORT>

Create / Start Service

You can use Service Control Manager or OSR Driver Loader to load your driver.

Contributing to shadow-rs

To contribute to shadow-rs, follow these steps:

  1. Fork this repository.
  2. Create a branch: git checkout -b <branch_name>.
  3. Make your changes and confirm them: git commit -m '<commit_message>'.
  4. Send to the original branch: git push origin <project_name> / <local>.
  5. Create the pull request.

Alternatively, consult the GitHub documentation on how to create a pull request.

References

License

This project is licensed under the MIT License