Agent Skillsbuzzer-re/Rikugan › Driver Analysis

Driver Analysis

GitHub

用于Windows内核驱动二进制分析,定位DriverEntry、提取分发表及IOCTL处理函数,识别关键数据结构,并检测内存越界、权限提升等常见安全漏洞。

rikugan/skills/builtins/driver-analysis/SKILL.md buzzer-re/Rikugan

Trigger Scenarios

Windows内核驱动逆向分析 驱动程序安全审计 IOCTL漏洞挖掘

Install

npx skills add buzzer-re/Rikugan --skill Driver Analysis -g -y
More Options

Non-standard path

npx skills add https://github.com/buzzer-re/Rikugan/tree/main/rikugan/skills/builtins/driver-analysis -g -y

Use without installing

npx skills use buzzer-re/Rikugan@Driver Analysis

指定 Agent (Claude Code)

npx skills add buzzer-re/Rikugan --skill Driver Analysis -a claude-code -g -y

安装 repo 全部 skill

npx skills add buzzer-re/Rikugan --all -g -y

预览 repo 内 skill

npx skills add buzzer-re/Rikugan --list

SKILL.md

Frontmatter
{
    "name": "Driver Analysis",
    "tags": [
        "driver",
        "kernel",
        "windows",
        "ioctl",
        "vulnerability"
    ],
    "description": "Windows kernel driver analysis — DriverEntry, dispatch table, IOCTL handlers, vulnerability audit"
}

Task: Windows Kernel Driver Analysis. You are analyzing a kernel-mode driver binary.

Mandatory First Steps

  1. Find DriverEntry — usually the binary entry point
    • Signature: NTSTATUS DriverEntry(DRIVER_OBJECT*, UNICODE_STRING*)
    • Use decompile_function on the entry point
  2. From DriverEntry, extract:
    • MajorFunction dispatch table assignments
    • DriverUnload pointer
    • DeviceName and SymbolicLinkName
  3. Identify IOCTL handlers — look for IRP_MJ_DEVICE_CONTROL dispatch entry

Key Data Structures

Use create_struct and set_type early — these appear in virtually every driver:

  • DRIVER_OBJECT, DEVICE_OBJECT
  • IRP, IO_STACK_LOCATION
  • UNICODE_STRING

Apply types with set_function_prototype and apply_type_to_variable to make decompiled code readable immediately.

IOCTL Analysis

For each IRP_MJ_DEVICE_CONTROL handler:

  1. decompile_function on the dispatch function
  2. Find the switch statement on IoControlCode
  3. For each IOCTL code, document:
    • IOCTL value and decoded method/access
    • Expected input/output buffer sizes
    • Operation performed
  4. Check for dangerous patterns:
    • Kernel memory read/write gadgets
    • Process token manipulation
    • Arbitrary code execution paths

Common Vulnerabilities to Flag

  • KeSetEvent with user-controlled address — kernel write primitive
  • Missing ProbeForRead/ProbeForWrite before kernel-mode buffer copy
  • Unchecked buffer sizes in METHOD_NEITHER IOCTLs — pool overflow
  • MmMapIoSpace with user-supplied physical address — arbitrary physical memory access
  • Direct stack buffer reads without size validation — kernel stack overflow
  • ObReferenceObjectByHandle without proper access checks

Analysis Workflow

  1. Map the dispatch table → understand all supported IRPs
  2. Deep-dive each IOCTL handler → document input/output
  3. Trace data flow from usermode input to kernel operations
  4. Flag every path where user-controlled data reaches a sensitive kernel API
  5. Rename functions as you understand them: DispatchDeviceControl, HandleIoctlReadPhysMem, etc.

Version History

  • ee3951d Current 2026-07-25 11:00

Same Skill Collection

rikugan/skills/builtins/binja-scripting/SKILL.md
rikugan/skills/builtins/ctf/SKILL.md
rikugan/skills/builtins/deobfuscation/SKILL.md
rikugan/skills/builtins/generic-re/SKILL.md
rikugan/skills/builtins/ida-scripting/SKILL.md
rikugan/skills/builtins/linux-malware/SKILL.md
rikugan/skills/builtins/malware-analysis/SKILL.md
rikugan/skills/builtins/modify/SKILL.md
rikugan/skills/builtins/smart-patch-binja/SKILL.md
rikugan/skills/builtins/smart-patch-ida/SKILL.md
rikugan/skills/builtins/vuln-audit/SKILL.md

Metadata

Files
0
Version
ee3951d
Hash
26222ca4
Indexed
2026-07-25 11:00

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-22 00:18
浙ICP备14020137号-1 $mapa de visitantes$