Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Romcom_Worker

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 / 73

What this rule detects

Hunt for RomCom worker

Associated malware family: Romcom.

Targets: Windows PE.

It defines 6 patterns (5 text, 0 hex, 1 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-worker.yarBSD 2-Clause License
import "pe"

rule DITEKSHEN_MALWARE_Win_Romcom_Worker : FILE
{
	meta:
		description = "Hunt for RomCom worker"
		author = "ditekShen"
		id = "ce545a33-731c-5ecd-b02e-cedf24f75cc7"
		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#L10309-L10322"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "488db046458585882a4709438042b57e02d7dbc06483fdfdfc463a64ee8db203"
		score = 75
		quality = 73
		tags = "FILE"

	strings:
		$s1 = "UpdateProcThreadAttribute" fullword ascii
		$s2 = "WriteFile" fullword ascii
		$s3 = "GetAdaptersAddresses" fullword ascii nocase
		$s4 = /inflate\s\d+\.\d+\.\d+\sCopyright/ ascii
		$s5 = "SetHandleInformation" fullword ascii
		$s6 = "PeekNamedPipe" fullword ascii

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

Strings (6 patterns)

IdentifierTypeValueModifiers
$s1text"UpdateProcThreadAttribute"fullword ascii
$s2text"WriteFile"fullword ascii
$s3text"GetAdaptersAddresses"fullword ascii nocase
$s4regex/inflate\s\d+\.\d+\.\d+\sCopyright/ascii
$s5text"SetHandleInformation"fullword ascii
$s6text"PeekNamedPipe"fullword ascii

Condition

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

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • All 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: ce545a33-731c-5ecd-b02e-cedf24f75cc7

Tags:FILE

More Romcom rules