YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Tardigrade
Detects Tardigrade
- 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.
import "pe"
rule DITEKSHEN_MALWARE_Win_Tardigrade : FILE
{
meta:
= "Detects Tardigrade"
= "ditekSHen"
= "a46caaaa-2954-552a-a20f-952c47370393"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L8756-L8787"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "c0976a1fbc3dd938f1d2996a888d0b3a516b432a2c38d788831553d81e2f5858"
= "966b2c7c72a28310acd58bb23af4d3c893b2afca264b2d9c0ec42db815c77487"
= "88be5da274df704dc7fd9882c661a0afdd35f1ce0a7145e30f51c292abd2a86b"
= "cf88926b7d5a5ebbd563d0241aaf83718b77cec56da66bdf234295cc5a91c5fe"
= "4afd9f0dde092daeac3f3e6ffb0aee06682b3dba6005d2bd1a914eefd5cc6a30"
= "2bd4f23f66844a320b6bed6242ba39096f66a08affb84abd78c342d433ed9fe6"
= 75
= 75
= "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)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $x1 | text | "cmd.exe /c echo kOJAdtQoDcMuogIZIl>\"%s\"&exit" | fullword ascii |
| $x2 | text | "cmd.exe /c echo HBnBcZPeUevCDQmKGzXxYJHqpzRAbRCQCihOxiLi>\"%s\"&exit" | fullword ascii |
| $x3 | text | "cmd.exe /c set kpUUCjoLWLZvJFc=3167 & reg add HKCU\\SOFTWARE\\EQwIobTRgsJ /v PDMXPmqSYnUx /t REG_DWORD /d 10080 & exit" | fullword ascii |
| $s1 | text | "ReplaceFileA" | ascii |
| $s2 | text | "FlushFileBuffers" | ascii |
| $s3 | text | "WaitNamedPipeA" | ascii |
| $s4 | text | "ImpersonateNamedPipeClient" | ascii |
| $s5 | text | "RegFlushKey" | ascii |
| $s6 | regex | /cmd\.exe \/c (echo|set)/ | ascii |
| $s7 | text | ">\"%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.
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).
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
Related rules
- ARKBIRD_SOLG_APT_Tardigrade_Nov_2021_1Metadata onlyAPT / threat actorArkbird SOLG (DailyIOC)· Arkbird_SOLG· 2021-11-22
- MalwareditekSHen detection· ditekSHen· 2034-02-17
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06