Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_HKTL_Cobaltstrike_Sleepmask_Jul22

Detects static bytes in Cobalt Strike 4.5 sleep mask function that are not obfuscated

Hack toolCobalt StrikeSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
CodeX
Date
2022-07-04
Modified
2023-12-05
Score / Quality
80 / 85

What this rule detects

Detects static bytes in Cobalt Strike 4.5 sleep mask function that are not obfuscated

Associated malware family: Cobalt Strike.

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

Summary generated from the rule's metadata and condition.

Rule source

hktl-cobaltstrike-sleepmask-jul22.yarDetection Rule License 1.1
rule SIGNATURE_BASE_HKTL_Cobaltstrike_Sleepmask_Jul22
{
	meta:
		description = "Detects static bytes in Cobalt Strike 4.5 sleep mask function that are not obfuscated"
		author = "CodeX"
		id = "d396ab0e-b584-5a7c-8627-5f318a20f9dd"
		date = "2022-07-04"
		modified = "2023-12-05"
		reference = "https://codex-7.gitbook.io/codexs-terminal-window/blue-team/detecting-cobalt-strike/sleep-mask-kit-iocs"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/gen_cobaltstrike.yar#L3-L15"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		logic_hash = "233b3cb441f45f400c0261589aac31dd1fcd9c4e3a86a6aaa46c60849063b34b"
		score = 80
		quality = 85
		tags = ""

	strings:
		$sleep_mask = { 48 8B C4 48 89 58 08 48 89 68 10 48 89 70 18 48 89 78 20 45 33 DB 45 33 D2 33 FF 33 F6 48 8B E9 BB 03 00 00 00 85 D2 0F 84 81 00 00 00 0F B6 45 }

	condition:
		$sleep_mask
}

Strings (1 patterns)

IdentifierTypeValueModifiers
$sleep_maskhex{ 48 8B C4 48 89 58 08 48 89 68 10 48 89 70 18 48 89 78 20 45 33 DB 45 33 D2 33 FF 33 F6 48 8B E9 BB 03 00 00 00 85 D2 0F 84 81 00 00 00 0F B6 45 }

Condition

$sleep_mask

In plain words (Heuristic)

  • Pattern $sleep_mask 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: CodeX

Source repository: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a

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: d396ab0e-b584-5a7c-8627-5f318a20f9dd

More Cobalt Strike rules