Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Apt_Apt41_Javascript_Dropper

Detects Earth Lusca JS dropper

APT / threat actorSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X (with warnings)
Author
Sekoia.io
Date
2024-02-26
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Detects Earth Lusca JS dropper

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

YARA-X says: warning[duplicate_pattern_value]: duplicate pattern value

Summary generated from the rule's metadata and condition.

Rule source

apt-apt41-javascript-dropper.yarDetection Rule License 1.1
rule SEKOIA_Apt_Apt41_Javascript_Dropper : FILE
{
	meta:
		description = "Detects Earth Lusca JS dropper"
		author = "Sekoia.io"
		id = "fde70806-af50-4706-9daf-d39ad0564fc7"
		date = "2024-02-26"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/apt_apt41_javascript_dropper.yar#L1-L21"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "3e34af7141e41044c3d3e099e8b8deafc7441ea47ccbd8af7ffe686f10bb18a2"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$s1 = "eval(function(p, a, c, k, e, r) {"
		$s2 = "|4d53"
		$s3 = "ActiveXObject"
		$x1 = " -F:* %1%"
		$x2 = "&I /r c:\\"
		$x3 = "ActiveXObject"

	condition:
		filesize < 2MB and ( all of ( $s* ) or all of ( $x* ) )
}

Strings (6 patterns)

IdentifierTypeValueModifiers
$s1text"eval(function(p, a, c, k, e, r) {"
$s2text"|4d53"
$s3text"ActiveXObject"
$x1text" -F:* %1%"
$x2text"&I /r c:\\"
$x3text"ActiveXObject"

Condition

filesize < 2MB and ( all of ( $s* ) or all of ( $x* ) )

In plain words (Heuristic)

  • The file must be smaller than 2MB (a cheap guard that skips large files).
  • All patterns in ( $s* ) must match.
  • All patterns in ( $x* ) 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: fde70806-af50-4706-9daf-d39ad0564fc7

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE