Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_EXT_MAL_JS_Socgholish_Mar21_1

Triggers on SocGholish JS files

MalwareSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
Nils Kuhnert
Date
2021-03-29
Modified
2023-01-02
Score / Quality
75 / 85

What this rule detects

Triggers on SocGholish JS files

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

Summary generated from the rule's metadata and condition.

Rule source

ext-mal-js-socgholish-mar21-1.yarDetection Rule License 1.1
rule SIGNATURE_BASE_EXT_MAL_JS_Socgholish_Mar21_1 : JS SOCGHOLISH FILE
{
	meta:
		description = "Triggers on SocGholish JS files"
		author = "Nils Kuhnert"
		id = "3ed7d2da-569b-5851-a821-4a3cda3e13ce"
		date = "2021-03-29"
		modified = "2023-01-02"
		reference = "https://github.com/Neo23x0/signature-base"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/crime_socgholish.yar#L25-L51"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		hash = "7ccbdcde5a9b30f8b2b866a5ca173063dec7bc92034e7cf10e3eebff017f3c23"
		hash = "f6d738baea6802cbbb3ae63b39bf65fbd641a1f0d2f0c819a8c56f677b97bed1"
		hash = "c7372ffaf831ad963c0a9348beeaadb5e814ceeb878a0cc7709473343d63a51c"
		logic_hash = "08218ae952577a6ac936de875236cdc3ae32e3aaccd2196b7f43e80d7e748584"
		score = 75
		quality = 85
		tags = "JS, SOCGHOLISH, FILE"

	strings:
		$s1 = "new ActiveXObject('Scripting.FileSystemObject');" ascii
		$s2 = "['DeleteFile']" ascii
		$s3 = "['WScript']['ScriptFullName']" ascii
		$s4 = "['WScript']['Sleep'](1000)" ascii
		$s5 = "new ActiveXObject('MSXML2.XMLHTTP')" ascii
		$s6 = "this['eval']" ascii
		$s7 = "String['fromCharCode']"
		$s8 = "2), 16)," ascii
		$s9 = "= 103," ascii
		$s10 = "'00000000'" ascii

	condition:
		filesize > 3KB and filesize < 5KB and 8 of ( $s* )
}

Strings (10 patterns)

IdentifierTypeValueModifiers
$s1text"new ActiveXObject('Scripting.FileSystemObject');"ascii
$s2text"['DeleteFile']"ascii
$s3text"['WScript']['ScriptFullName']"ascii
$s4text"['WScript']['Sleep'](1000)"ascii
$s5text"new ActiveXObject('MSXML2.XMLHTTP')"ascii
$s6text"this['eval']"ascii
$s7text"String['fromCharCode']"
$s8text"2), 16),"ascii
$s9text"= 103,"ascii
$s10text"'00000000'"ascii

Condition

filesize > 3KB and filesize < 5KB and 8 of ( $s* )

In plain words (Heuristic)

  • The file must be smaller than 5KB (a cheap guard that skips large files).
  • The file must be larger than 3KB.
  • At least 8 patterns in ( $s* ) 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

Sample hashes

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

  • 7ccbdcde5a9b30f8b2b866a5ca173063dec7bc92034e7cf10e3eebff017f3c23
  • f6d738baea6802cbbb3ae63b39bf65fbd641a1f0d2f0c819a8c56f677b97bed1
  • c7372ffaf831ad963c0a9348beeaadb5e814ceeb878a0cc7709473343d63a51c

Licence & attribution

Author: Nils Kuhnert

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: 3ed7d2da-569b-5851-a821-4a3cda3e13ce

Tags:JSSOCGHOLISHFILE