漏洞知识库
点击放大

<img width="956" height="538" alt="cropped-Aug 28, 2025, 03_39_19 PM" src=" />
BYOVD is a collection of PoCs demonstrating how drivers can be exploited to disable AV/EDR solutions.
The collection includes both undocumented drivers and those with existing co in LOLDDrivers or Microsoft's recommended dri rules.
---
> Since its initial discovery, the TfSysMon driver has been added to LOLDrivers and abused by ransomware groups using the EDRKillShifter tool, as reported by Sophos & ESET
---
This repository contains several PoCs de for educational purposes, helping researchers understand how these drivers can be abused to terminate processes.
The project is organized as a Rust Cargo workspace. Most PoCs share a common library (byo) that handles the boilerplate: dri lifecycle, IOCTL dispatch, process monitoring, pri adjustment, and cleanup. Each killer is a thin binary (~50-100 lines) that only defines its dri configuration. K7Terminator, Astra64-Killer, Ktapi-Killer, and Xhunter1-Killer are standalone — they ha own [workspace] declarations and are built directly from their own directories, not via the root workspace.
Each *-Killer/ directory contains its own Cargo.toml, src/main.rs (the Dri impl + CLI), README.md (dri + usage), and the matching .sys file the binary loads at runtime.
Prerequisites: Rust toolchain and Studio Build Tools with the Windows SDK.
Binaries are output to target/release/. Copy the corresponding .sys driver file into the same directory as the executable before running.
byo is the shared library that all PoCs (except K7Terminator) are built on. It exposes two complementary APIs -- a high-le one for the standard "install driver, kill on sight, clean up" flow, and a low-le one for killers that need a custom flow (attach to an already-loaded driver, fan out to multiple PIDs, structured IOCTL buffers, custom retry logic, etc.). Both can be mixed in the same binary.
Dri trait + run()This is what the bundled killers use. Implement the trait, call byo::run(), done.
run() does: preflight_check → install service (SER) → StartService → kill-on-sight monitor (Ctrl+C to exit) → stop + delete service.
Optional trait o with their defaults:
| Method | Default | Purpose |
|---|---|---|
| de() | SER | CreateFileW access flags |
| skip_unload() | false | Skip dri (e.g. drivers that BSOD on unload) |
| ignore_ioctl_error() | false | Treat IOCTL failure as success (e.g. NSecKrnl reports error on success) |
| ioctl_output_size() | 0 | Expected output buffer size in bytes |
| preflight_check() | Ok(()) | Pre-launch (e.g. LocalSystem check) |
When the trait flow doesn't fit -- e.g. the driver is already loaded and you only want to fire one IOCTL, you need a custom retry policy, the IOCTL takes a structured input rather than just a PID, or you want to fan out across all matching PIDs -- compose the lower-le directly.
Dri -- Byo:
IOCTL dispatch -- De exposes fi shapes:
| Method | Use when |
|---|---|
| ioctl<I, O>(code, &input, &mut output) | Both input and output buffers, separate types |
| ioctl_inout<T>(code, &mut data) | Same buffer for input + output |
| ioctl_in<I>(code, &input) | Input only, no output buffer |
| ioctl_in_unchecked<I>(code, &input) | Input only, ignore failure (per-call alternative to ignore_ioctl_error) |
| ioctl_raw(code, in_ptr, in_size, out_ptr, out_size) | Raw pointer escape hatch |
The typed forms remove the manual to_ne_bytes() / extend_from_slice() boilerplate when the IOCTL takes a struct (e.g. { pid: u32, padding: [u8; 20] }).
Process lookup -- find_pid_by_name(name) (first match) and find_all_pids_by_name(name) (all matches, excludes system PIDs ≤ 4).
Custom monitor loop -- run_monitor_loop(name, interval, |pid| ...) takes a closure so you can do whatever you want per match (multiple IOCTLs, structured logging, fan-out across PIDs, retry on error).
Pri -- enable_pri("SeDebugPri") / enable_pri("SeLoadDri") for drivers that require explicit token pri. ensure_running_as_local_system() returns an error if the process is not running as S-1-5-18.
Handle wrappers -- WinHandle (auto-CloseHandle) and ScHandle (auto-CloseSer) are Send + Sync and can be mo threads.
This is what UnknownKiller --attach does -- skip SCM entirely, just open the device and fire the IOCTL once:
FileHandle / Ser still resolve to WinHandle / ScHandle, and get_pid_by_name is kept as an alias for find_pid_by_name, so older code referencing those names keeps compiling.
ardrv.sys from OPSWAT AppRemover.astra64.sys from EnTech Taiwan (Astra32 / TVicHW) -- standalone data-only Shadow SSDT hijack EDR killer.BdApiUtil64.sys from Baidu AntiVirus (C).CcProtect.sys from CnCrypt.EnPortv.sys from Guidance EnCase.GameDri.sys from Fedeen Games (C).GoFlyDrv.sys from Golink.HNOs2Ec.sys from HONOR (PCManager).HWAudioOs2Ec.sys from Huawei.K7RKScan.sys from K7 Computing (C, C) -- Full write-up.ksapi64.sys / ksapi64_del.sys from Kingsoft Corporation.ktapi.sys from Kontron -- standalone two-stage shellcode EDR killer.MonProcess.sys from HONOR (HnRSMService).MonProcessEX.sys from HONOR.NSecKrnl.sys from NSEC ( BYO).PCTcore64.sys from PC Tools (C).PoisonX.sys from Microsoft ( reproduction)STProcessMonitor.sys from Safetica (C, supports v11.11.4 and v11.26.18).sysmon.sys from ThreatFire System Monitor.unknown.sys from an unattributed (dri TBD)..sys from Tg Soft.wsftprm.sys from Topaz Antifraud (C).xhunter1.sys from Wellbia (XIGNCODE3, C).xkpsm.sys from JiranJikyosoft X-Keeper.This section demonstrates the complete A-Z reverse engineering methodology using the TfSysMon driver as a practical example. This process applies to any x64 Windows kernel dri.
Check dri before starting reverse engineering.
A basic process killer dri 2 things:
a way to get a handle on a process (for instance ZwOpenProcess or NtOpenProcess)
a way to terminate the process (for instance ZwTerminateProcess or NtTerminateProcess)
Check if a dri both function types. If a driver has in its imported functions Nt/ZwOpenProcess AND Nt/ZwTerminateProcess then it's a potential process killer dri.
Only after confirming these imports should you proceed to detailed reverse engineering in IDA Pro.
Required Tools:
Every Windows dri with Dri - find this function first:
In TfSysMon, the Dri looks like this:
Analysis Notes:
sub_17484sub_17484(Dri) - this is where actual dri occursNa to the initialization function (sub_17484):
Key Reverse Engineering Findings:
\\Device\\TfSysMon (kernel space)\\DosDevices\\TfSysMon (user-mode accessible as \\.\\TfSysMon)0x22 = FILE_DEsub_17694Na to the dispatch function (sub_17694):
Reverse Engineering Analysis:
if ( a1 != De ))CurrentStackLocation->MajorFunction determines the operation typesub_177D8Na to the IOCTL processing function (sub_177D8):
Critical Reverse Engineering Disco:
v7 = *(_DWORD *)(a2 + 24) gets the IOCTL code from IO_STACK_LOCATIONIrp->AssociatedIrp.MasterIrp contains user datav9 = *(unsigned int *)(a2 + 16) gets input buffer size0xB4A00404 leads to sub_1837CNa to the process termination function (sub_1837C):
Function Analysis:
v3 = *(void **)(a1 + 4) extracts PID from input buffer at offset +4ZwOpenProcess with minimal access rights (1u = PROCESS_TERMINATE)ZwTerminateProcess Complete Reverse Engineering Flow:
1. Entry Point: User calls De on \\.\\TfSysMon
2. IRP Creation: I/O Manager creates IRP with MajorFunction = 14
3. Dispatch: sub_17694 routes to sub_177D8 for IOCTL processing
4. IOCTL Check: sub_177D8 IOCTL code 0xB4A00404 and buffer size ≥ 24 bytes
5. Execution: Calls sub_1837C with user input buffer
6. Termination: sub_1837C extracts PID from offset +4 and terminates process via ZwTerminateProcess
Input Buffer Structure (from dri engineering):
> This methodology demonstrates how to systematically reverse engineer any Windows x64 kernel driver to identify similar by following the execution path from user-mode communication through to dangerous kernel operations.
If BYO your red team operations, consider buying me a beer:
<a href=" src=" width="200" height="60"></a>
开发语言:Rust
Star 数:963
该项目属于漏洞知识库方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕BYOVD research use cases featuring vulnerable driver discovery and reverse engineering methodology. (CVE-2025-52915, CVE-2025-1055, CVE-2026-3609, CVE-2026-8501).展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。
从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。
1. 下载源码压缩包,解压到本地环境。
2. 根据项目类型准备对应的运行环境与依赖。
3. 按照 README 中的步骤完成配置与部署。
4. 在隔离的测试环境中运行验证,避免影响生产系统。
本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。
| 资源标题 | BYOVD - BYOVD research use cases featuring vulnerable driv |
| 所属分类 | 漏洞知识库 |
| 发布作者 | admin |
| 发布时间 | 2026-10-06 01:04:08 |
| 下载权限 | 免费下载 |
| 附件数量 | 2 个下载链接 |
| 浏览次数 | 261 |
| 讨论数量 | 0 |
| 主题状态 | 正常讨论中 |