Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Spectre

Detects Spectre infostealer

MalwareSpectreditekSHen 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 Spectre infostealer

Associated malware family: Spectre.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

malware-win-spectre.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Spectre : FILE
{
	meta:
		description = "Detects Spectre infostealer"
		author = "ditekSHen"
		id = "43b32900-8dff-5a95-bcff-d6bd17703476"
		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#L8109-L8124"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "ee041928ab5010fd5a06538f9a7cf9c72e44903fdb05f13b12362af0b326fd6f"
		score = 75
		quality = 75
		tags = "FILE"
		snort_sid = "920233-920234"

	strings:
		$s1 = "\\../../../json.h" wide
		$s2 = "static_cast<std::size_t>(index) < kCachedPowers.size()" fullword wide
		$s3 = " cmd.exe" fullword wide
		$s4 = "m_it.object_iterator != m_object->m_value.object->end()" fullword wide
		$h1 = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1" fullword wide
		$h2 = "----974767299852498929531610575" ascii wide
		$h3 = "Content-Disposition: form-data; name=\"file\"; filename=\"" fullword ascii

	condition:
		( uint16( 0 ) == 0x5a4d and ( ( all of ( $s* ) and 1 of ( $h* ) ) or ( all of ( $h* ) and 2 of ( $s* ) ) ) ) or ( 6 of them )
}

Strings (7 patterns)

IdentifierTypeValueModifiers
$s1text"\\../../../json.h"wide
$s2text"static_cast<std::size_t>(index) < kCachedPowers.size()"fullword wide
$s3text" cmd.exe"fullword wide
$s4text"m_it.object_iterator != m_object->m_value.object->end()"fullword wide
$h1text"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1"fullword wide
$h2text"----974767299852498929531610575"ascii wide
$h3text"Content-Disposition: form-data; name=\"file\"; filename=\""fullword ascii

Condition

( uint16( 0 ) == 0x5a4d and ( ( all of ( $s* ) and 1 of ( $h* ) ) or ( all of ( $h* ) and 2 of ( $s* ) ) ) ) or ( 6 of them )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • All patterns in ( $s* ) must match.
  • All patterns in ( $h* ) must match.
  • At least 1 patterns in ( $h* ) must match.
  • At least 2 patterns in ( $s* ) must match.
  • At least 6 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: 43b32900-8dff-5a95-bcff-d6bd17703476

Metadata

snort_sid920233-920234

Tags:FILE