whatisgithub

What is detecttpmspoofing?

weak1337/detecttpmspoofing — explained in plain English

Analysis updated 2026-05-18

28CAudience · researcherComplexity · 5/5Setup · hard

In one sentence

A Windows kernel driver that detects when another program is spoofing TPM hardware identity by comparing normal and cached TPM responses.

Mindmap

mindmap
  root((tpm detect))
    What it does
      Checks TPM spoofing
      Compares two read paths
      Hashes and compares
    Tech stack
      C
      Windows kernel driver
      CMake WDK
    Use cases
      Anti-cheat detection
      Attestation integrity
      Security research
    Audience
      Developers
      Security researchers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Check whether a hook is intercepting and forging TPM2_ReadPublic responses on a Windows machine.

USE CASE 2

Compare a normal IOCTL based TPM read against the cached response inside TPM.sys to spot mismatches.

USE CASE 3

Study the driver source as a reference for how TPM identity spoofing hooks can be detected.

What is it built with?

CWindows Driver KitCMakeNinja

How does it compare?

weak1337/detecttpmspoofingbusung-dev/cve-2026-43499-s25ulemire/fastconstmap
Stars282828
LanguageCCC
Setup difficultyhardhardeasy
Complexity5/55/53/5
Audienceresearcherdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires the Windows Driver Kit and driver signing before the kernel driver can be loaded.

So what is it?

DetectTpmSpoofing is a small Windows kernel driver written in C that checks whether a computer's TPM 2.0 chip, the hardware security module used to prove a machine's identity, is being tampered with by another piece of software. A TPM normally answers a request called ReadPublic with a fixed public key that uniquely identifies the hardware. Some cheat tools or spoofing utilities install a hidden hook on the TPM driver so that this request returns a fake key instead of the real one, which lets them trick anti-cheat systems or attestation checks into believing they are running on different hardware than they actually are. The driver detects this by asking for the same information in two different ways and comparing the results. The first way sends a normal TPM2_ReadPublic command through the standard input and output control path that any regular program would use, which is exactly the path a spoofing hook would intercept and forge. The second way skips that path entirely: it walks internal structures inside the real TPM.sys driver to find the response the TPM driver already cached earlier for the same key, reading it directly rather than asking through the normal request path that a hook could intercept. Both responses are parsed and reduced to a short hash value. If the two hashes differ, it means the value returned through the normal path does not match the value the system actually cached, which points to tampering. The README is direct about the fact that this relies on reverse engineered internal offsets inside the real TPM.sys driver, and that these offsets may need to be updated if they stop working on a different version of Windows. The project includes the driver source, header files describing TPM 1.2 and TPM 2.0 data structures, and build instructions using the Windows Driver Kit and CMake. Because it is a kernel driver, it needs to be digitally signed with the included signing script before it can be loaded, following the usual test signing and secure boot rules Windows applies to kernel drivers.

Copy-paste prompts

Prompt 1
Explain how HashTpmIoctl and HashTpmCached differ in this driver and why the difference matters.
Prompt 2
Walk me through building this kernel driver with CMake and the Windows Driver Kit.
Prompt 3
Summarize the risk this project warns about if TPM.sys internal offsets change between Windows builds.
Prompt 4
Explain what signing script this project uses before the driver can be loaded.

Frequently asked questions

What is detecttpmspoofing?

A Windows kernel driver that detects when another program is spoofing TPM hardware identity by comparing normal and cached TPM responses.

What language is detecttpmspoofing written in?

Mainly C. The stack also includes C, Windows Driver Kit, CMake.

How hard is detecttpmspoofing to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is detecttpmspoofing for?

Mainly researcher.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.