Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_SUSP_OBFUSC_JS_Sept21_2

Detects JavaScript obfuscation as used in MalDocs by FIN7 group

Suspicious / huntingSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
Florian Roth (Nextron Systems)
Date
2021-09-07
Modified
2023-12-05
Score / Quality
65 / 85

What this rule detects

Detects JavaScript obfuscation as used in MalDocs by FIN7 group

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

Summary generated from the rule's metadata and condition.

Rule source

susp-obfusc-js-sept21-2.yarDetection Rule License 1.1
rule SIGNATURE_BASE_SUSP_OBFUSC_JS_Sept21_2 : FILE
{
	meta:
		description = "Detects JavaScript obfuscation as used in MalDocs by FIN7 group"
		author = "Florian Roth (Nextron Systems)"
		id = "5ab9cd60-077c-5066-bd2f-8da261aae1e0"
		date = "2021-09-07"
		modified = "2023-12-05"
		reference = "https://www.anomali.com/blog/cybercrime-group-fin7-using-windows-11-alpha-themed-docs-to-drop-javascript-backdoor"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/apt_fin7.yar#L303-L323"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		logic_hash = "235ff8fe5c033fd90d77ecf9ce80b59be7bf6ae5a2863a1c9365d8b125a7ff3f"
		score = 65
		quality = 85
		tags = "FILE"

	strings:
		$s1 = "=new RegExp(String.fromCharCode(" ascii
		$s2 = ".charCodeAt(" ascii
		$s3 = ".substr(0, " ascii
		$s4 = "var shell = new ActiveXObject(" ascii
		$s5 = "= new Date().getUTCMilliseconds();" ascii
		$s6 = ".deleteFile(WScript.ScriptFullName);" ascii

	condition:
		filesize < 6000KB and ( 4 of them )
}

Strings (6 patterns)

IdentifierTypeValueModifiers
$s1text"=new RegExp(String.fromCharCode("ascii
$s2text".charCodeAt("ascii
$s3text".substr(0, "ascii
$s4text"var shell = new ActiveXObject("ascii
$s5text"= new Date().getUTCMilliseconds();"ascii
$s6text".deleteFile(WScript.ScriptFullName);"ascii

Condition

filesize < 6000KB and ( 4 of them )

In plain words (Heuristic)

  • The file must be smaller than 6000KB (a cheap guard that skips large files).
  • At least 4 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: Florian Roth (Nextron Systems)

Source repository: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a

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: 5ab9cd60-077c-5066-bd2f-8da261aae1e0

Tags:FILE