Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Apt_Gamaredon_Ddrdoh_Vbs_Downloader_Vbs

Detects malicious VBScript executed by LNK/mshta

APT / threat actorVbsdownloaderSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X
Author
Sekoia.io
Date
2023-01-24
Modified
2024-12-19
Score / Quality
75 / 78

What this rule detects

Detects malicious VBScript executed by LNK/mshta

Associated malware family: Vbsdownloader.

It defines 6 patterns (6 text, 0 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

apt-gamaredon-ddrdoh-vbs-downloader-vbs.yarDetection Rule License 1.1
rule SEKOIA_Apt_Gamaredon_Ddrdoh_Vbs_Downloader_Vbs : FILE
{
	meta:
		description = "Detects malicious VBScript executed by LNK/mshta"
		author = "Sekoia.io"
		id = "cc29d5d9-58bd-4f68-8673-daa41abfc7be"
		date = "2023-01-24"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/apt_gamaredon_ddrdoh_vbs_downloader_vbs.yar#L1-L20"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "c91e1ce26c0735e8c68fe39f2fbeda8aed51cd4f9a0b967b5d184843728dcef4"
		score = 75
		quality = 78
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$ = "b24gZXJyb3IgcmVzd" ascii
		$ = "BinaryStream.readtext" ascii nocase
		$ = "createobject(\"msxml2.domdocument.3.0\").createelement(" ascii nocase
		$ = "Dim cSecond, cMinute, CHour, cDay, cMonth, cYear" ascii nocase
		$ = "tDate & \"T\" & tTime"
		$ = "AutoOpen" ascii nocase

	condition:
		5 of them and filesize < 50KB
}

Strings (6 patterns)

IdentifierTypeValueModifiers
$text"b24gZXJyb3IgcmVzd"ascii
$text"BinaryStream.readtext"ascii nocase
$text"createobject(\"msxml2.domdocument.3.0\").createelement("ascii nocase
$text"Dim cSecond, cMinute, CHour, cDay, cMonth, cYear"ascii nocase
$text"tDate & \"T\" & tTime"
$text"AutoOpen"ascii nocase

Condition

5 of them and filesize < 50KB

In plain words (Heuristic)

  • The file must be smaller than 50KB (a cheap guard that skips large files).
  • At least 5 patterns in the rule 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.

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

Open in editor

References

Licence & attribution

Author: Sekoia.io

Source repository: SEKOIA.IO Community @ a438a5901a

Licence: Detection Rule License 1.1 (repository licence)

Original rule

Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.

Rule id: cc29d5d9-58bd-4f68-8673-daa41abfc7be

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE

More Vbsdownloader rules