Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Baldr

Baldr payload

MalwareBaldrditekSHen 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

Baldr payload

Associated malware family: Baldr.

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-baldr.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Baldr : FILE
{
	meta:
		description = "Baldr payload"
		author = "ditekSHen"
		id = "cdc35a11-a97b-5e21-929e-01fed5172b55"
		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#L1066-L1083"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "f8e97fd618209bc6ce609b60b1e1f1e359be7678474fad3b18a529487c64cd99"
		score = 75
		quality = 73
		tags = "FILE"
		clamav_sig = "MALWARE.Win.Trojan.Baldr"

	strings:
		$x1 = "BALDR VERSION : {0}" fullword wide
		$x2 = "Baldr" fullword ascii wide
		$x3 = "{0}\\{1:n}.exe" fullword wide
		$x4 = ".doc;.docx;.log;.txt;" fullword wide
		$s1 = "<GetMAC>b__" ascii
		$s2 = "<ExtractPrivateKey3>b__" ascii
		$s3 = "UploadData" fullword ascii
		$s6 = "get_NetworkInterfaceType" fullword ascii
		$s5 = "get_Passwordcheck" fullword ascii

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

Strings (9 patterns)

IdentifierTypeValueModifiers
$x1text"BALDR VERSION : {0}"fullword wide
$x2text"Baldr"fullword ascii wide
$x3text"{0}\\{1:n}.exe"fullword wide
$x4text".doc;.docx;.log;.txt;"fullword wide
$s1text"<GetMAC>b__"ascii
$s2text"<ExtractPrivateKey3>b__"ascii
$s3text"UploadData"fullword ascii
$s6text"get_NetworkInterfaceType"fullword ascii
$s5text"get_Passwordcheck"fullword ascii

Condition

( uint16( 0 ) == 0x5a4d and all of ( $x* ) ) or ( 2 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 2 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: cdc35a11-a97b-5e21-929e-01fed5172b55

Metadata

clamav_sigMALWARE.Win.Trojan.Baldr

Tags:FILE