YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Dlagent04
Detects known downloader agent downloading encoded binaries in patches from paste-like websites, most notably hastebin
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 75
What this rule detects
Detects known downloader agent downloading encoded binaries in patches from paste-like websites, most notably hastebin
Associated malware family: Dlagent04.
Targets: Windows PE.
It defines 8 patterns (8 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
rule DITEKSHEN_MALWARE_Win_Dlagent04 : FILE
{
meta:
= "Detects known downloader agent downloading encoded binaries in patches from paste-like websites, most notably hastebin"
= "ditekSHen"
= "d591c591-aecc-557e-85b4-1e2589fbfbf9"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L3247-L3263"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "73e6af7c32d38ec5d1d2bc9f2517860367b46779b53e0faff8885b655561ab01"
= 75
= 75
= "FILE"
= "MALWARE.Win.Trojan.DLAgent04"
strings:
$x1 = "@@@http" ascii wide
$s1 = "HttpWebRequest" fullword ascii
$s2 = "GetResponseStream" fullword ascii
$s3 = "set_FileName" fullword ascii
$s4 = "set_UseShellExecute" fullword ascii
$s5 = "WebClient" fullword ascii
$s6 = "set_CreateNoWindow" fullword ascii
$s7 = "DownloadString" fullword ascii
condition:
uint16( 0 ) == 0x5a4d and filesize < 300KB and #x1 > 1 and 4 of ( $s* )
}
Strings (8 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $x1 | text | "@@@http" | ascii wide |
| $s1 | text | "HttpWebRequest" | fullword ascii |
| $s2 | text | "GetResponseStream" | fullword ascii |
| $s3 | text | "set_FileName" | fullword ascii |
| $s4 | text | "set_UseShellExecute" | fullword ascii |
| $s5 | text | "WebClient" | fullword ascii |
| $s6 | text | "set_CreateNoWindow" | fullword ascii |
| $s7 | text | "DownloadString" | fullword ascii |
Condition
uint16( 0 ) == 0x5a4d and filesize < 300KB and #x1 > 1 and 4 of ( $s* )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- The file must be smaller than 300KB (a cheap guard that skips large files).
- At least 4 patterns in ( $s* ) must match.
- Pattern $x1 must occur > 1 times.
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: d591c591-aecc-557e-85b4-1e2589fbfbf9
Metadata
| clamav_sig | MALWARE.Win.Trojan.DLAgent04 |
|---|
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