Skip to content

YARA · Google Cloud Threat Intelligence (GCTI)

GCTI_Cobaltstrike_Resources_Template_X86_Vba_V3_8_To_V4_X

Cobalt Strike's resources/template.x86.vba signature for versions v3.8 to v4.x

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 / 85

What this rule detects

Cobalt Strike's resources/template.x86.vba signature for versions v3.8 to v4.x

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-x86-vba-v3-8-to-v4-x.yarApache License 2.0
rule GCTI_Cobaltstrike_Resources_Template_X86_Vba_V3_8_To_V4_X
{
	meta:
		description = "Cobalt Strike's resources/template.x86.vba signature for versions v3.8 to v4.x"
		author = "gssincla@google.com"
		id = "11c7758e-93b2-5fe3-873d-b98de579d2b4"
		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_x86_Vba_v3_8_to_v4_x.yara#L17-L37"
		license_url = "https://github.com/chronicle/GCTI/blob/1c5fd42b1895098527fde00c2d9757edf6b303bb/LICENSE"
		hash = "fc66cb120e7bc9209882620f5df7fdf45394c44ca71701a8662210cf3a40e142"
		logic_hash = "7114515477d82651806eccef34f599f6ffd4614f987dee29417ac6ef7a1a1c38"
		score = 75
		quality = 85
		tags = ""

	strings:
		$createstuff = "Function CreateStuff Lib \"kernel32\" Alias \"CreateRemoteThread\"" nocase
		$allocstuff = "Function AllocStuff Lib \"kernel32\" Alias \"VirtualAllocEx\"" nocase
		$writestuff = "Function WriteStuff Lib \"kernel32\" Alias \"WriteProcessMemory\"" nocase
		$runstuff = "Function RunStuff Lib \"kernel32\" Alias \"CreateProcessA\"" nocase
		$vars = "Dim rwxpage As Long" nocase
		$res = "RunStuff(sNull, sProc, ByVal 0&, ByVal 0&, ByVal 1&, ByVal 4&, ByVal 0&, sNull, sInfo, pInfo)"
		$rwxpage = "AllocStuff(pInfo.hProcess, 0, UBound(myArray), &H1000, &H40)"

	condition:
		all of them and @vars [ 1 ] < @res [ 1 ] and @allocstuff [ 1 ] < @rwxpage [ 1 ]
}

Strings (7 patterns)

IdentifierTypeValueModifiers
$createstufftext"Function CreateStuff Lib \"kernel32\" Alias \"CreateRemoteThread\""nocase
$allocstufftext"Function AllocStuff Lib \"kernel32\" Alias \"VirtualAllocEx\""nocase
$writestufftext"Function WriteStuff Lib \"kernel32\" Alias \"WriteProcessMemory\""nocase
$runstufftext"Function RunStuff Lib \"kernel32\" Alias \"CreateProcessA\""nocase
$varstext"Dim rwxpage As Long"nocase
$restext"RunStuff(sNull, sProc, ByVal 0&, ByVal 0&, ByVal 1&, ByVal 4&, ByVal 0&, sNull, sInfo, pInfo)"
$rwxpagetext"AllocStuff(pInfo.hProcess, 0, UBound(myArray), &H1000, &H40)"

Condition

all of them and @vars [ 1 ] < @res [ 1 ] and @allocstuff [ 1 ] < @rwxpage [ 1 ]

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).

  • fc66cb120e7bc9209882620f5df7fdf45394c44ca71701a8662210cf3a40e142

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: 11c7758e-93b2-5fe3-873d-b98de579d2b4

More Cobalt Strike rules