# spooferfun/ioctl-driver architecture

> Architecture diagram of the GitHub repository spooferfun/ioctl-driver, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/spooferfun/ioctl-driver
- Repository: https://github.com/spooferfun/ioctl-driver

## Overview

Ioctl-Driver is a Windows kernel driver exposing buffered IOCTLs for process memory access, image-base lookup, and guarded-region discovery. A caller sends a request to the driver’s device interface; dispatch validates and routes it to the relevant operation, which uses process metadata and physical-memory/page-table helpers where needed. The README provides no additional product capabilities. The map is based on the drv.cpp excerpts; the duplicated NT declaration headers are not shown participating in this runtime flow.

Main entry points: [`drv.cpp`](https://github.com/spooferfun/ioctl-driver/blob/main/drv.cpp) (IOCTL Dispatch)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Driver Interface"]
  node_device["Device Interface<br/>[drv.cpp]"]
  node_dispatch["IOCTL Dispatch<br/>[drv.cpp]"]
end

subgraph group_memory["Memory Operations"]
  node_process_access["Process Access<br/>[drv.cpp]"]
  node_page_translation["Page Translation<br/>[drv.cpp]"]
  node_physical_io["Physical Memory I/O<br/>[drv.cpp]"]
end

subgraph group_discovery["Kernel Discovery"]
  node_image_base["Image Base Lookup<br/>[drv.cpp]"]
  node_guarded_region["Guarded Region Lookup<br/>[drv.cpp]"]
end

node_caller(("IOCTL Caller"))

node_caller -->|"sends IOCTL"| node_device
node_device -->|"dispatches requests"| node_dispatch
node_dispatch -->|"routes memory request"| node_process_access
node_dispatch -->|"routes base request"| node_image_base
node_dispatch -->|"routes region request"| node_guarded_region
node_process_access -->|"translates addresses"| node_page_translation
node_process_access -->|"reads or writes"| node_physical_io

click node_device "https://github.com/spooferfun/ioctl-driver/blob/main/drv.cpp"
click node_dispatch "https://github.com/spooferfun/ioctl-driver/blob/main/drv.cpp"
click node_process_access "https://github.com/spooferfun/ioctl-driver/blob/main/drv.cpp"
click node_page_translation "https://github.com/spooferfun/ioctl-driver/blob/main/drv.cpp"
click node_physical_io "https://github.com/spooferfun/ioctl-driver/blob/main/drv.cpp"
click node_image_base "https://github.com/spooferfun/ioctl-driver/blob/main/drv.cpp"
click node_guarded_region "https://github.com/spooferfun/ioctl-driver/blob/main/drv.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_device,node_dispatch toneBlue
class node_process_access,node_page_translation,node_physical_io toneAmber
class node_image_base,node_guarded_region toneMint
class node_caller toneIndigo
```

## Components

### Driver Interface

- [Device Interface](https://github.com/spooferfun/ioctl-driver/blob/main/drv.cpp): `drv.cpp`
- [IOCTL Dispatch](https://github.com/spooferfun/ioctl-driver/blob/main/drv.cpp): `drv.cpp`

### Memory Operations

- [Process Access](https://github.com/spooferfun/ioctl-driver/blob/main/drv.cpp): `drv.cpp`
- [Page Translation](https://github.com/spooferfun/ioctl-driver/blob/main/drv.cpp): `drv.cpp`
- [Physical Memory I/O](https://github.com/spooferfun/ioctl-driver/blob/main/drv.cpp): `drv.cpp`

### Kernel Discovery

- [Image Base Lookup](https://github.com/spooferfun/ioctl-driver/blob/main/drv.cpp): `drv.cpp`
- [Guarded Region Lookup](https://github.com/spooferfun/ioctl-driver/blob/main/drv.cpp): `drv.cpp`

### Other components

- **IOCTL Caller**

## Connections

- IOCTL Caller → Device Interface: sends IOCTL (evidence: `drv.cpp`)
- Device Interface → IOCTL Dispatch: dispatches requests (evidence: `drv.cpp`)
- IOCTL Dispatch → Process Access: routes memory request (evidence: `drv.cpp`)
- IOCTL Dispatch → Image Base Lookup: routes base request (evidence: `drv.cpp`)
- IOCTL Dispatch → Guarded Region Lookup: routes region request (evidence: `drv.cpp`)
- Process Access → Page Translation: translates addresses (evidence: `drv.cpp`)
- Process Access → Physical Memory I/O: reads or writes (evidence: `drv.cpp`)
