Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Sn0Wlogger

Detects Sn0w Logger

MalwareSn0WloggerditekSHen 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 Sn0w Logger

Associated malware family: Sn0Wlogger.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

malware-win-sn0wlogger.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Sn0Wlogger : FILE
{
	meta:
		description = "Detects Sn0w Logger"
		author = "ditekSHen"
		id = "cdb70164-3f72-553f-a6c5-190f699e0743"
		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#L4412-L4428"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "ea4b2281f906271dc249b5036b22eadfc5add94def4f8e4f8a40c384618465d8"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$s1 = "\\SnowP\\Example\\Secured\\" ascii
		$s2 = "{0}{3}Content-Type: {4}{3}Content-Disposition: form-data; name=\"{1}\"{3}{3}{2}{3}" wide
		$s3 = "\"encrypted_key\":\"(.*?)\"" fullword wide
		$s4 = "<SendToDiscord>d__" ascii
		$s5 = "_urlWebhook" ascii
		$r1 = "[\\w-]{24}\\.[\\w-]{6}\\.[\\w-]{27}" fullword wide
		$r2 = "^\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$" fullword wide
		$r3 = "mfa\\.[\\w-]{84}" fullword wide
		$r4 = "(\\w+)=(\\d+)-(\\d+)$" fullword wide

	condition:
		uint16( 0 ) == 0x5a4d and ( 4 of ( $s* ) or ( all of ( $r* ) and 2 of ( $s* ) ) or 7 of them )
}

Strings (9 patterns)

IdentifierTypeValueModifiers
$s1text"\\SnowP\\Example\\Secured\\"ascii
$s2text"{0}{3}Content-Type: {4}{3}Content-Disposition: form-data; name=\"{1}\"{3}{3}{2}{3}"wide
$s3text"\"encrypted_key\":\"(.*?)\""fullword wide
$s4text"<SendToDiscord>d__"ascii
$s5text"_urlWebhook"ascii
$r1text"[\\w-]{24}\\.[\\w-]{6}\\.[\\w-]{27}"fullword wide
$r2text"^\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$"fullword wide
$r3text"mfa\\.[\\w-]{84}"fullword wide
$r4text"(\\w+)=(\\d+)-(\\d+)$"fullword wide

Condition

uint16( 0 ) == 0x5a4d and ( 4 of ( $s* ) or ( all of ( $r* ) and 2 of ( $s* ) ) or 7 of them )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • All patterns in ( $r* ) must match.
  • At least 4 patterns in ( $s* ) must match.
  • At least 2 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: cdb70164-3f72-553f-a6c5-190f699e0743

Tags:FILE