Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Coinminer04

Detects coinmining malware

MalwareCoinminer04ditekSHen 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 coinmining malware

Associated malware family: Coinminer04.

Targets: Windows PE.

It defines 13 patterns (13 text, 0 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

malware-win-coinminer04.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Coinminer04 : FILE
{
	meta:
		description = "Detects coinmining malware"
		author = "ditekSHen"
		id = "d90d8ad3-20b7-5bb4-8c58-3488c60ed9a2"
		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#L7838-L7858"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "2ef60dbf0bac3d5910635bb011a45e5ebc1392094b10425604fa9dd290198f8b"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$s1 = "createDll" fullword ascii
		$s2 = "getTasks" fullword ascii
		$s3 = "SetStartup" fullword ascii
		$s4 = "loadUrl" fullword ascii
		$s5 = "Processer" fullword ascii
		$s6 = "checkProcess" fullword ascii
		$s7 = "runProcess" fullword ascii
		$s8 = "createDir" fullword ascii
		$cnc1 = "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0" fullword wide
		$cnc2 = "?hwid=" fullword wide
		$cnc3 = "?timeout=1" fullword wide
		$cnc4 = "&completed=" fullword wide
		$cnc5 = "/cmd.php" wide

	condition:
		uint16( 0 ) == 0x5a4d and ( 5 of ( $s* ) and 1 of ( $cnc* ) )
}

Strings (13 patterns)

IdentifierTypeValueModifiers
$s1text"createDll"fullword ascii
$s2text"getTasks"fullword ascii
$s3text"SetStartup"fullword ascii
$s4text"loadUrl"fullword ascii
$s5text"Processer"fullword ascii
$s6text"checkProcess"fullword ascii
$s7text"runProcess"fullword ascii
$s8text"createDir"fullword ascii
$cnc1text"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0"fullword wide
$cnc2text"?hwid="fullword wide
$cnc3text"?timeout=1"fullword wide
$cnc4text"&completed="fullword wide
$cnc5text"/cmd.php"wide

Condition

uint16( 0 ) == 0x5a4d and ( 5 of ( $s* ) and 1 of ( $cnc* ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • At least 5 patterns in ( $s* ) must match.
  • At least 1 patterns in ( $cnc* ) must match.

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: d90d8ad3-20b7-5bb4-8c58-3488c60ed9a2

Tags:FILE