Skip to content

YARA · Google Cloud Threat Intelligence (GCTI)

GCTI_Cobaltstrike_Resources_Template_X64_Ps1_V3_0_To_V4_X_Excluding_3_12_3_13

Cobalt Strike's resources/template.x64.ps1, resources/template.hint.x64.ps1 and resources/template.hint.x32.ps1 from v3.0 to v4.x except 3.12 and 3.13

Hack toolCobalt StrikeGoogle Cloud Threat Intelligence (GCTI)Apache License 2.0Compiles with YARA-X
Author
gssincla@google.com
Date
2022-11-18
Modified
2022-11-19
Score / Quality
75 / 81

What this rule detects

Cobalt Strike's resources/template.x64.ps1, resources/template.hint.x64.ps1 and resources/template.hint.x32.ps1 from v3.0 to v4.x except 3.12 and 3.13

Associated malware family: Cobalt Strike.

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

Summary generated from the rule's metadata and condition.

Rule source

cobaltstrike-resources-template-x64-ps1-v3-0-to-v4-x-excluding-3-12-3-13.yarApache License 2.0
rule GCTI_Cobaltstrike_Resources_Template_X64_Ps1_V3_0_To_V4_X_Excluding_3_12_3_13
{
	meta:
		description = "Cobalt Strike's resources/template.x64.ps1, resources/template.hint.x64.ps1 and resources/template.hint.x32.ps1 from v3.0 to v4.x except 3.12 and 3.13"
		author = "gssincla@google.com"
		id = "5a808113-aacb-56ca-b3ec-166c73c54b85"
		date = "2022-11-18"
		modified = "2022-11-19"
		reference = "https://cloud.google.com/blog/products/identity-security/making-cobalt-strike-harder-for-threat-actors-to-abuse"
		source_url = "https://github.com/chronicle/GCTI/blob/1c5fd42b1895098527fde00c2d9757edf6b303bb/YARA/CobaltStrike/CobaltStrike__Resources_Template_x64_Ps1_v3_0_to_v4_x_excluding_3_12_3_13.yara#L17-L37"
		license_url = "https://github.com/chronicle/GCTI/blob/1c5fd42b1895098527fde00c2d9757edf6b303bb/LICENSE"
		hash = "ff743027a6bcc0fee02107236c1f5c96362eeb91f3a5a2e520a85294741ded87"
		logic_hash = "80823b8590004686ebd83958cad16094ea2f6958a837d87934507531a00df77a"
		score = 75
		quality = 81
		tags = ""

	strings:
		$dda = "[AppDomain]::CurrentDomain.DefineDynamicAssembly" nocase
		$imm = "InMemoryModule" nocase
		$mdt = "MyDelegateType" nocase
		$rd = "New-Object System.Reflection.AssemblyName('ReflectedDelegate')" nocase
		$data = "[Byte[]]$var_code = [System.Convert]::FromBase64String(" nocase
		$64bitSpecific = "[IntPtr]::size -eq 8"
		$mandatory = "Mandatory = $True"

	condition:
		all of them
}

Strings (7 patterns)

IdentifierTypeValueModifiers
$ddatext"[AppDomain]::CurrentDomain.DefineDynamicAssembly"nocase
$immtext"InMemoryModule"nocase
$mdttext"MyDelegateType"nocase
$rdtext"New-Object System.Reflection.AssemblyName('ReflectedDelegate')"nocase
$datatext"[Byte[]]$var_code = [System.Convert]::FromBase64String("nocase
$64bitSpecifictext"[IntPtr]::size -eq 8"
$mandatorytext"Mandatory = $True"

Condition

all of them

In plain words (Heuristic)

  • 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

Sample hashes

Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).

  • ff743027a6bcc0fee02107236c1f5c96362eeb91f3a5a2e520a85294741ded87

Licence & attribution

Author: gssincla@google.com

Source repository: Google Cloud Threat Intelligence (GCTI) @ 1c5fd42b18

Licence: Apache License 2.0 (repository licence)

Original rule

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

Rule id: 5a808113-aacb-56ca-b3ec-166c73c54b85

More Cobalt Strike rules