Skip to content

Instantly share code, notes, and snippets.

@wesinator
Created July 30, 2021 11:43
Show Gist options
  • Save wesinator/1272b602384f2cc2098b0509a8db8040 to your computer and use it in GitHub Desktop.
Save wesinator/1272b602384f2cc2098b0509a8db8040 to your computer and use it in GitHub Desktop.
YARA rule that matches MS HWC signed KmdfLibrary driver PE binaries without Product resource info, like the NetFilter rootkit.
import "vt"
rule ms_hwc_sig_kmdf_driver_no_prod_info
{
meta:
license = "4-Clause BSD"
strings:
$ms_hwc_serial = { 33 00 00 00 B5 21 3F CA 1E 4A A0 3D E4 00 00 00 00 00 B5 }
$kmdf_library = "KmdfLibrary" nocase wide ascii
$prod_name = "ProductName" wide
$prod_ver = "ProductVersion" wide
condition:
vt.metadata.new_file and
uint16(0) == 0x5a4d and $ms_hwc_serial and not any of ($prod*) and $kmdf_library
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment