Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Dlagent04

Detects known downloader agent downloading encoded binaries in patches from paste-like websites, most notably hastebin

MalwareDlagent04ditekSHen 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 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

malware-win-dlagent04.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Dlagent04 : FILE
{
	meta:
		description = "Detects known downloader agent downloading encoded binaries in patches from paste-like websites, most notably hastebin"
		author = "ditekSHen"
		id = "d591c591-aecc-557e-85b4-1e2589fbfbf9"
		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#L3247-L3263"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "73e6af7c32d38ec5d1d2bc9f2517860367b46779b53e0faff8885b655561ab01"
		score = 75
		quality = 75
		tags = "FILE"
		clamav_sig = "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)

IdentifierTypeValueModifiers
$x1text"@@@http"ascii wide
$s1text"HttpWebRequest"fullword ascii
$s2text"GetResponseStream"fullword ascii
$s3text"set_FileName"fullword ascii
$s4text"set_UseShellExecute"fullword ascii
$s5text"WebClient"fullword ascii
$s6text"set_CreateNoWindow"fullword ascii
$s7text"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.

Drop a file here or click to chooseScanned locally with YARA-X. Files up to 200 MB.

Open in editor

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).

Original rule

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_sigMALWARE.Win.Trojan.DLAgent04

Tags:FILE