Bundled with Unleash skills pack. Upstream: local:C:\Users\Admin.claude\skills
BYOVD attack workflow
Activation
Use when the task involves BYOVD attacks, vulnerable driver analysis, IOCTL
reverse engineering for kernel R/W primitives, or leveraging signed vulnerable
drivers.
Workflow
1. Driver selection
Identify a suitable vulnerable driver:
- Must have a valid Authenticode signature (or bypass DSE).
- Must expose an IOCTL that provides arbitrary memory R/W, MSR access, or
physical memory access.
- Prefer drivers already present on target systems (OEM bloatware,
anti-cheat, hardware utilities).
Common families:
| Driver |
Vendor |
Primitive |
rtcore64.sys |
MSI |
Arbitrary physical memory R/W via MSR |
dbutil_2_3.sys |
Dell |
Arbitrary physical memory R/W |
gdrv.sys |
GIGABYTE |
Physical memory R/W, MSR R/W |
AsIO64.sys |
ASUS |
Physical memory R/W, I/O port access |
WinRing0x64.sys |
OpenLibSys |
MSR R/W, physical memory R/W, I/O ports |
ene.sys |
ENE |
Physical memory R/W |
lha.sys |
LG |
Physical memory R/W |
amp.sys |
Acer |
Physical memory R/W |
phymemx64.sys |
Various |
Physical memory R/W |
capcom.sys |
Capcom |
Arbitrary kernel R/W via HLT |
2. IOCTL analysis
Reverse engineer the driver's dispatch routine:
- Locate
DriverEntry → DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL].
- Identify
IOCTL codes from the dispatch switch.
- Map each IOCTL to its handler and document:
- Input buffer layout (
METHOD_BUFFERED, METHOD_IN_DIRECT,
METHOD_OUT_DIRECT, METHOD_NEITHER).
- Output buffer layout.
- Validation (or lack thereof) on user-supplied addresses/sizes.
- The actual kernel operation (MmMapIoSpace, __readmsr, __writemsr,
direct pointer deref).
3. Primitive construction
Physical memory R/W → virtual memory R/W:
- Read
CR3 from target process (via EPROCESS->DirectoryTableBase).
- Walk page tables manually: PML4 → PDPT → PD → PT.
- Translate target virtual address to physical address.
- Use driver's physical R/W IOCTL to read/write the physical page.
MSR R/W:
- Read
MSR LSTAR (0xC0000082) → KiSystemCall64 base for KASLR defeat.
- Read
MSR IA32_EFER (0xC0000080) → check NXE bit.
- Write
MSR LSTAR → redirect syscall handler (PatchGuard detects this).
Direct kernel R/W (e.g., Capcom):
- Driver executes arbitrary code in ring 0 via
HLT instruction handler
or direct call.
- Map shellcode, call via IOCTL.
4. Post-exploitation via BYOVD
Once kernel R/W is established:
- KASLR defeat: Read
ntoskrnl base from MSR LSTAR or
PsLoadedModuleList.
- Token steal: Locate
EPROCESS via PsInitialSystemProcess or
ActiveProcessLinks walk, copy SYSTEM token.
- Disable callbacks: Clear
PspCreateProcessNotifyRoutine,
PspCreateThreadNotifyRoutine, PspLoadImageNotifyRoutine,
CmpCallBackVector, ObTypeInitializerTable.
- Disable ETW: Patch
EtwEventWrite or clear EtwpDebuggerData.
- Disable PatchGuard: Patch
KiTimerDispatch / KiDpcDispatch or
corrupt PG context (version-specific).
- DSE bypass: Patch
ci.dll!g_CiOptions or
ntoskrnl!SeValidateImageHeader.
5. Cleanup
- Unload the vulnerable driver (
sc stop + sc delete or
ZwUnloadDriver).
- Remove any traces from
Prefetch, Amcache, SetupAPI logs.
- Clear
System event log entries for driver load (Event ID 7045).
Tooling
| Task |
Tool |
| IOCTL discovery |
IDA Pro, Ghidra, IRPMon, API Monitor |
| Driver signature check |
signtool verify /pa, sigcheck |
| Physical memory access |
Custom tool via driver IOCTL |
| KASLR defeat |
MSR LSTAR read, NtQuerySystemInformation |
| Driver blocklist check |
Microsoft vulnerable driver blocklist |
Verification checklist
1---2name: byovd-23description: BYOVD (Bring Your Own Vulnerable Driver) attack workflow. Covers vulnerable driver identification, IOCTL analysis, arbitrary physical/virtual memory access, MSR read/write, and leveraging vulnerable signed drivers for kernel code execution. Invoke with /byovd or when the task involves BYOVD techniques.4license: MIT5---67> Bundled with Unleash skills pack. Upstream: local:C:\Users\Admin\.claude\skills89# BYOVD attack workflow1011## Activation1213Use when the task involves BYOVD attacks, vulnerable driver analysis, IOCTL14reverse engineering for kernel R/W primitives, or leveraging signed vulnerable15drivers.1617## Workflow1819### 1. Driver selection2021Identify a suitable vulnerable driver:2223- Must have a valid Authenticode signature (or bypass DSE).24- Must expose an IOCTL that provides arbitrary memory R/W, MSR access, or25 physical memory access.26- Prefer drivers already present on target systems (OEM bloatware,27 anti-cheat, hardware utilities).2829Common families:3031| Driver | Vendor | Primitive |32|---|---|---|33| `rtcore64.sys` | MSI | Arbitrary physical memory R/W via MSR |34| `dbutil_2_3.sys` | Dell | Arbitrary physical memory R/W |35| `gdrv.sys` | GIGABYTE | Physical memory R/W, MSR R/W |36| `AsIO64.sys` | ASUS | Physical memory R/W, I/O port access |37| `WinRing0x64.sys` | OpenLibSys | MSR R/W, physical memory R/W, I/O ports |38| `ene.sys` | ENE | Physical memory R/W |39| `lha.sys` | LG | Physical memory R/W |40| `amp.sys` | Acer | Physical memory R/W |41| `phymemx64.sys` | Various | Physical memory R/W |42| `capcom.sys` | Capcom | Arbitrary kernel R/W via HLT |4344### 2. IOCTL analysis4546Reverse engineer the driver's dispatch routine:47481. Locate `DriverEntry` → `DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL]`.492. Identify `IOCTL` codes from the dispatch switch.503. Map each IOCTL to its handler and document:51 - Input buffer layout (`METHOD_BUFFERED`, `METHOD_IN_DIRECT`,52 `METHOD_OUT_DIRECT`, `METHOD_NEITHER`).53 - Output buffer layout.54 - Validation (or lack thereof) on user-supplied addresses/sizes.55 - The actual kernel operation (MmMapIoSpace, __readmsr, __writemsr,56 direct pointer deref).5758### 3. Primitive construction5960**Physical memory R/W → virtual memory R/W:**61621. Read `CR3` from target process (via `EPROCESS->DirectoryTableBase`).632. Walk page tables manually: PML4 → PDPT → PD → PT.643. Translate target virtual address to physical address.654. Use driver's physical R/W IOCTL to read/write the physical page.6667**MSR R/W:**6869- Read `MSR LSTAR` (0xC0000082) → `KiSystemCall64` base for KASLR defeat.70- Read `MSR IA32_EFER` (0xC0000080) → check NXE bit.71- Write `MSR LSTAR` → redirect syscall handler (PatchGuard detects this).7273**Direct kernel R/W (e.g., Capcom):**7475- Driver executes arbitrary code in ring 0 via `HLT` instruction handler76 or direct call.77- Map shellcode, call via IOCTL.7879### 4. Post-exploitation via BYOVD8081Once kernel R/W is established:82831. **KASLR defeat:** Read `ntoskrnl` base from `MSR LSTAR` or84 `PsLoadedModuleList`.852. **Token steal:** Locate `EPROCESS` via `PsInitialSystemProcess` or86 `ActiveProcessLinks` walk, copy SYSTEM token.873. **Disable callbacks:** Clear `PspCreateProcessNotifyRoutine`,88 `PspCreateThreadNotifyRoutine`, `PspLoadImageNotifyRoutine`,89 `CmpCallBackVector`, `ObTypeInitializerTable`.904. **Disable ETW:** Patch `EtwEventWrite` or clear `EtwpDebuggerData`.915. **Disable PatchGuard:** Patch `KiTimerDispatch` / `KiDpcDispatch` or92 corrupt `PG` context (version-specific).936. **DSE bypass:** Patch `ci.dll!g_CiOptions` or94 `ntoskrnl!SeValidateImageHeader`.9596### 5. Cleanup9798- Unload the vulnerable driver (`sc stop` + `sc delete` or99 `ZwUnloadDriver`).100- Remove any traces from `Prefetch`, `Amcache`, `SetupAPI` logs.101- Clear `System` event log entries for driver load (Event ID 7045).102103## Tooling104105| Task | Tool |106|---|---|107| IOCTL discovery | IDA Pro, Ghidra, IRPMon, API Monitor |108| Driver signature check | `signtool verify /pa`, `sigcheck` |109| Physical memory access | Custom tool via driver IOCTL |110| KASLR defeat | `MSR LSTAR` read, `NtQuerySystemInformation` |111| Driver blocklist check | Microsoft vulnerable driver blocklist |112113## Verification checklist114115- [ ] Driver signature is valid and not on Microsoft blocklist116- [ ] IOCTL codes and buffer layouts fully documented117- [ ] Physical → virtual translation verified against `!vtop` in WinDbg118- [ ] KASLR defeat produces correct `ntoskrnl` base119- [ ] Token steal results in `whoami` → `NT AUTHORITY\SYSTEM`120- [ ] Driver unloaded and traces cleaned post-operation