Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_VULN_Printerdriver_Privesc_CVE_2021_3438_Jul21

Detects affected drivers with PE timestamps older than the date of the initial report

GenericSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
Florian Roth (Nextron Systems)
Date
2021-07-20
Modified
2023-12-05
Score / Quality
70 / 85

What this rule detects

Detects affected drivers with PE timestamps older than the date of the initial report

Targets: Windows PE.

It defines 2 patterns (2 text, 0 hex, 0 regex). YARA modules used: pe.

Summary generated from the rule's metadata and condition.

Rule source

Includes the imports needed to compile it on its own.

vuln-printerdriver-privesc-cve-2021-3438-jul21.yarDetection Rule License 1.1
import "pe"

rule SIGNATURE_BASE_VULN_Printerdriver_Privesc_CVE_2021_3438_Jul21 : FILE
{
	meta:
		description = "Detects affected drivers with PE timestamps older than the date of the initial report"
		author = "Florian Roth (Nextron Systems)"
		id = "34cd648a-3e3f-5832-8abe-18507931eb3d"
		date = "2021-07-20"
		modified = "2023-12-05"
		reference = "https://labs.sentinelone.com/cve-2021-3438-16-years-in-hiding-millions-of-printers-worldwide-vulnerable/"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/vul_cve_2021_3438_printdriver.yar#L4-L22"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		hash = "7cc9ba2df7b9ea6bb17ee342898edd7f54703b93b6ded6a819e83a7ee9f938b4"
		logic_hash = "b58c2623c8fb84162c1c9390d0398639061ed5b1d4a8e007685e6fabe42bde54"
		score = 70
		quality = 85
		tags = "FILE"

	strings:
		$s1 = "This String is from Device Driver@@@@@ !!!" ascii
		$s2 = "\\DosDevices\\ssportc" wide fullword

	condition:
		uint16( 0 ) == 0x5a4d and filesize < 400KB and all of ( $s* ) and 1613606400 >= pe.timestamp
}

Strings (2 patterns)

IdentifierTypeValueModifiers
$s1text"This String is from Device Driver@@@@@ !!!"ascii
$s2text"\\DosDevices\\ssportc"wide fullword

Condition

uint16( 0 ) == 0x5a4d and filesize < 400KB and all of ( $s* ) and 1613606400 >= pe.timestamp

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • The file must be smaller than 400KB (a cheap guard that skips large files).
  • All patterns in ( $s* ) must match.
  • Uses the pe module.

Test this rule in your browser

Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.

Drop a file here or click to chooseScanned locally with YARA-X. Files up to 200 MB.

Open in editor

References

Sample hashes

Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).

  • 7cc9ba2df7b9ea6bb17ee342898edd7f54703b93b6ded6a819e83a7ee9f938b4

Licence & attribution

Author: Florian Roth (Nextron Systems)

Source repository: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a

Licence: Detection Rule License 1.1 (repository licence)

Original rule

Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.

Rule id: 34cd648a-3e3f-5832-8abe-18507931eb3d

Tags:FILE