Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_HKTL_Cobaltstrike_Beacon_XOR_Strings

Identifies XOR'd strings used in Cobalt Strike Beacon DLL

Hack toolCobalt StrikeSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
Elastic
Date
2021-03-16
Modified
2026-05-26
Score / Quality
75 / 85

What this rule detects

Identifies XOR'd strings used in Cobalt Strike Beacon DLL

Associated malware family: Cobalt Strike.

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

Summary generated from the rule's metadata and condition.

Rule source

hktl-cobaltstrike-beacon-xor-strings.yarDetection Rule License 1.1
rule SIGNATURE_BASE_HKTL_Cobaltstrike_Beacon_XOR_Strings
{
	meta:
		description = "Identifies XOR'd strings used in Cobalt Strike Beacon DLL"
		author = "Elastic"
		id = "359160a8-cf1c-58a8-bf7f-c09a8d661308"
		date = "2021-03-16"
		modified = "2026-05-26"
		reference = "https://www.elastic.co/blog/detecting-cobalt-strike-with-memory-signatures"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/apt_cobaltstrike.yar#L69-L90"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		logic_hash = "214f0400863783ab4294d8acc820cf00ab9941d193b2b843f877207b9912d799"
		score = 75
		quality = 85
		tags = ""
		xor_s1 = "%02d/%02d/%02d %02d:%02d:%02d"
		xor_s2 = "Started service %s on %s"
		xor_s3 = "%s as %s\\%s: %d"

	strings:
		$s1 = "%02d/%02d/%02d %02d:%02d:%02d" xor(0x01-0xff)
		$s2 = "Started service %s on %s" xor(0x01-0xff)
		$s3 = "%s as %s\\%s: %d" xor(0x01-0xff)
		$fp1 = "MalwareRemovalTool" ascii wide
		$fp2 = "advanced malware removal tool" ascii wide

	condition:
		2 of ( $s* ) and not 1 of ( $fp* )
}

Strings (5 patterns)

IdentifierTypeValueModifiers
$s1text"%02d/%02d/%02d %02d:%02d:%02d"xor(0x01-0xff)
$s2text"Started service %s on %s"xor(0x01-0xff)
$s3text"%s as %s\\%s: %d"xor(0x01-0xff)
$fp1text"MalwareRemovalTool"ascii wide
$fp2text"advanced malware removal tool"ascii wide

Condition

2 of ( $s* ) and not 1 of ( $fp* )

In plain words (Heuristic)

  • At least 2 patterns in ( $s* ) must match.
  • At least 1 patterns in ( $fp* ) 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: Elastic

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: 359160a8-cf1c-58a8-bf7f-c09a8d661308

Metadata

xor_s1%02d/%02d/%02d %02d:%02d:%02d
xor_s2Started service %s on %s
xor_s3%s as %s\%s: %d

More Cobalt Strike rules