YARA · Signature Base (Florian Roth / Nextron)
SIGNATURE_BASE_APT_HAFNIUM_Forensicartefacts_Cab_Recon_Mar21_1
Detects suspicious CAB files used by HAFNIUM for recon activity
APT / threat actorSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
- Author
- Florian Roth (Nextron Systems)
- Date
- 2021-03-11
- Modified
- 2023-12-05
- Score / Quality
- 70 / 85
What this rule detects
Detects suspicious CAB files used by HAFNIUM for recon activity
It defines 4 patterns (4 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
apt-hafnium-forensicartefacts-cab-recon-mar21-1.yarDetection Rule License 1.1
rule SIGNATURE_BASE_APT_HAFNIUM_Forensicartefacts_Cab_Recon_Mar21_1 : FILE
{
meta:
= "Detects suspicious CAB files used by HAFNIUM for recon activity"
= "Florian Roth (Nextron Systems)"
= "b0caf9d9-af0a-5181-85e4-6091cd6699e3"
= "2021-03-11"
= "2023-12-05"
= "https://discuss.elastic.co/t/detection-and-response-for-hafnium-activity/266289/3?u=dstepanic"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/apt_hafnium.yar#L252-L273"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
= "de3acb2d01ad14d73263af9e62ef7c715cde259e3f2fbbcbbb41d55589c3f0ab"
= 70
= 85
= "FILE"
strings:
$s1 = "ip.txt" ascii fullword
$s2 = "arp.txt" ascii fullword
$s3 = "system" ascii fullword
$s4 = "security" ascii fullword
condition:
uint32( 0 ) == 0x4643534d and filesize < 10000KB and ( $s1 in ( 0 .. 200 ) and $s2 in ( 0 .. 200 ) and $s3 in ( 0 .. 200 ) and $s4 in ( 0 .. 200 ) )
}
Strings (4 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "ip.txt" | ascii fullword |
| $s2 | text | "arp.txt" | ascii fullword |
| $s3 | text | "system" | ascii fullword |
| $s4 | text | "security" | ascii fullword |
Condition
uint32( 0 ) == 0x4643534d and filesize < 10000KB and ( $s1 in ( 0 .. 200 ) and $s2 in ( 0 .. 200 ) and $s3 in ( 0 .. 200 ) and $s4 in ( 0 .. 200 ) )In plain words (Heuristic)
- The file must be smaller than 10000KB (a cheap guard that skips large files).
- Pattern $s1 must be found within the range 0 .. 200.
- Pattern $s2 must be found within the range 0 .. 200.
- Pattern $s3 must be found within the range 0 .. 200.
- Pattern $s4 must be found within the range 0 .. 200.
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.
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: b0caf9d9-af0a-5181-85e4-6091cd6699e3
Tags:FILE
Related rules
- 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
- APT / threat actorSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2022-02-25
- APT / threat actorSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2023-03-31
- APT / threat actorSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2022-10-25
- 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-02-25
- APT / threat actorSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2022-02-24