Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Emmenhtal_Strings_Hta_Exe

Emmenhtal Loader string

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

What this rule detects

Emmenhtal Loader string

Targets: Windows PE.

It defines 5 patterns (4 text, 0 hex, 1 regex).

Summary generated from the rule's metadata and condition.

Rule source

emmenhtal-strings-hta-exe.yarDetection Rule License 1.1
rule SEKOIA_Emmenhtal_Strings_Hta_Exe : FILE
{
	meta:
		description = "Emmenhtal Loader string"
		author = "Sekoia.io"
		id = "64e08610-e8a4-4edd-8f6b-d4e8d2b47d87"
		date = "2024-09-06"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/emmenhtal_strings_hta_exe.yar#L1-L21"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		hash = "e86a22f1c73b85678e64341427c7193ba65903f3c0f29af2e65d7c56d833d912"
		logic_hash = "93f85a4ccb58c6aeb664c4c843ff80a4ab7b4308a944537f7ebe087515a61659"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$char = / = String\.fromCharCode\([a-zA-Z]{2,4},[a-zA-Z]{2,4},/
		$var = "var "
		$eval = "eval("
		$script1 = "<script>"
		$script2 = "</script>MZ"

	condition:
		uint16be( 0 ) == 0x4d5a and all of them and $var in ( @script1 .. @script1 + 2000 ) and $char in ( @var .. @var + 100 )
}

Strings (5 patterns)

IdentifierTypeValueModifiers
$charregex/ = String\.fromCharCode\([a-zA-Z]{2,4},[a-zA-Z]{2,4},/
$vartext"var "
$evaltext"eval("
$script1text"<script>"
$script2text"</script>MZ"

Condition

uint16be( 0 ) == 0x4d5a and all of them and $var in ( @script1 .. @script1 + 2000 ) and $char in ( @var .. @var + 100 )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • All patterns in the rule must match.
  • Pattern $var must be found within the range @script1 .. @script1 + 2000.
  • Pattern $char must be found within the range @var .. @var + 100.

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

  • e86a22f1c73b85678e64341427c7193ba65903f3c0f29af2e65d7c56d833d912

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: 64e08610-e8a4-4edd-8f6b-d4e8d2b47d87

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE