Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Downloader_Win_Andarloader

Detect the AndarLoader downloader used by Andariel

MalwareSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X (with warnings)
Author
Sekoia.io
Date
2023-09-04
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Detect the AndarLoader downloader used by Andariel

Targets: Windows PE.

It has no patterns: the condition alone decides (modules, file properties or other rules). YARA modules used: pe, hash.

YARA-X says: warning[deprecated_field]: field `number_of_resources` is deprecated

Summary generated from the rule's metadata and condition.

Rule source

Includes the imports needed to compile it on its own.

downloader-win-andarloader.yarDetection Rule License 1.1
import "pe"
import "hash"

rule SEKOIA_Downloader_Win_Andarloader : FILE
{
	meta:
		description = "Detect the AndarLoader downloader used by Andariel"
		author = "Sekoia.io"
		id = "96dd737e-601c-4370-9fa6-4bbafafae203"
		date = "2023-09-04"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/downloader_win_andarloader.yar#L4-L20"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		hash = "02135f60f3edff0b9baa4c20715ee6a80c94f282079bf879265f5e020d37cf88"
		hash = "54ed7a7430974cc2ea694f49f3e637b835dcd24aa19d66af854ad47b87068c92"
		logic_hash = "33e5490b9564333c27a2c23d7f0362c582ca3bd352cafde6b334dc376fd37762"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	condition:
		for any i in ( 0 .. pe.number_of_resources -1 ) : ( hash.sha256 ( pe.resources [ i ] . offset , pe.resources [ i ] . length ) == "b338ad077c7f5be85c33def7287198841d55af8cd1ad856fdcd16fdc78f18838" ) and filesize < 100KB
}

Condition

for any i in ( 0 .. pe.number_of_resources -1 ) : ( hash.sha256 ( pe.resources [ i ] . offset , pe.resources [ i ] . length ) == "b338ad077c7f5be85c33def7287198841d55af8cd1ad856fdcd16fdc78f18838" ) and filesize < 100KB

In plain words (Heuristic)

  • The file must be smaller than 100KB (a cheap guard that skips large files).
  • A for-loop checks a property over several matches or items.
  • Uses the pe module.
  • Uses the hash module.
  • Compares a hash of the file or a part of it.

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

Sample hashes

Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).

  • 02135f60f3edff0b9baa4c20715ee6a80c94f282079bf879265f5e020d37cf88
  • 54ed7a7430974cc2ea694f49f3e637b835dcd24aa19d66af854ad47b87068c92

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: 96dd737e-601c-4370-9fa6-4bbafafae203

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE