Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Romcom_Dropper

Hunt for RomCom worker

MalwareRomcomditekSHen 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

Hunt for RomCom worker

Associated malware family: Romcom.

Targets: Windows PE.

It defines 4 patterns (4 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.

malware-win-romcom-dropper.yarBSD 2-Clause License
import "pe"

rule DITEKSHEN_MALWARE_Win_Romcom_Dropper : FILE
{
	meta:
		description = "Hunt for RomCom worker"
		author = "ditekShen"
		id = "1b77122d-95d7-535d-897e-b542da17f499"
		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#L10324-L10335"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "89f62f71e5870c1e5d14bc32dd3508da620f5fa85494251c69682eb09d630029"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$s1 = "\\REGISTRY\\MACHINE\\SOFTWARE\\Classes" wide nocase
		$s2 = "\\REGISTRY\\USER" wide nocase
		$s3 = "BINARY" fullword wide
		$s4 = "POST" fullword wide

	condition:
		uint16( 0 ) == 0x5a4d and pe.is_dll ( ) and pe.number_of_exports == 1 and pe.exports ( "Main" ) and 3 of them
}

Strings (4 patterns)

IdentifierTypeValueModifiers
$s1text"\\REGISTRY\\MACHINE\\SOFTWARE\\Classes"wide nocase
$s2text"\\REGISTRY\\USER"wide nocase
$s3text"BINARY"fullword wide
$s4text"POST"fullword wide

Condition

uint16( 0 ) == 0x5a4d and pe.is_dll ( ) and pe.number_of_exports == 1 and pe.exports ( "Main" ) and 3 of them

In plain words (Heuristic)

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

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: 1b77122d-95d7-535d-897e-b542da17f499

Tags:FILE

More Romcom rules