Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Polyglotduke

Detects PolyGlotDuke

MalwarePolyglotdukeditekSHen detectionBSD 2-Clause LicenseCompiles with YARA-X
Author
ditekSHen
Date
2020-11-06
Modified
2024-11-01
Score / Quality
75 / 75

What this rule detects

Detects PolyGlotDuke

Associated malware family: Polyglotduke.

Targets: Windows PE.

It defines 3 patterns (0 text, 3 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.

malware-win-polyglotduke.yarBSD 2-Clause License
import "pe"

rule DITEKSHEN_MALWARE_Win_Polyglotduke : FILE
{
	meta:
		description = "Detects PolyGlotDuke"
		author = "ditekSHen"
		id = "01ac90db-35f6-5192-8630-81000573b4f9"
		date = "2020-11-06"
		modified = "2024-11-01"
		reference = "https://github.com/ditekshen/detection"
		source_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L3971-L3986"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "c1fb8ea1d21768cbd65bd7b91e3f817fa97a0a933b511dff2ae4d5db49bdb2ec"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$s1 = { 48 b9 ff ff ff ff ff ff ff ff 51 48 23 8c 24 ?? 00 00 00 48 89 8C 24 00 00 00 00 }
		$s2 = { 56 be ff ff ff ff 56 81 e6 7f }
		$s3 = { 48 8b 05 19 ?4 4b 00 48 05 48 83 00 00 4c 8b 44 24 50 8b 54 24 48 48 8b }

	condition:
		uint16( 0 ) == 0x5a4d and ( all of ( $s* ) ) or ( 2 of them and pe.exports ( "InitSvc" ) )
}

Strings (3 patterns)

IdentifierTypeValueModifiers
$s1hex{ 48 b9 ff ff ff ff ff ff ff ff 51 48 23 8c 24 ?? 00 00 00 48 89 8C 24 00 00 00 00 }
$s2hex{ 56 be ff ff ff ff 56 81 e6 7f }
$s3hex{ 48 8b 05 19 ?4 4b 00 48 05 48 83 00 00 4c 8b 44 24 50 8b 54 24 48 48 8b }

Condition

uint16( 0 ) == 0x5a4d and ( all of ( $s* ) ) or ( 2 of them and pe.exports ( "InitSvc" ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • All patterns in ( $s* ) must match.
  • At least 2 patterns in the rule must match.
  • Uses the pe module.
  • Checks exported functions or the DLL name.

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: ditekSHen

Source repository: ditekSHen detection @ e76c93dcde

Licence: BSD 2-Clause License (repository licence)

Copyright notice: Copyright 2021 by ditekSHen (https://github.com/ditekshen/detection).

Original rule

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

Rule id: 01ac90db-35f6-5192-8630-81000573b4f9

Tags:FILE

More Polyglotduke rules