Skip to content

Instantly share code, notes, and snippets.

@GroverChouT
Last active January 26, 2020 14:24
Show Gist options
  • Save GroverChouT/35f97090d6477efd8d6211156a79f708 to your computer and use it in GitHub Desktop.
Save GroverChouT/35f97090d6477efd8d6211156a79f708 to your computer and use it in GitHub Desktop.

Set target host

Notes:

  • Don't forget to issue a reboot after you change the settings
  • Remember your token and port for later use

Enable kernel debug

bcdedit /debug on

Set network kernel debug host and port

bcdedit /dbgsettings net hostip:w.x.y.z port:50000

Examine kernel debug settings

bcdedit /dbgsettings

Disable driver signature enforcement permanently

bcdedit /set nointegritychecks on

Debug tricks

Notes:

  • Proxy if it takes too long

Set debug symbol location

.symfix C:\Symbols

Append project specific symbol location

.sympath+ {location}

Reload symbols

.reload /f

Set debug output mask

ed nt!Kd_{component}_Mask 0xFFFFFFFF

https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/reading-and-filtering-debugging-messages#identifying-the-component-name

Component name (Dpfilter.h)

Component name Driver type
IHVVIDEO Video driver
IHVAUDIO Audio driver
IHVNETWORK Network driver
IHVSTREAMING Kernel streaming driver
IHVBUS Bus driver
IHVDRIVER Any other type of driver

Level defines (Dpfilter.h)

#define DPFLTR_ERROR_LEVEL 0
#define DPFLTR_WARNING_LEVEL 1
#define DPFLTR_TRACE_LEVEL 2
#define DPFLTR_INFO_LEVEL 3
#define DPFLTR_MASK 0x80000000

Examine debug output mask

dd nt!kd_{component}_Mask
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment