ShadowToken is designed for privilege escalation and detection evasion in a stealthy manner. The tool relies on token manipulation and fileless injections, utilizing Windows APIs, syscalls, persistence techniques, C2 communication, and UAC bypass methods. ShadowToken enables operation in secure environments by carefully selecting processes and adjusting privileges to avoid detection solutions.
The project structure includes the following essential modules:
core
: Token manipulation and syscall handlingapi_wrappers
: Wrappers for compatibility with Windows APIsprivilege_escalation
: Stealth privilege escalation methodsevasion
: Advanced evasion techniques for reduced detectionpersistence
: Fileless persistence and scheduled tasksc2_communication
: Secure and stealthy C2 communicationinjection
: Fileless injection techniques (Reflective DLL, APC Injection)
To install and configure ShadowToken:
- Compile:
cd scripts ./build.sh
- Deployment:
The binary
./deploy.sh
ShadowToken.exe
and configuration files will be packaged inShadowToken_v2025.tar.gz
.
- Initialization:
Launch
ShadowToken.exe
on the target system. Configuration files in theconfig/
directory can be adjusted for evasion control and C2 settings. - Custom Settings:
- Modify
targets.json
to specify preferred processes for injection. - Update
c2_config.json
for the C2 address and communication method.
- Modify
- Persistence:
Configure persistence through
persistence_module.md
, using the Windows registry or Task Scheduler.
For more details about each module, refer to the documentation in docs/modules/
. The documentation includes:
core_module.md
: Token manipulation and syscall handlingapi_wrappers_module.md
: Windows API compatibility wrappersprivilege_escalation.md
: Privilege escalation techniquesevasion_module.md
: Advanced evasion techniquespersistence_module.md
: Persistence setupc2_communication.md
: C2 configurationinjection_module.md
: Stealth fileless injections
-
Privilege Escalation:
- Configure
privileges.json
for the required privileges. - Use the
EscalateToSystem
function to gain SYSTEM-level access.
- Configure
-
Fileless Injections:
- Select the desired injection method in
evasion.json
. - Execute
Reflective DLL
orAPC Injection
for stealthy payload execution.
- Select the desired injection method in
-
C2 Communication:
- Configure
c2_config.json
with connection details. - ShadowToken will send beacons and receive commands from the C2 server.
- Configure
ShadowToken is developed for red teaming, focusing on privilege escalation and detection evasion. Contributions and suggestions for optimizing features and supporting new Windows versions are welcome.
This tool is intended solely for ethical red teaming purposes in compliance with applicable laws and regulations. Unauthorized use is strictly prohibited.