Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_JS_Koadicjs

Koadic post-exploitation framework JS payload

MalwareKoadicjsditekSHen detectionBSD 2-Clause LicenseCompiles with YARA-X
Author
ditekSHen
Date
2020-11-06
Modified
2024-11-01
Score / Quality
75 / 75

What this rule detects

Koadic post-exploitation framework JS payload

Associated malware family: Koadicjs.

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

Summary generated from the rule's metadata and condition.

Rule source

malware-js-koadicjs.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_JS_Koadicjs
{
	meta:
		description = "Koadic post-exploitation framework JS payload"
		author = "ditekSHen"
		id = "8598d5cb-0486-52b0-a686-6bd014f35c44"
		date = "2020-11-06"
		modified = "2024-11-01"
		reference = "https://github.com/ditekshen/detection"
		source_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L1188-L1208"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "689116f74996fecf4c16c224e8cd842ad5b5e989de2dfdf0debeb9a26d8a12fa"
		score = 75
		quality = 75
		tags = ""

	strings:
		$s1 = "window.moveTo(-" ascii
		$s2 = "window.onerror = function(sMsg, sUrl, sLine) { return false; }" fullword ascii
		$s3 = "window.onfocus = function() { window.blur(); }" fullword ascii
		$s4 = "window.resizeTo(" ascii
		$s5 = "window.blur();" fullword ascii
		$hf1 = "<hta:application caption=\"no\" windowState=\"minimize\" showInTaskBar=\"no\"" fullword ascii
		$hf2 = "<hta:application caption=\"no\" showInTaskBar=\"no\" windowState=\"minimize\" navigable=\"no\" scroll=\"no\""
		$ht1 = "<hta:application" ascii
		$ht2 = "caption=\"no\"" ascii
		$ht3 = "showInTaskBar=\"no\"" ascii
		$ht4 = "windowState=\"minimize\"" ascii
		$ht5 = "navigable=\"no\"" ascii
		$ht6 = "scroll=\"no\"" ascii

	condition:
		all of ( $s* ) and ( 1 of ( $hf* ) or all of ( $ht* ) )
}

Strings (13 patterns)

IdentifierTypeValueModifiers
$s1text"window.moveTo(-"ascii
$s2text"window.onerror = function(sMsg, sUrl, sLine) { return false; }"fullword ascii
$s3text"window.onfocus = function() { window.blur(); }"fullword ascii
$s4text"window.resizeTo("ascii
$s5text"window.blur();"fullword ascii
$hf1text"<hta:application caption=\"no\" windowState=\"minimize\" showInTaskBar=\"no\""fullword ascii
$hf2text"<hta:application caption=\"no\" showInTaskBar=\"no\" windowState=\"minimize\" navigable=\"no\" scroll=\"no\""
$ht1text"<hta:application"ascii
$ht2text"caption=\"no\""ascii
$ht3text"showInTaskBar=\"no\""ascii
$ht4text"windowState=\"minimize\""ascii
$ht5text"navigable=\"no\""ascii
$ht6text"scroll=\"no\""ascii

Condition

all of ( $s* ) and ( 1 of ( $hf* ) or all of ( $ht* ) )

In plain words (Heuristic)

  • All patterns in ( $s* ) must match.
  • All patterns in ( $ht* ) must match.
  • At least 1 patterns in ( $hf* ) 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: ditekSHen

Source repository: ditekSHen detection @ e76c93dcde

Licence: BSD 2-Clause License (repository licence)

Copyright notice: Copyright 2021 by ditekSHen (https://github.com/ditekshen/detection).

Original rule

Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.

Rule id: 8598d5cb-0486-52b0-a686-6bd014f35c44