nSIEM dev diary · Driver load ·

Kernel DriverLoad Detection.

What the attack is

A driver runs inside the Windows kernel — the deepest level of the machine, below every program and below the security tools that watch them. An intruder who gets a driver of their own loaded can switch those tools off, hide what they are doing, and stay hidden.

That is why Windows insists that drivers carry a trusted signature, and why any driver that appears on a machine is worth knowing about: where it came from, who installed it, and whether Windows let it run.

What the test was

A disposable virtual machine with the nSIEM agent installed, and a test driver that does nothing at all — it loads, then unloads. It was signed with a self-made test certificate rather than one Windows trusts, and installed from an ordinary user folder, twice: once as Windows normally runs, and once with Windows switched into test mode.

The test folder on the lab machine: the driver file, its certificate and a build file
The test driver and its self-made certificate, sitting in a user's desktop folder.

Attempt one: Windows says no

With Windows in its normal mode, the driver could be registered but not started. Windows refused to load it because it could not verify the signature.

A shell showing the driver being registered and Windows refusing to start it because its digital signature cannot be verified
Normal mode: the driver is registered, then refused — Windows cannot verify its signature.

A refusal is easy to miss — nothing breaks, and nothing appears on screen unless you were the one typing. But Windows writes it down, and nSIEM collected the record:

nSIEM showing a code-integrity event: Windows refused to load the driver file from the user's desktop folder
The refusal in nSIEM: Windows blocked the driver file, and the record says exactly which file.
nSIEM showing the matching code-integrity event with the details of the certificate the driver was signed with
The matching record carries the signature it was checked against — the self-made test certificate.

Attempt two: test mode

Windows has a test mode for developers that accepts drivers signed with a self-made certificate. With it switched on and the certificate trusted, the same driver was installed, started, stopped and removed.

A shell switching Windows into test mode and adding the test certificate to the trusted stores
Switching on test mode and trusting the test certificate — changes an administrator has to make on purpose.
A shell showing the driver installed as a kernel service, running, stopped and deleted
This time the driver loads: installed, running, stopped and removed in a few seconds.

The driver was gone again within seconds — but the installation left two records behind, one in each of two different Windows logs, and nSIEM collected both:

nSIEM showing a service-installed event for the driver: a kernel mode driver loaded from the user's desktop folder
From the system log: a new kernel-mode driver, and the path it was loaded from.
nSIEM showing the matching security event: the same driver installed, with the account that installed it
From the security log: the same installation, with the account that did it.

Together they answer the questions that matter: what was installed (a kernel driver), from where (a user's desktop folder, not a system location), and by whom.

Finding it again

A driver that loads from a user's folder is unusual in itself. One search asks exactly that question across everything collected:

nSIEM search for kernel-mode drivers installed from a user folder, returning two events in 29 milliseconds
One search: every kernel driver installed from a user folder — two results in 29 milliseconds, this test and an earlier one.

What it did not do

It recorded; it did not alert. Every record above was collected and searchable within seconds, but nSIEM does not yet raise an alert on its own — someone had to ask. Turning searches like the one above into detections that fire by themselves is the next stage of the work.

It does not stop drivers. The block in attempt one was Windows doing its job; nSIEM's part was making sure the refusal was not lost.

What this means in practice

  1. A driver nobody trusts is refused. Windows blocks it — and the refusal is kept, so an attempt that failed is still visible.
  2. A driver that does load leaves a trail. What, from where and by whom, from two independent logs.
  3. The trail is one search away. No digging through each machine's logs by hand.
← All nSIEM entries