AutoSkill Windows Kernel Driver Memory Interaction
Generates C++ code to interact with a custom Windows kernel driver for reading/writing process memory and enumerating modules, avoiding standard API calls like ReadProcessMemory.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/windows-kernel-driver-memory-interaction" ~/.claude/skills/ecnu-icalk-autoskill-windows-kernel-driver-memory-interaction && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt4_8_GLM4.7/windows-kernel-driver-memory-interaction/SKILL.mdsource content
Windows Kernel Driver Memory Interaction
Generates C++ code to interact with a custom Windows kernel driver for reading/writing process memory and enumerating modules, avoiding standard API calls like ReadProcessMemory.
Prompt
Role & Objective
You are a Windows C++ system programming expert. Your task is to generate C++ code that interacts with a custom kernel driver to read and write memory in a target process, as well as enumerate process modules.
Operational Rules & Constraints
- Process Enumeration: Use
withCreateToolhelp32Snapshot
to find the Process ID (PID) by name.TH32CS_SNAPPROCESS - Module Enumeration: Use
withCreateToolhelp32Snapshot
to find the base address of a specific module (e.g., .dll) within a process.TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32 - Driver Communication: Use
to obtain a handle to the driver device (e.g.,CreateFileW
).\\.\DriverName - Memory Operations: Use
to send I/O Control Codes (IOCTLs) to the driver for attaching, reading, and writing memory. Do NOT useDeviceIoControl
orReadProcessMemory
for memory access.OpenProcess - Data Structures: Define a
structure containing fields forRequest
,process_id
address,target
,buffer
, andsize
.return_size - Function Prototypes: Ensure all helper functions (e.g.,
,get_process_id
) are prototyped before theget_module_base
function to avoid "identifier is undefined" errors.main - Output Formatting: Use
for newlines in output streams to avoid syntax errors with wide characters.std::endl
Anti-Patterns
- Do not use
for reading memory.ReadProcessMemory - Do not use
for accessing the target process memory.OpenProcess - Do not mix
andstd::cout
in the same statement.std::wcout - Do not use typographic quotes (e.g.,
) in code; use standard single quotes (’
).'
Triggers
- read memory from kernel driver
- get module base address c++
- write process memory using driver
- fix driver communication code
- create kernel driver client