Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Apt_Apt37_Malicious_Hta_File

Detects malicious APT37 files

APT / threat actorSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X
Author
Sekoia.io
Date
2023-03-06
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Detects malicious APT37 files

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

Summary generated from the rule's metadata and condition.

Rule source

apt-apt37-malicious-hta-file.yarDetection Rule License 1.1
rule SEKOIA_Apt_Apt37_Malicious_Hta_File : FILE
{
	meta:
		description = "Detects malicious APT37 files"
		author = "Sekoia.io"
		id = "22a98c27-8ff4-4760-b505-f8eacf4dabda"
		date = "2023-03-06"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/apt_apt37_malicious_hta_file.yar#L1-L20"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "85289bea86641ea9c359c361d075783449d453017485170abc87c47872792210"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$s1 = "<HTML>" nocase
		$s2 = " UwB0AGEAcgB0AC0AUwBs" ascii
		$s3 = "= new ActiveXObject(" ascii
		$s4 = "\", \"\", \"open\", 0);" ascii
		$s5 = ".moveTo(" ascii
		$s6 = "self.close();"

	condition:
		$s1 at 0 and all of them and filesize < 1MB
}

Strings (6 patterns)

IdentifierTypeValueModifiers
$s1text"<HTML>"nocase
$s2text" UwB0AGEAcgB0AC0AUwBs"ascii
$s3text"= new ActiveXObject("ascii
$s4text"\", \"\", \"open\", 0);"ascii
$s5text".moveTo("ascii
$s6text"self.close();"

Condition

$s1 at 0 and all of them and filesize < 1MB

In plain words (Heuristic)

  • The file must be smaller than 1MB (a cheap guard that skips large files).
  • All patterns in the rule must match.
  • Pattern $s1 must be found at offset 0.

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: 22a98c27-8ff4-4760-b505-f8eacf4dabda

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE