Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Malware_Sugargh0St_Strings

Detects SugarGh0st based on strings

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

What this rule detects

Detects SugarGh0st based on strings

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

malware-sugargh0st-strings.yarDetection Rule License 1.1
rule SEKOIA_Malware_Sugargh0St_Strings : FILE
{
	meta:
		description = "Detects SugarGh0st based on strings"
		author = "Sekoia.io"
		id = "51930498-b04a-4f13-8d14-ee975a28126e"
		date = "2023-12-01"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/malware_sugargh0st_strings.yar#L1-L20"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "b878b5d3b3f62952d79c0ea5811838f4e79302b85f25494e91dc730dec8e1d8d"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$ = "%sd.%s /c \"%s\"" wide
		$ = "[Num Lock]" wide
		$ = "#32770" wide
		$ = "]%s (%4d-%02d-%02d %02d:%02d:%02d)" wide

	condition:
		uint16be( 0 ) == 0x4d5a and filesize < 100KB and all of them
}

Strings (4 patterns)

IdentifierTypeValueModifiers
$text"%sd.%s /c \"%s\""wide
$text"[Num Lock]"wide
$text"#32770"wide
$text"]%s (%4d-%02d-%02d %02d:%02d:%02d)"wide

Condition

uint16be( 0 ) == 0x4d5a and filesize < 100KB and all of them

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • The file must be smaller than 100KB (a cheap guard that skips large files).
  • All 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: 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: 51930498-b04a-4f13-8d14-ee975a28126e

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE