YARA · Signature Base (Florian Roth / Nextron)
SIGNATURE_BASE_HKTL_PS1_Powercat_Mar21
Detects PowerCat hacktool
- Author
- Florian Roth (Nextron Systems)
- Date
- 2021-03-02
- Modified
- 2023-12-05
- Score / Quality
- 75 / 85
What this rule detects
Detects PowerCat hacktool
It defines 5 patterns (5 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
hktl-ps1-powercat-mar21.yarDetection Rule License 1.1
rule SIGNATURE_BASE_HKTL_PS1_Powercat_Mar21 : FILE
{
meta:
= "Detects PowerCat hacktool"
= "Florian Roth (Nextron Systems)"
= "ae3963e8-2fe9-5bc3-bf72-95f136622832"
= "2021-03-02"
= "2023-12-05"
= "https://github.com/besimorhino/powercat"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/apt_hafnium.yar#L84-L103"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
= "c55672b5d2963969abe045fe75db52069d0300691d4f1f5923afeadf5353b9d2"
= "cbd5c6f7c5b4ed713482588ee4490a2326fe11cfaacfb3bfc6a6d94130a8bc83"
= 75
= 85
= "FILE"
strings:
$x1 = "powercat -l -p 8000 -r dns:10.1.1.1:53:c2.example.com" ascii fullword
$x2 = "try{[byte[]]$ReturnedData = $Encoding.GetBytes((IEX $CommandToExecute 2>&1 | Out-String))}" ascii fullword
$s1 = "Returning Encoded Payload..." ascii
$s2 = "$CommandToExecute =" ascii fullword
$s3 = "[alias(\"Execute\")][string]$e=\"\"," ascii
condition:
uint16( 0 ) == 0x7566 and filesize < 200KB and 1 of ( $x* ) or 3 of them
}
Strings (5 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $x1 | text | "powercat -l -p 8000 -r dns:10.1.1.1:53:c2.example.com" | ascii fullword |
| $x2 | text | "try{[byte[]]$ReturnedData = $Encoding.GetBytes((IEX $CommandToExecute 2>&1 | Out-String))}" | ascii fullword |
| $s1 | text | "Returning Encoded Payload..." | ascii |
| $s2 | text | "$CommandToExecute =" | ascii fullword |
| $s3 | text | "[alias(\"Execute\")][string]$e=\"\"," | ascii |
Condition
uint16( 0 ) == 0x7566 and filesize < 200KB and 1 of ( $x* ) or 3 of themIn plain words (Heuristic)
- The file must be smaller than 200KB (a cheap guard that skips large files).
- At least 1 patterns in ( $x* ) must match.
- At least 3 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.
References
Sample hashes
Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).
- c55672b5d2963969abe045fe75db52069d0300691d4f1f5923afeadf5353b9d2
Licence & attribution
Author: Florian Roth (Nextron Systems)
Source repository: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a
Licence: Detection Rule License 1.1 (repository licence)
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: ae3963e8-2fe9-5bc3-bf72-95f136622832
Tags:FILE
Related rules
- Hack toolSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2020-08-09
- Hack toolSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2021-09-08
- Hack toolSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2022-12-27
- Hack toolSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2022-09-15
- Hack toolSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2021-03-03
- Hack toolSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2020-04-07
- APT / threat actorSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2022-01-16
- APT / threat actorSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2022-01-16