github.com
RTP/TP slider control + full engine kill via IFEO + kvckiller.sys
WinDefCtl.7z β archive contains four files (current + legacy preserved for posterity):
| File | Size | Description |
|---|---|---|
WinDefCtl_v2.exe |
~380 KB | v2.0 β engine kill + RTP/TP control (current, C++ binary) |
WinDefCtl-v2.ps1 |
~65 KB | v2.0 β single-file PowerShell edition, same command palette (addon) |
WinDefCtl.exe |
~48 KB | v1.x β RTP/TP automation only (legacy C++ binary) |
WinDefCtl.ps1 |
~23 KB | v1.x β PowerShell script version (legacy) |
generator.zip β sources for rebuilding the PowerShell edition (template.ps1, build-ps.ps1, kvckiller.sys). Run build-ps.ps1 β emits a fresh out\WinDefCtl-v2.ps1 with the driver re-embedded as base64 LZX CAB.
Run as Administrator.
Also available at github.com/wesmar/WinDefCtl β WinDefCtl.exe (v2.0 only) and password-protected WinDefCtl.7z (password: github.com, use if SmartScreen blocks the exe).
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
New: kill / restore β engine kill without reboot
RegSaveKeyEx β RegLoadKey(TempIFEO) β write Debugger=systray.exe β RegUnLoadKey β RegRestoreKey(REG_FORCE_RESTORE) β bypasses Tamper Protection at kernel level without touching the live hivekvckiller.sys β digitally signed driver (service: wsftprm), IOCTL 0x22201C on \\.\Warsaw_PM, terminates MsMpEng.exe + SecurityHealthSystray.exe, SecurityHealthService stopped via SCM.ico resource, extracted at runtime via FDI in-memory decompression; no file dropped until kill is actually calledwsftprm from KVC DriverStore installation; reuses without overwritingImproved: RTP/TP control
WS_EX_LAYERED | WS_EX_TOPMOST window on dedicated background thread, Consolas Bold 80pt pulsing green text, animated PLEASE WAIT... dots, CRT scanline effectrtp/tp UI automation; kill/restore are silent (no overlay)Build
/MT static CRT β no vcruntime140.dll / MSVCP*.dll dependencyWinDefCtl_v2.exe ~380 KB, no installer, no PDB in release buildOriginal version β no engine kill, no driver. Controls RTP and Tamper Protection exclusively via Windows Security UI Automation API.
Key mechanisms:
ShowWindow without activateHKCU\Software\WinDefCtl\WinDefCtl_Warmed) and pre-warms the window (~5-7 sec penalty, subsequent runs skip)ConsentPromptBehaviorAdmin=0 + PromptOnSecureDesktop=0, restores on completion; crash-safe (detects incomplete restore on next startup)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
Standard registry writes to HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options are blocked by Tamper Protection. v2.0 works around this at kernel level:
RegSaveKeyEx β saves live IFEO hive to temp file (requires SE_BACKUP_NAME)RegLoadKey β loads temp file as HKLM\TempIFEO (requires SE_RESTORE_NAME)Debugger=systray.exe under TempIFEO\MsMpEng.exeRegUnLoadKey β unloads temp hiveRegRestoreKey(REG_FORCE_RESTORE) β force-replaces live IFEO hive β Tamper Protection cannot intercept this pathrestore reverses the process: same bypass, removes the Debugger value.
After IFEO block is set, MsMpEng.exe cannot restart β but the currently running instance must still be terminated. WinDefCtl loads kvckiller.sys (the same signed driver used by KVC) via service wsftprm:
\\.\Warsaw_PM0x22201C β 1036-byte buffer, PID at offset 0MsMpEng.exe, SecurityHealthSystray.exeSecurityHealthServiceIf wsftprm already exists (KVC installed), WinDefCtl detects the valid DriverStore path and reuses the service β no overwrite, no conflict.
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
| 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 |
killwsftprm service stopped + DeleteService%SystemRoot%\System32\drivers\kvckiller.sys deleted%TEMP%\kk.cab and %TEMP%\Ifeo.hiv* deletedrestore clears them)Download generator.zip (top of page), extract, run build-ps.ps1. Generator runs makecab.exe, base64-encodes the CAB into 76-char lines, substitutes into template.ps1. Pure inbox Windows tooling β no external dependencies.
-ExecutionPolicy Bypass or signed copy.ps1); C++ binary embeds the same driver as ICO resource and sits below most heuristics| v2.0 C++ | v2.0 PS1 | v1.x | |
|---|---|---|---|
| OS | Windows 11 | Windows 11 | Windows 11 |
| Privileges | Administrator | Administrator | Administrator |
| Dependencies | None (static CRT) | PowerShell 5.1+ / .NET | UI Automation, DWM |
| Size | ~380 KB | ~65 KB | ~48 KB exe / ~23 KB ps1 |
| Engine kill | β IFEO + kvckiller.sys | β IFEO + kvckiller.sys | β |
| RTP/TP control | β | β | β |
| Overlay | β Direct2D | β WinForms (pulsing) | β (console) |
| Compiler needed | Visual Studio 2022 | none (inbox tools) | none |
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.