Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Tardigrade

Detects Tardigrade

MalwareTardigradeditekSHen 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 Tardigrade

Associated malware family: Tardigrade.

Targets: Windows PE.

It defines 10 patterns (9 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-tardigrade.yarBSD 2-Clause License
import "pe"

rule DITEKSHEN_MALWARE_Win_Tardigrade : FILE
{
	meta:
		description = "Detects Tardigrade"
		author = "ditekSHen"
		id = "a46caaaa-2954-552a-a20f-952c47370393"
		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#L8756-L8787"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		hash = "c0976a1fbc3dd938f1d2996a888d0b3a516b432a2c38d788831553d81e2f5858"
		hash = "966b2c7c72a28310acd58bb23af4d3c893b2afca264b2d9c0ec42db815c77487"
		hash = "88be5da274df704dc7fd9882c661a0afdd35f1ce0a7145e30f51c292abd2a86b"
		hash = "cf88926b7d5a5ebbd563d0241aaf83718b77cec56da66bdf234295cc5a91c5fe"
		hash = "4afd9f0dde092daeac3f3e6ffb0aee06682b3dba6005d2bd1a914eefd5cc6a30"
		logic_hash = "2bd4f23f66844a320b6bed6242ba39096f66a08affb84abd78c342d433ed9fe6"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$x1 = "cmd.exe /c echo kOJAdtQoDcMuogIZIl>\"%s\"&exit" fullword ascii
		$x2 = "cmd.exe /c echo HBnBcZPeUevCDQmKGzXxYJHqpzRAbRCQCihOxiLi>\"%s\"&exit" fullword ascii
		$x3 = "cmd.exe /c set kpUUCjoLWLZvJFc=3167 & reg add HKCU\\SOFTWARE\\EQwIobTRgsJ /v PDMXPmqSYnUx /t REG_DWORD /d 10080 & exit" fullword ascii
		$s1 = "ReplaceFileA" ascii
		$s2 = "FlushFileBuffers" ascii
		$s3 = "WaitNamedPipeA" ascii
		$s4 = "ImpersonateNamedPipeClient" ascii
		$s5 = "RegFlushKey" ascii
		$s6 = /cmd\.exe \/c (echo|set)/ ascii
		$s7 = ">\"%s\"&exit" ascii

	condition:
		uint16( 0 ) == 0x5a4d and pe.is_dll ( ) and ( 1 of ( $x* ) or 6 of ( $s* ) ) and ( pe.exports ( "DllGetClassObject" ) and pe.exports ( "DllMain" ) and pe.exports ( "DllRegisterServer" ) and pe.exports ( "DllUnregisterServer" ) and pe.exports ( "InitHelperDll" ) and pe.exports ( "StartW" ) )
}

Strings (10 patterns)

IdentifierTypeValueModifiers
$x1text"cmd.exe /c echo kOJAdtQoDcMuogIZIl>\"%s\"&exit"fullword ascii
$x2text"cmd.exe /c echo HBnBcZPeUevCDQmKGzXxYJHqpzRAbRCQCihOxiLi>\"%s\"&exit"fullword ascii
$x3text"cmd.exe /c set kpUUCjoLWLZvJFc=3167 & reg add HKCU\\SOFTWARE\\EQwIobTRgsJ /v PDMXPmqSYnUx /t REG_DWORD /d 10080 & exit"fullword ascii
$s1text"ReplaceFileA"ascii
$s2text"FlushFileBuffers"ascii
$s3text"WaitNamedPipeA"ascii
$s4text"ImpersonateNamedPipeClient"ascii
$s5text"RegFlushKey"ascii
$s6regex/cmd\.exe \/c (echo|set)/ascii
$s7text">\"%s\"&exit"ascii

Condition

uint16( 0 ) == 0x5a4d and pe.is_dll ( ) and ( 1 of ( $x* ) or 6 of ( $s* ) ) and ( pe.exports ( "DllGetClassObject" ) and pe.exports ( "DllMain" ) and pe.exports ( "DllRegisterServer" ) and pe.exports ( "DllUnregisterServer" ) and pe.exports ( "InitHelperDll" ) and pe.exports ( "StartW" ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • At least 1 patterns in ( $x* ) must match.
  • At least 6 patterns in ( $s* ) 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

Sample hashes

Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).

  • c0976a1fbc3dd938f1d2996a888d0b3a516b432a2c38d788831553d81e2f5858
  • 966b2c7c72a28310acd58bb23af4d3c893b2afca264b2d9c0ec42db815c77487
  • 88be5da274df704dc7fd9882c661a0afdd35f1ce0a7145e30f51c292abd2a86b
  • cf88926b7d5a5ebbd563d0241aaf83718b77cec56da66bdf234295cc5a91c5fe
  • 4afd9f0dde092daeac3f3e6ffb0aee06682b3dba6005d2bd1a914eefd5cc6a30

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: a46caaaa-2954-552a-a20f-952c47370393

Tags:FILE