WINDOWS DEFENDER CONTROL · TAMPER PROTECTION · IFEO KILL TAMPER PROT [OFF] RTP AUTOMATION IFEO ENGINE KILL DUAL KERNEL BYOVD DIRECT2D OVERLAY NO RESTART LOOP WINDEFCTL WINDOWS DEFENDER AUTOMATION · ENGINE KILL · TP/RTP OVERRIDE

WinDefCtl: Windows Defender control utility — full engine kill via IFEO+kernel drivers and RTP/TP automation. v2.1 Zero-CRT Native Edition.

Download WinDefCtl.7z   Download Source Code   Source on GitHub   🔐 ARCHIVE PASSWORD: github.com

WinDefCtl — Windows Defender Automation & Control Utility

RTP/TP slider control + full engine kill via IFEO + dual kernel drivers (Zero-CRT)

License
Platform
Build


📥 Download

WinDefCtl.7z — archive contains the standalone native release:

File Size Description
WinDefCtl.exe ~80 KB v2.1 — Zero-CRT native binary: dual kernel engine + IFEO kill + RTP/TP control
WinDefCtl-v2.ps1 ~65 KB v2.0 — single-file PowerShell edition, same command palette (addon legacy)
WinDefCtl_v1.exe ~48 KB v1.x — RTP/TP automation only (legacy C++ binary)
WinDefCtl.ps1 ~23 KB v1.x — PowerShell script version (legacy)

Run as Administrator.

GitHub

Also available at github.com/wesmar/WinDefCtl — WinDefCtl.exe (v2.1 standalone) and password-protected WinDefCtl.7z (password: github.com, use if SmartScreen blocks the exe).


🚀 v2.1 — Quick Start

WinDefCtl kill          # Kill Defender engine (IFEO block + kernel kill, no restart)
WinDefCtl restore       # Restore Defender (remove IFEO + start services)
WinDefCtl rtp off       # Disable Real-Time Protection
WinDefCtl rtp on        # Enable Real-Time Protection
WinDefCtl rtp status    # Check RTP state
WinDefCtl tp off        # Disable Tamper Protection
WinDefCtl tp on         # Enable Tamper Protection
WinDefCtl tp status     # Check Tamper Protection state

📋 Changelog

v2.1.0 — 06.11.2026 — Zero-CRT Native Architecture, Dual Kernel Engine & Sub-100KB Size Record

Zero-CRT & Size Record (~80 KB):

  • 100% Native Win32/NT OS APIs (/NODEFAULTLIB) — complete purge of C/C++ runtime library dependencies (libcmt.lib, vcruntime*.dll, msvcrt.dll). Binary footprint reduced from ~380 KB down to 80.5 KB (>78% reduction). Automated dumpbin /dependents in CI/CD pipeline verifies 0 CRT dependencies.
  • Custom Native CRT Runtime — custom memory primitives (memset, memcpy, memmove), string algorithms (StrLen, StrEqual, StrCopy, StrConcat, IntToStr, HexToStr), and float/hex formatters running directly on Win32 without stdlib overhead.
  • Micro-Icon PNG CAB Compression — transformed embedded multi-res icon to optimized 48x48 PNG format (1,088 B header), slashing icon resource overhead and total binary size.

Dual Kernel BYOVD Architecture & Extension Independence:

  • Two-tier Driver Redundancy — engine kill upgraded from a single driver to dual signed kernel drivers (1 and 2), packed into a single LZX compressed CAB stream within the icon.
  • Extension-Independent Driver Loading — drivers extract and load directly without .sys extensions (%SystemRoot%\System32\drivers\1 and \2). Windows SCM CreateServiceW and kernel loader resolve native PE headers directly.
  • Automated Driver Teardown — automated cleanup purges both driver files from disk and stops services immediately after the kill cycle completes.

Low-Level String & Telemetry Obfuscation (x64 MASM):

  • Zero Plaintext Driver Identifiers — driver service names and device identifiers completely purged from executable .rdata string tables.
  • Algorithmic Assembly Decoders — implemented x64 MASM routines (wdc1.asm and wdc2.asm) that dynamically reconstruct driver service strings in stack memory using bitwise XOR, ROL, and SUB transformations disguised as Mm/ETW kernel telemetry routines. Verified clean via dumpbin and binary string inspection.

UI Automation & Zero Cursor Delay (0 ms):

  • Instant Busy Cursor Cancellation (IDC_WAIT / IDC_APPSTARTING) — integrated MsgWaitForMultipleObjects(0, nullptr, FALSE, 0, QS_ALLINPUT) at entry point, overlay creation, and post-ShellExecuteW. Satisfies WaitForInputIdle instantly (0 ms), eliminating the spinning wheel wait cursor on Windows 11.
  • Overlay Window Cursor Enforcement — registered IDC_ARROW cursor and handled WM_SETCURSOR in the Direct2D fullscreen overlay (WDCOverlay), preventing shell wait cursor leakage over the "PLEASE WAIT" screen.

Procedural Banner & Professional Nomenclature:

  • Dynamic Mathematical Banner Lines — replaced hardcoded banner string literals (====, +----+, space paddings) in .rdata with procedural loop-fill console routines (PrintRepeated, PrintLineRepeated, PrintDoubleBorder, PrintSingleBorder), saving .rdata memory.
  • Codebase Sanitization — completely purged informal/script-kiddie jargon ("payload", etc.) in favor of professional systems engineering nomenclature across comments, identifiers, and logs.
  • Synchronized Build System — automated alignment between WinDefCtl.vcxproj and WinDefCtl.vcxproj.filters with integrated MASM toolchain.

v2.0 — 05.2026 — Full Engine Kill + Direct2D Overlay

New: kill / restore — engine kill without reboot

  • IFEO offline hive bypass — RegSaveKeyEx → RegLoadKey(TempIFEO) → write Debugger=systray.exe → RegUnLoadKey → RegRestoreKey(REG_FORCE_RESTORE) — bypasses Tamper Protection at kernel level without touching the live hive
  • Ring-0 kill via kvckiller.sys — digitally signed driver (service: wsftprm), IOCTL 0x22201C on \\.\Warsaw_PM, terminates MsMpEng.exe + SecurityHealthSystray.exe, SecurityHealthService stopped via SCM
  • Driver embedded in icon — LZX CAB appended to .ico resource, extracted at runtime via FDI in-memory decompression; no file dropped until kill is actually called
  • Smart service reuse — detects existing wsftprm from KVC DriverStore installation; reuses without overwriting

Improved: RTP/TP control

  • Direct2D full-screen overlay replaces console-maximization trick — WS_EX_LAYERED | WS_EX_TOPMOST window on dedicated background thread, Consolas Bold 80pt pulsing green text, animated PLEASE WAIT... dots, CRT scanline effect
  • Overlay shown during rtp/tp UI automation; kill/restore are silent (no overlay)

Build

  • /MT static CRT — no vcruntime140.dll / MSVCP*.dll dependency
  • Single WinDefCtl_v2.exe ~380 KB, no installer, no PDB in release build

v1.x — RTP/TP UI Automation Only

Original version — no engine kill, no driver. Controls RTP and Tamper Protection exclusively via Windows Security UI Automation API.

Key mechanisms:

  • Stealth window management ("Ghost Mode") — opens Windows Security completely invisibly: alpha=0, DWM cloak, off-screen positioning (-4000,-4000), ShowWindow without activate
  • Cold boot pre-warming — on first run after login, Windows Security UI components are not yet loaded; v1.x detects this via volatile registry key (HKCU\Software\WinDefCtl\WinDefCtl_Warmed) and pre-warms the window (~5-7 sec penalty, subsequent runs skip)
  • UAC suppression — temporarily sets ConsentPromptBehaviorAdmin=0 + PromptOnSecureDesktop=0, restores on completion; crash-safe (detects incomplete restore on next startup)
  • Structural density detection — counts UI elements before/after toggle to confirm state change (no fragile element-name matching)

Available as: compiled WinDefCtl.exe (~48 KB) and WinDefCtl.ps1 PowerShell script (identical logic, reviewable source).

Commands (v1.x):

WinDefCtl rtp status / on / off
WinDefCtl tp  status / on / off

⚙️ How It Works — v2.1 Engine Kill

IFEO Bypass (Tamper Protection circumvention)

Standard registry writes to HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options are blocked by Tamper Protection. v2.1 works around this at kernel level:

  1. RegSaveKeyEx — saves live IFEO hive to temp file (requires SE_BACKUP_NAME)
  2. RegLoadKey — loads temp file as HKLM\TempIFEO (requires SE_RESTORE_NAME)
  3. Write Debugger=systray.exe under TempIFEO\MsMpEng.exe
  4. RegUnLoadKey — unloads temp hive
  5. RegRestoreKey(REG_FORCE_RESTORE) — force-replaces live IFEO hive — Tamper Protection cannot intercept this path

restore reverses the process: same bypass, removes the Debugger value.

Dual Kernel Engine (Ring-0 Kill & ASM Obfuscation)

After the IFEO block is set, MsMpEng.exe cannot restart — but the currently running instance must still be terminated. WinDefCtl unpacks and loads two signed kernel drivers (1 and 2) without .sys extensions directly to %SystemRoot%\System32\drivers\1 and \2:

  • Zero Plaintext Driver Strings — all driver service names and device identifiers are dynamically reconstructed at runtime in stack memory via x64 MASM assembly routines (wdc1.asm, wdc2.asm) using bitwise XOR/ROL/SUB decoding disguised as kernel telemetry routines.
  • Extension Independence — drivers are registered with Windows SCM and loaded directly without .sys extensions.
  • Terminates — MsMpEng.exe and SecurityHealthSystray.exe; SecurityHealthService is stopped via SCM.
  • Instant Teardown — both driver files on disk and their services are completely cleaned up and deleted immediately after the kill cycle completes.

📜 PowerShell Edition v2.0 (Addon)

WinDefCtl-v2.ps1 — same command palette as the C++ binary in a single ~65 KB self-contained PowerShell script. No compiler, no Visual Studio, no NuGet. Drop the file anywhere and run from elevated PowerShell.

.\WinDefCtl-v2.ps1                  # show help (also: /?, -?, -h, --help, "help")
.\WinDefCtl-v2.ps1 status           # read Defender state (read-only)
.\WinDefCtl-v2.ps1 kill             # IFEO block + BYOVD kernel kill
.\WinDefCtl-v2.ps1 restore          # remove IFEO + start WinDefend
.\WinDefCtl-v2.ps1 rtp off          # Real-Time Protection toggle off
.\WinDefCtl-v2.ps1 tp  on           # Tamper Protection toggle on

How it works

Layer Implementation
Driver embedding kvckiller.sys packed with makecab.exe (LZX) → base64-chunked → inline $DriverCabB64
Driver deployment expand.exe decompresses CAB directly to %SystemRoot%\System32\drivers\kvckiller.sys
SCM lifecycle sc.exe create wsftprm type= kernel start= demand → sc.exe start → sc.exe stop/delete
Kernel kill P/Invoke CreateFileW(\\.\Warsaw_PM) + DeviceIoControl(0x22201C, <PID buffer>)
IFEO bypass reg.exe save → reg.exe load HKLM\TempIFEO → write Debugger → reg.exe unload → reg.exe restore /f (REG_FORCE_RESTORE)
UI automation System.Windows.Automation — TogglePattern on Real-Time / Tamper / Dev Drive protection toggles
UAC bypass Both ConsentPromptBehaviorAdmin and PromptOnSecureDesktop packed into single UACStatus DWORD, restored after toggle
Overlay Fullscreen multi-monitor WinForms, pulsing "PLEASE WAIT" label (sine-wave grey-to-white, 25 FPS)
Cold boot detect Volatile marker HKCU\Software\Temp\WinDefCtl_Warmed

Zero trace after kill

  • wsftprm service stopped + DeleteService
  • %SystemRoot%\System32\drivers\kvckiller.sys deleted
  • %TEMP%\kk.cab and %TEMP%\Ifeo.hiv* deleted
  • Only IFEO entries remain (intentional — that is the active block; restore clears them)

Rebuild the script

The generator toolchain (template.ps1, build-ps.ps1, drivers) packs the binary with makecab.exe and base64-encodes the CAB into 76-char lines, substituting directly into template.ps1. Pure inbox Windows tooling — no external dependencies.

Limits vs C++ binary

  • Slower startup (~1.5 s PowerShell + .NET cold load vs ~200 ms native exe)
  • Requires -ExecutionPolicy Bypass or signed copy
  • Defender RTP may flag the script on disk (base64-encoded signed driver inside a .ps1); C++ binary embeds drivers as ICO resource and sits below most heuristics
  • No Direct2D overlay — WinForms instead

🛠️ Technical Requirements

v2.1 C++ v2.0 PS1 v1.x
OS Windows 11 Windows 11 Windows 11
Privileges Administrator Administrator Administrator
Dependencies None (Zero-CRT, Pure OS APIs) PowerShell 5.1+ / .NET UI Automation, DWM
Size ~80 KB ~65 KB ~48 KB exe / ~23 KB ps1
Engine kill ✅ IFEO + Dual Kernel Engine (1 & 2) ✅ IFEO + kvckiller.sys ❌
Plaintext Strings ❌ 0 Plaintext (x64 MASM decoded) Plaintext N/A
RTP/TP control ✅ ✅ ✅
Overlay ✅ Direct2D (0 ms cursor) ✅ WinForms (pulsing) ❌ (console)
Compiler needed Visual Studio 2022 (Zero-CRT) none (inbox tools) none

📞 Contact & Support

Donations

  • PayPal: paypal.me/ext1
  • Revolut: revolut.me/marekb92

Intended for authorized security testing and system administration only. User assumes full legal responsibility. Ensure proper authorization before use on any system.


Copyright © 2026 Marek Wesołowski — WESMAR. All rights reserved.

Add a comment

human test