Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Backdoor_Sandman_Strings

Detect the Sandman backdoor based on strings

MalwareSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X
Author
Sekoia.io
Date
2022-08-23
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Detect the Sandman backdoor based on strings

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

backdoor-sandman-strings.yarDetection Rule License 1.1
rule SEKOIA_Backdoor_Sandman_Strings : FILE
{
	meta:
		description = "Detect the Sandman backdoor based on strings"
		author = "Sekoia.io"
		id = "7bac7a1e-7d4a-4410-9ad4-1c85beb6faaf"
		date = "2022-08-23"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/backdoor_sandman_strings.yar#L1-L23"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "74ee1b73532d9050d5ed7ea0bed158322288a2f5b65255804ebf10dc1a4ea55b"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$s1 = "e9f7c24c-879d-49f2-b9bf-2477dc28e2ee"
		$s2 = "System.Net.Sockets"
		$s3 = "ntpServer"
		$s4 = "payloadUrl"
		$s5 = "keepRunning"
		$s6 = "payloadSize"
		$s7 = "defaultNtpMessageSize"
		$s8 = "InjectShellcode"

	condition:
		uint16be( 0 ) == 0x4d5a and 7 of them or $s1
}

Strings (8 patterns)

IdentifierTypeValueModifiers
$s1text"e9f7c24c-879d-49f2-b9bf-2477dc28e2ee"
$s2text"System.Net.Sockets"
$s3text"ntpServer"
$s4text"payloadUrl"
$s5text"keepRunning"
$s6text"payloadSize"
$s7text"defaultNtpMessageSize"
$s8text"InjectShellcode"

Condition

uint16be( 0 ) == 0x4d5a and 7 of them or $s1

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • At least 7 patterns in the rule must match.
  • Pattern $s1 must be present.

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: Sekoia.io

Source repository: SEKOIA.IO Community @ a438a5901a

Licence: Detection Rule License 1.1 (repository licence)

Original rule

Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.

Rule id: 7bac7a1e-7d4a-4410-9ad4-1c85beb6faaf

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE