Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Wiper_Hermeticwiper_Variants

Matches HermeticWiper and possible variants

MalwareHermeticwiperSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X (with warnings)
Author
Sekoia.io
Date
2022-02-24
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Matches HermeticWiper and possible variants

Associated malware family: Hermeticwiper.

Targets: Windows PE.

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

YARA-X says: warning[deprecated_field]: field `number_of_signatures` is deprecated

Summary generated from the rule's metadata and condition.

Rule source

Includes the imports needed to compile it on its own.

wiper-hermeticwiper-variants.yarDetection Rule License 1.1
import "pe"

rule SEKOIA_Wiper_Hermeticwiper_Variants
{
	meta:
		description = "Matches HermeticWiper and possible variants"
		author = "Sekoia.io"
		id = "102ecf15-167e-49e4-932c-6334e3cdcc69"
		date = "2022-02-24"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/wiper_hermeticwiper_variants.yar#L3-L26"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "d0c358517b0a6334d430d3bd75d6c58243ce84e0f90afe48a5069a1e1954119c"
		score = 75
		quality = 80
		tags = ""
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$ = "SeLoadDriverPrivilege" wide
		$ = "\\\\.\\PhysicalDrive" wide
		$ = "::$INDEX_ALLOCATION" wide
		$ = "CrashDumpEnabled" wide

	condition:
		2 of them and pe.characteristics and pe.number_of_signatures == 1 and pe.number_of_resources > 2 and for 2 i in ( 0 .. pe.number_of_resources - 1 ) : ( uint32be( pe.resources [ i ] . offset + 15 ) == 0x4D5A9000 and uint16be( pe.resources [ i ] . offset ) == 0x535A )
}

Strings (4 patterns)

IdentifierTypeValueModifiers
$text"SeLoadDriverPrivilege"wide
$text"\\\\.\\PhysicalDrive"wide
$text"::$INDEX_ALLOCATION"wide
$text"CrashDumpEnabled"wide

Condition

2 of them and pe.characteristics and pe.number_of_signatures == 1 and pe.number_of_resources > 2 and for 2 i in ( 0 .. pe.number_of_resources - 1 ) : ( uint32be( pe.resources [ i ] . offset + 15 ) == 0x4D5A9000 and uint16be( pe.resources [ i ] . offset ) == 0x535A )

In plain words (Heuristic)

  • At least 2 patterns in the rule must match.
  • A for-loop checks a property over several matches or items.
  • Uses the pe module.
  • Checks the Authenticode signature.

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: Sekoia.io

Source repository: SEKOIA.IO Community @ a438a5901a

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: 102ecf15-167e-49e4-932c-6334e3cdcc69

Metadata

version1.0
classificationTLP:CLEAR

More Hermeticwiper rules