YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Exmatter
Detects BlackMatter data exfiltration tool
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 75
What this rule detects
Detects BlackMatter data exfiltration tool
Associated malware family: Exmatter.
Targets: Windows PE.
It defines 13 patterns (12 text, 1 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
rule DITEKSHEN_MALWARE_Win_Exmatter : FILE
{
meta:
= "Detects BlackMatter data exfiltration tool"
= "ditekSHen"
= "93df7a68-1e19-5db3-95d4-39d77d1036d8"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L8303-L8325"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "4a0e10e1e9fea0906379f99fa350b91c2af37f0fd2cc55491643cc71a9887d30"
= "a5e050f1278473d41c3a3d6f98f3fd82932f51a937bc57d8f5605815f0efb0f8"
= "25a35c82919f96bdba00558616f574e901b83785713ed1a63a6f06df576777cd"
= 75
= 75
= "FILE"
strings:
$s1 = "Renci.SshNet." ascii
$s2 = "DirNotEmpty" fullword ascii
$s3 = "MkDir" fullword ascii
$s4 = "RmDir" fullword ascii
$s5 = "get_MainWindowHandle" fullword ascii
$s6 = "GetCurrentProcess" fullword ascii
$s7 = "]]>]]>" fullword wide
$s8 = "1.3.132.0.35" fullword wide
$s9 = "1.3.132.0.34" fullword wide
$s10 = "1.2.840.10045.3.1.7" fullword wide
$x1 = "sender2.pdb" fullword ascii
$x2 = { 64 00 61 00 74 00 61 00 ?? 72 00 6f 00 6f 00 74 }
$x3 = "157.230.28.192" fullword wide
condition:
uint16( 0 ) == 0x5a4d and ( all of ( $s* ) or ( 1 of ( $x* ) and 7 of ( $s* ) ) )
}
Strings (13 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "Renci.SshNet." | ascii |
| $s2 | text | "DirNotEmpty" | fullword ascii |
| $s3 | text | "MkDir" | fullword ascii |
| $s4 | text | "RmDir" | fullword ascii |
| $s5 | text | "get_MainWindowHandle" | fullword ascii |
| $s6 | text | "GetCurrentProcess" | fullword ascii |
| $s7 | text | "]]>]]>" | fullword wide |
| $s8 | text | "1.3.132.0.35" | fullword wide |
| $s9 | text | "1.3.132.0.34" | fullword wide |
| $s10 | text | "1.2.840.10045.3.1.7" | fullword wide |
| $x1 | text | "sender2.pdb" | fullword ascii |
| $x2 | hex | { 64 00 61 00 74 00 61 00 ?? 72 00 6f 00 6f 00 74 } | |
| $x3 | text | "157.230.28.192" | fullword wide |
Condition
uint16( 0 ) == 0x5a4d and ( all of ( $s* ) or ( 1 of ( $x* ) and 7 of ( $s* ) ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- All patterns in ( $s* ) must match.
- At least 1 patterns in ( $x* ) must match.
- At least 7 patterns in ( $s* ) 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.
References
Sample hashes
Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).
- 4a0e10e1e9fea0906379f99fa350b91c2af37f0fd2cc55491643cc71a9887d30
- a5e050f1278473d41c3a3d6f98f3fd82932f51a937bc57d8f5605815f0efb0f8
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: 93df7a68-1e19-5db3-95d4-39d77d1036d8
Tags:FILE
Related rules
- 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
- MalwareditekSHen detection· ditekSHen· 2020-11-06