Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Romcom_Loader

Hunt for RomCom loader

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 loader

Associated malware family: Romcom.

Targets: Windows PE.

It has no patterns: the condition alone decides (modules, file properties or other rules). 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-loader.yarBSD 2-Clause License
import "pe"

rule DITEKSHEN_MALWARE_Win_Romcom_Loader : FILE
{
	meta:
		description = "Hunt for RomCom loader"
		author = "ditekShen"
		id = "49a5398a-e28d-51e2-90d5-479d815f9967"
		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#L10291-L10307"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "7aef88aa9f201c3a1852d63b17c14e44c7c2a7dfe94a9bc77897a4aa0eb97486"
		score = 75
		quality = 75
		tags = "FILE"

	condition:
		uint16( 0 ) == 0x5a4d and pe.is_dll ( ) and ( pe.exports ( "DllCanUnloadNow" ) and pe.exports ( "DllGetClassObject" ) and pe.exports ( "DllRegisterServer" ) and pe.exports ( "DllUnregisterServer" ) and pe.exports ( "GetProxyDllInfo" ) ) and for any fn in pe.export_details : ( fn.forward_name contains "Dll" )
}

Condition

uint16( 0 ) == 0x5a4d and pe.is_dll ( ) and ( pe.exports ( "DllCanUnloadNow" ) and pe.exports ( "DllGetClassObject" ) and pe.exports ( "DllRegisterServer" ) and pe.exports ( "DllUnregisterServer" ) and pe.exports ( "GetProxyDllInfo" ) ) and for any fn in pe.export_details : ( fn.forward_name contains "Dll" )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • A for-loop checks a property over several matches or items.
  • Uses the pe module.
  • Uses the fn 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: 49a5398a-e28d-51e2-90d5-479d815f9967

Tags:FILE

More Romcom rules