YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Phonzy
Detects specific downloader agent
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 75
What this rule detects
Detects specific downloader agent
Associated malware family: Phonzy.
Targets: Windows PE.
It defines 6 patterns (6 text, 0 hex, 0 regex).
YARA-X says: warning[unintended_pattern_in_set]: pattern `$s1` may be unintendedly or redundantly included in pattern set `$s*`
Summary generated from the rule's metadata and condition.
Rule source
rule DITEKSHEN_MALWARE_Win_Phonzy : FILE
{
meta:
= "Detects specific downloader agent"
= "ditekSHen"
= "d35f41e4-4633-5482-9ae4-79354463f1b9"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L6595-L6608"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "924e7674d76594314df1a32d38f19cee12a3ed49cdf5e153f98bb08a7634055c"
= 75
= 75
= "FILE"
strings:
$ua1 = "User-Agent: Mozilla/5.0 (X11; Linux" wide
$s1 = "<meta name=\"keywords\" content=\"([\\w\\d ]*)\">" fullword wide
$s2 = "WebClient" fullword ascii
$s3 = "WriteAllText" fullword ascii
$s4 = "DownloadString" fullword ascii
$s5 = "WriteByte" fullword ascii
condition:
uint16( 0 ) == 0x5a4d and ( all of ( $s* ) or ( 1 of ( $ua* ) and ( $s1 ) and 2 of ( $s* ) ) )
}
Strings (6 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $ua1 | text | "User-Agent: Mozilla/5.0 (X11; Linux" | wide |
| $s1 | text | "<meta name=\"keywords\" content=\"([\\w\\d ]*)\">" | fullword wide |
| $s2 | text | "WebClient" | fullword ascii |
| $s3 | text | "WriteAllText" | fullword ascii |
| $s4 | text | "DownloadString" | fullword ascii |
| $s5 | text | "WriteByte" | fullword ascii |
Condition
uint16( 0 ) == 0x5a4d and ( all of ( $s* ) or ( 1 of ( $ua* ) and ( $s1 ) and 2 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 ( $ua* ) must match.
- At least 2 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
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: d35f41e4-4633-5482-9ae4-79354463f1b9
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