Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Solarmarker

Detects SolarMarker

MalwareSolarmarkerditekSHen 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

Detects SolarMarker

Associated malware family: Solarmarker.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

malware-win-solarmarker.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Solarmarker : FILE
{
	meta:
		description = "Detects SolarMarker"
		author = "ditekSHen"
		id = "78c2f739-76b2-5a80-8b9a-6c677d578eaa"
		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#L10727-L10745"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "84182c8948c2f40439cd932885ae8b88bb677ecc9fba366f22d30e13dc4ffb68"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$x1 = "token_type" fullword ascii
		$x2 = "request_data" fullword ascii
		$x3 = "request_timeout" fullword ascii
		$x4 = { 74 6f 6b 65 6e 73 00 66 72 6f 6d 00 74 6f 00 73 5f (66|72) }
		$s1 = "set_UseShellExecute" fullword ascii
		$s2 = "<Select>b__0" fullword ascii
		$s3 = "<get>b__e" fullword ascii
		$s4 = "<get>b__10" fullword ascii
		$s5 = "<get>b__f" fullword ascii
		$s6 = "<set>b__0" fullword ascii
		$s7 = "<set>b__1" fullword ascii

	condition:
		uint16( 0 ) == 0x5a4d and ( all of ( $x* ) and 4 of ( $s* ) )
}

Strings (11 patterns)

IdentifierTypeValueModifiers
$x1text"token_type"fullword ascii
$x2text"request_data"fullword ascii
$x3text"request_timeout"fullword ascii
$x4hex{ 74 6f 6b 65 6e 73 00 66 72 6f 6d 00 74 6f 00 73 5f (66|72) }
$s1text"set_UseShellExecute"fullword ascii
$s2text"<Select>b__0"fullword ascii
$s3text"<get>b__e"fullword ascii
$s4text"<get>b__10"fullword ascii
$s5text"<get>b__f"fullword ascii
$s6text"<set>b__0"fullword ascii
$s7text"<set>b__1"fullword ascii

Condition

uint16( 0 ) == 0x5a4d and ( all of ( $x* ) and 4 of ( $s* ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • All patterns in ( $x* ) must match.
  • At least 4 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

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: 78c2f739-76b2-5a80-8b9a-6c677d578eaa

Tags:FILE

More Solarmarker rules