Pakkit.net
← Back to projects

Security / Reverse Engineering

Lab Featured

Windows Kernel Driver Static Analysis

A disclosure-safe case study in static reverse engineering of a Windows x86-64 kernel driver using PE analysis, Python, Capstone, and hardened sample handling.

  • Reverse Engineering
  • Binary Analysis
  • Windows Kernel
  • PE / PE32+
  • x86-64
  • Python
  • Capstone
  • pefile
  • Docker
  • Security Research

What this proves

Proves I can take an opaque native binary apart systematically, build evidence from multiple static-analysis techniques, automate repeatable inspection, and keep conclusions inside the boundary of what the evidence actually supports.

Overview

Some security research is useful to show without publishing the identity of the target or the objective that motivated the investigation.

This is one of those projects.

I performed static analysis of a Windows x86-64 kernel-driver executable and used a repeatable investigation workflow around the parts of the binary that could be examined without executing it. The work covered PE metadata, section layout and entropy, imports and exports, strings, embedded PE-image identification, limited entry-point disassembly, and bounded static-reference inspection.

The vendor, product, game, binary version, research objective, target-specific findings, offsets, signatures, strings, interface mappings, and mitigation or bypass implications are intentionally not published here.

That leaves the part I actually want this case study to demonstrate: how I approach a large, opaque native binary when I need to understand it systematically and preserve a defensible evidence trail.

The analysis workflow

The investigation was split into focused passes rather than treating one tool’s output as the answer.

PE structure and metadata

The first pass established what the executable actually was and how it was laid out:

  • PE32+ / x86-64 metadata and native-driver characteristics.
  • Section names, virtual and raw sizes, flags, and placement.
  • Entry-point location and the section containing it.
  • Import and export directory contents.
  • Debug and resource metadata where present.

That gave later analysis a map to work from instead of treating the binary as an undifferentiated block of bytes.

Section and entropy analysis

Section boundaries and entropy were inspected to identify areas that deserved closer review. Entropy is not proof of compression, encryption, or obfuscation, but it is a useful signal when combined with section size, permissions, content, and the rest of the PE structure.

The important part of the workflow was keeping those distinctions explicit: signals suggested where to look; they did not become conclusions by themselves.

Imports, exports, and strings

Separate passes collected:

  • imported modules and functions,
  • exported symbols,
  • ASCII strings,
  • UTF-16 strings, and
  • references that could be related back to regions of the image.

This helped build a static picture of what the binary could interact with while avoiding claims about runtime behavior that had not actually been observed.

Embedded PE-image identification

The analysis also looked for PE-like structures embedded inside the larger image. The public claim stops at identification: I am not claiming that every embedded region was fully extracted, reconstructed, or dynamically validated.

Entry-point disassembly

Capstone was used for a deliberately limited disassembly pass around the entry point and other bounded areas of interest. This was not a claim of complete decompilation. It was a way to answer narrower questions about control flow and instruction sequences where the static evidence was strong enough to inspect.

Static-reference inspection

Additional tooling inspected static references between selected regions and artifacts. Again, the scope was intentionally bounded: static references can support a hypothesis about relationships in a binary, but they do not prove the same behavior will occur at runtime.

Tooling and reproducibility

The retained research workspace contains seven focused Python analysis scripts covering PE inspection, exports, strings, disassembly, static references, and other bounded binary-analysis passes. The workflow used Python with pefile and Capstone rather than depending on a single interactive reverse-engineering session.

A chronological lab journal records the investigation as it progressed, including tooling changes, hypotheses, mistakes, and corrections. That matters to me because reverse engineering gets less useful when the final write-up hides how a conclusion was reached.

The goal was a workflow where another pass over the sample could reproduce the same categories of evidence instead of relying on screenshots or memory.

Sample handling

The sample was handled inside a hardened Docker environment rather than executed on the host.

The documented controls included:

  • dropping Linux capabilities,
  • no-new-privileges, and
  • a read-only mount for the sample.

Those are the controls I can substantiate from the research record, so those are the controls I am claiming here. I am deliberately not claiming network isolation or non-root execution because the retained evidence does not establish either one.

What I am not claiming

This project was a static-analysis investigation. The public case study does not claim:

  • dynamic execution or runtime validation,
  • complete decompilation,
  • complete reconstruction of the driver’s architecture,
  • confirmation of runtime interfaces,
  • exhaustive extraction of embedded PE images, or
  • validation of target-specific behavior on a Windows host.

Those boundaries are part of the work, not caveats to hide. A useful reverse engineer needs to know the difference between observed, inferred, and unverified.

What this project demonstrates

The project is valuable to my portfolio because it combines several kinds of engineering judgment in one investigation:

  • understanding Windows PE / PE32+ binary structure,
  • working with x86-64 native code at the static-analysis level,
  • using Python to make repetitive binary inspection reproducible,
  • applying Capstone for targeted disassembly,
  • correlating metadata, entropy, imports, exports, strings, and references,
  • documenting hypotheses separately from confirmed observations,
  • handling an untrusted privileged-code sample with explicit containment controls, and
  • knowing when the evidence is not strong enough to make a larger claim.

I enjoy this kind of work because it starts with a system that is mostly opaque and turns it into a sequence of smaller questions that can actually be tested. The result is not just a pile of reverse-engineering notes; it is a method for reducing uncertainty without pretending static evidence can answer questions it cannot.

Disclosure boundary

The underlying research remains private. This page intentionally publishes the methodology and engineering skills without publishing the target, the original research objective, target-specific findings, or details that would turn a portfolio case study into an operational guide.

For other disclosure-safe security work, see Security Research. For the broader engineering portfolio, see Work & Capabilities.

Where to next

Keep exploring

A few good next steps from here — a related build, some background reading, or a way to take it further together.