YARA · Google Cloud Threat Intelligence (GCTI)
GCTI_Cobaltstrike_Resources_Command_Ps1_V2_5_To_V3_7_And_Resources_Compress_Ps1_V3_8_To_V4_X
Cobalt Strike's resources/command.ps1 for versions 2.5 to v3.7 and resources/compress.ps1 from v3.8 to v4.x
- Author
- gssincla@google.com
- Date
- 2022-11-18
- Modified
- 2022-11-22
- Score / Quality
- 75 / 85
What this rule detects
Cobalt Strike's resources/command.ps1 for versions 2.5 to v3.7 and resources/compress.ps1 from v3.8 to v4.x
Associated malware family: Cobalt Strike.
It defines 2 patterns (2 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
rule GCTI_Cobaltstrike_Resources_Command_Ps1_V2_5_To_V3_7_And_Resources_Compress_Ps1_V3_8_To_V4_X
{
meta:
= "Cobalt Strike's resources/command.ps1 for versions 2.5 to v3.7 and resources/compress.ps1 from v3.8 to v4.x"
= "gssincla@google.com"
= "c0b81deb-ed20-5f7e-8e15-e6a9e9362594"
= "2022-11-18"
= "2022-11-22"
= "https://cloud.google.com/blog/products/identity-security/making-cobalt-strike-harder-for-threat-actors-to-abuse"
= "https://github.com/chronicle/GCTI/blob/1c5fd42b1895098527fde00c2d9757edf6b303bb/YARA/CobaltStrike/CobaltStrike__Resources_Command_Ps1_v2_5_to_v3_7_and_Resources_Compress_Ps1_v3_8_to_v4_x.yara#L17-L33"
= "https://github.com/chronicle/GCTI/blob/1c5fd42b1895098527fde00c2d9757edf6b303bb/LICENSE"
= "932dec24b3863584b43caf9bb5d0cfbd7ed1969767d3061a7abdc05d3239ed62"
= "31cf47060757b086d325cd205724a7be8931bbbc6ff2f4be67a6179ee99c42ca"
= 75
= 85
= ""
strings:
$ps1 = "$s=New-Object \x49O.MemoryStream(,[Convert]::\x46romBase64String(" nocase
$ps2 = "));IEX (New-Object IO.StreamReader(New-Object IO.Compression.GzipStream($s,[IO.Compression.CompressionMode]::Decompress))).ReadToEnd();" nocase
condition:
all of them
}
Strings (2 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $ps1 | text | "$s=New-Object \x49O.MemoryStream(,[Convert]::\x46romBase64String(" | nocase |
| $ps2 | text | "));IEX (New-Object IO.StreamReader(New-Object IO.Compression.GzipStream($s,[IO.Compression.CompressionMode]::Decompress))).ReadToEnd();" | nocase |
Condition
all of themIn 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.
Sample hashes
Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).
- 932dec24b3863584b43caf9bb5d0cfbd7ed1969767d3061a7abdc05d3239ed62
Licence & attribution
Author: gssincla@google.com
Source repository: Google Cloud Threat Intelligence (GCTI) @ 1c5fd42b18
Licence: Apache License 2.0 (repository licence)
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: c0b81deb-ed20-5f7e-8e15-e6a9e9362594
Related rules
- Hack toolGoogle Cloud Threat Intelligence (GCTI)· gssincla@google.com· 2022-11-18
- Hack toolGoogle Cloud Threat Intelligence (GCTI)· gssincla@google.com· 2022-11-18
- Hack toolGoogle Cloud Threat Intelligence (GCTI)· gssincla@google.com· 2022-11-18
- Hack toolGoogle Cloud Threat Intelligence (GCTI)· gssincla@google.com· 2022-11-18
- Hack toolGoogle Cloud Threat Intelligence (GCTI)· gssincla@google.com· 2022-11-18
- Hack toolGoogle Cloud Threat Intelligence (GCTI)· gssincla@google.com· 2022-11-18
- Hack toolGoogle Cloud Threat Intelligence (GCTI)· gssincla@google.com· 2022-11-18
- Hack toolGoogle Cloud Threat Intelligence (GCTI)· gssincla@google.com· 2022-11-18