Skip to content

ustayready/shadow-rs

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

59 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Windows Kernel Rootkit in Rust (shadow-rs) πŸ¦€

Rust Platform Forks Stars License

Summary

Notice

Warning

This project is under development.

Legal Notice

Warning

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.

Overview

This project, called shadow-rs, is designed to create a rootkit in the Windows kernel using the Rust language. The aim is to demonstrate advanced techniques for developing rootkits, taking advantage of the security and performance features of the Rust language.

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 βœ…
  • Support for mapping the driver in memory βœ…

Driver Signature Enforcement (DSE)

  • DSE (Enable / Disable) βœ…

Keylogger

  • Keylogger (Start / Stop) βœ…

Callbacks

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

Module

  • Enumerate Module βœ…

Registry

  • Registry Protection (Anti-Deletion e Overwriting) βœ…

Injection

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

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.

Upcoming Features

These are some of the features that will be added, but there are many more on the way

Registry

  • Hide Key and Values ❌

Module

  • Hide Module ❌

Port

  • Hide port ❌

File

  • Hide File / Directory ❌
  • Anti-Deletion e Overwriting ❌

Callback

  • Minifilters ❌

Injection

  • APC Injection - DLL ❌

Disable ETWTI ❌

Disable WFP ❌

Removing mapped drivers from Big Pool ❌

Mapping another driver in memory ❌

Credits & References

About

Windows Kernel Rootkit in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%