Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Jssloader

Detects JSSLoader RAT/backdoor

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

What this rule detects

Detects JSSLoader RAT/backdoor

Associated malware family: Jssloader.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

malware-win-jssloader.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Jssloader : FILE
{
	meta:
		description = "Detects JSSLoader RAT/backdoor"
		author = "ditekSHen"
		id = "ef710c21-5c64-513e-b882-b5768478976e"
		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#L3722-L3752"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "91764dabfb40cb51914110de229ddb00cd565078fef83c825f7a86fa502fda37"
		score = 75
		quality = 73
		tags = "FILE"

	strings:
		$cmd1 = "Cmd_UPDATE" fullword ascii
		$cmd2 = "Cmd_IDLE" fullword ascii
		$cmd3 = "Cmd_EXE" fullword ascii
		$cmd4 = "Cmd_VBS" fullword ascii
		$cmd5 = "Cmd_JS" fullword ascii
		$cmd6 = "Cmd_PWS" fullword ascii
		$cmd7 = "Cmd_RAT" fullword ascii
		$cmd8 = "Cmd_UNINST" fullword ascii
		$cmd9 = "Cmd_RunDll" fullword ascii
		$s1 = "ANSWER_OK" fullword ascii
		$s2 = "GatherDFiles" ascii
		$s3 = "CommandCd" fullword ascii
		$s4 = "URL_GetCmd" fullword ascii
		$s5 = "\"host\": \"{0}\", \"domain\": \"{1}\", \"user\": \"{2}\"" wide
		$s6 = "pc_dns_host_name" wide
		$s7 = "\"adinfo\": { \"adinformation\":" wide
		$e1 = "//e:vbscript" wide
		$e2 = "//e:jscript" wide
		$e3 = "/c rundll32.exe" wide
		$e4 = "/C powershell" wide
		$e5 = "C:\\Windows\\System32\\cmd.exe" wide
		$e6 = "echo del /f" wide
		$e7 = "AT.U() {0}. format" wide

	condition:
		uint16( 0 ) == 0x5a4d and ( 5 of ( $cmd* ) or 5 of ( $s* ) or all of ( $e* ) or 7 of them )
}

Strings (23 patterns)

IdentifierTypeValueModifiers
$cmd1text"Cmd_UPDATE"fullword ascii
$cmd2text"Cmd_IDLE"fullword ascii
$cmd3text"Cmd_EXE"fullword ascii
$cmd4text"Cmd_VBS"fullword ascii
$cmd5text"Cmd_JS"fullword ascii
$cmd6text"Cmd_PWS"fullword ascii
$cmd7text"Cmd_RAT"fullword ascii
$cmd8text"Cmd_UNINST"fullword ascii
$cmd9text"Cmd_RunDll"fullword ascii
$s1text"ANSWER_OK"fullword ascii
$s2text"GatherDFiles"ascii
$s3text"CommandCd"fullword ascii
$s4text"URL_GetCmd"fullword ascii
$s5text"\"host\": \"{0}\", \"domain\": \"{1}\", \"user\": \"{2}\""wide
$s6text"pc_dns_host_name"wide
$s7text"\"adinfo\": { \"adinformation\":"wide
$e1text"//e:vbscript"wide
$e2text"//e:jscript"wide
$e3text"/c rundll32.exe"wide
$e4text"/C powershell"wide
$e5text"C:\\Windows\\System32\\cmd.exe"wide
$e6text"echo del /f"wide
$e7text"AT.U() {0}. format"wide

Condition

uint16( 0 ) == 0x5a4d and ( 5 of ( $cmd* ) or 5 of ( $s* ) or all of ( $e* ) or 7 of them )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • All patterns in ( $e* ) must match.
  • At least 5 patterns in ( $cmd* ) must match.
  • At least 5 patterns in ( $s* ) must match.
  • At least 7 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: 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: ef710c21-5c64-513e-b882-b5768478976e

Tags:FILE

More Jssloader rules