Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_EXT_APT_Bitter_Win32K_0Day_Feb21

Detects code that exploits a Windows 0day exploited by Bitter APT group

APT / threat actorSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
dbappsecurity_lieying_lab
Date
2021-01-01
Modified
2023-12-05
Score / Quality
75 / 85

What this rule detects

Detects code that exploits a Windows 0day exploited by Bitter APT group

Targets: Windows PE.

It defines 7 patterns (4 text, 3 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

ext-apt-bitter-win32k-0day-feb21.yarDetection Rule License 1.1
rule SIGNATURE_BASE_EXT_APT_Bitter_Win32K_0Day_Feb21 : FILE
{
	meta:
		description = "Detects code that exploits a Windows 0day exploited by Bitter APT group"
		author = "dbappsecurity_lieying_lab"
		id = "b1892b52-4b94-5571-ad63-8750a321f1f2"
		date = "2021-01-01"
		modified = "2023-12-05"
		reference = "https://ti.dbappsecurity.com.cn/blog/index.php/2021/02/10/windows-kernel-zero-day-exploit-is-used-by-bitter-apt-in-targeted-attack/"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/apt_bitter.yar#L2-L21"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		logic_hash = "84a8d0ae14469eb6431e73295d821609c7a8b313630d645085ffd8faff6e5e43"
		score = 75
		quality = 85
		tags = "FILE"

	strings:
		$s1 = "NtUserConsoleControl" ascii wide
		$s2 = "NtCallbackReturn" ascii wide
		$s3 = "CreateWindowEx" ascii wide
		$s4 = "SetWindowLong" ascii wide
		$a1 = {48 C1 E8 02 48 C1 E9 02 C7 04 8A}
		$a2 = {66 0F 1F 44 00 00 80 3C 01 E8 74 22 FF C2 48 FF C1}
		$a3 = {48 63 05 CC 69 05 00 8B 0D C2 69 05 00 48 C1 E0 20 48 03 C1}

	condition:
		uint16( 0 ) == 0x5a4d and all of ( $s* ) and 1 of ( $a* )
}

Strings (7 patterns)

IdentifierTypeValueModifiers
$s1text"NtUserConsoleControl"ascii wide
$s2text"NtCallbackReturn"ascii wide
$s3text"CreateWindowEx"ascii wide
$s4text"SetWindowLong"ascii wide
$a1hex{48 C1 E8 02 48 C1 E9 02 C7 04 8A}
$a2hex{66 0F 1F 44 00 00 80 3C 01 E8 74 22 FF C2 48 FF C1}
$a3hex{48 63 05 CC 69 05 00 8B 0D C2 69 05 00 48 C1 E0 20 48 03 C1}

Condition

uint16( 0 ) == 0x5a4d and all of ( $s* ) and 1 of ( $a* )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • All patterns in ( $s* ) must match.
  • At least 1 patterns in ( $a* ) must match.

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

Licence & attribution

Author: dbappsecurity_lieying_lab

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: b1892b52-4b94-5571-ad63-8750a321f1f2

Tags:FILE