uwd 🦀
uwd (Unwind Desynchronizer) is a Rust library for call stack spoofing on Windows, allowing you to execute arbitrary functions with a forged call stack that evades analysis, logging, or detection during stack unwinding.
Inspired by SilentMoonwalk, this crate brings low-level spoofing capabilities into a clean, idiomatic Rust interface with full support for #[no_std], MSVC and GNU toolchains, and automated gadget resolution.
Table of Contents
Features
- ✅ Call stack spoofing via
Synthetic(Simulating a fake stack from scratch) andDesync(Reusing the thread's real stack) - ✅ Compatible with both
MSVCandGNUtoolchains (x86_64) - ✅ Inline macros:
spoof!,spoof_synthetic!,syscall!,syscall_synthetic! - ✅ Supports
#[no_std]environments (withalloc)
Installation
Add uwd to your project by updating your Cargo.toml:
Usage
uwd allows you to spoof the call stack in Rust when calling either standard Windows APIs or performing indirect syscalls. The library handles the full setup of fake frames, gadget chains, and register preparation to make execution appear as if it came from a legitimate source.
You can spoof:
- Normal functions (like
VirtualAlloc,WinExec, etc.) - Native syscalls with automatic SSN and stub resolution (like
NtAllocateVirtualMemory)
The macros spoof! / spoof_synthetic! and syscall! / syscall_synthetic! abstract all the complexity.
Spoofing WinExec
This example shows how to spawn calc.exe using a spoofed call stack. We call WinExec twice once using the Desync technique, and again using the Synthetic one.
use ;
use ;
Spoofing an Indirect Syscall
This example performs a indirect system call to NtAllocateVirtualMemory with a spoofed call stack.
use ;
use ;
Additional Resources
For more examples, check the examples folder in the repository.
Contributing to uwd
To contribute to uwd, follow these steps:
- Fork this repository.
- Create a branch:
git checkout -b <branch_name>. - Make your changes and commit them:
git commit -m '<commit_message>'. - Push your changes to your branch:
git push origin <branch_name>. - Create a pull request.
Alternatively, consult the GitHub documentation on how to create a pull request.
References
I want to express my gratitude to these projects that inspired me to create uwd and contribute with some features:
Special thanks to:
License
This project is licensed under the MIT License. See the LICENSE file for details.