YARA · SEKOIA.IO Community
SEKOIA_Loader_Fakebat_Powershell_Fingerprint_May24
Finds FakeBat PowerShell script fingerprinting the infected host.
- Author
- Sekoia.io
- Date
- 2024-06-21
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
Finds FakeBat PowerShell script fingerprinting the infected host.
It defines 11 patterns (11 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
loader-fakebat-powershell-fingerprint-may24.yarDetection Rule License 1.1
rule SEKOIA_Loader_Fakebat_Powershell_Fingerprint_May24 : FILE
{
meta:
= "Finds FakeBat PowerShell script fingerprinting the infected host."
= "Sekoia.io"
= "7efcf9cf-78fe-400e-abe3-6955c394e358"
= "2024-06-21"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/loader_fakebat_powershell_fingerprint_may24.yar#L1-L27"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "04e5c888e5f71873c4fa2d732fbd8e40be3edf406300e65e489e1fa378028c5f"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$str01 = "Get-WmiObject Win32_ComputerSystem" ascii
$str02 = "-Class AntiVirusProduct" ascii
$str03 = "status = \"start\"" ascii
$str04 = " | ConvertTo-Json" ascii
$str05 = ".FromXmlString(" ascii
$str06 = " = Invoke-RestMethod -Uri " ascii
$str07 = ".Exception.Response.StatusCode -eq 'ServiceUnavailable'" ascii
$str08 = "Invoke-WebRequest -Uri $url -OutFile " ascii
$str09 = "--batch --yes --passphrase-fd" ascii
$str10 = "--decrypt --output" ascii
$str11 = "Invoke-Expression \"tar --extract --file=" ascii
condition:
7 of them and filesize < 10KB and true
}
Strings (11 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $str01 | text | "Get-WmiObject Win32_ComputerSystem" | ascii |
| $str02 | text | "-Class AntiVirusProduct" | ascii |
| $str03 | text | "status = \"start\"" | ascii |
| $str04 | text | " | ConvertTo-Json" | ascii |
| $str05 | text | ".FromXmlString(" | ascii |
| $str06 | text | " = Invoke-RestMethod -Uri " | ascii |
| $str07 | text | ".Exception.Response.StatusCode -eq 'ServiceUnavailable'" | ascii |
| $str08 | text | "Invoke-WebRequest -Uri $url -OutFile " | ascii |
| $str09 | text | "--batch --yes --passphrase-fd" | ascii |
| $str10 | text | "--decrypt --output" | ascii |
| $str11 | text | "Invoke-Expression \"tar --extract --file=" | ascii |
Condition
7 of them and filesize < 10KB and trueIn plain words (Heuristic)
- The file must be smaller than 10KB (a cheap guard that skips large files).
- At least 7 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
Licence & attribution
Author: Sekoia.io
Source repository: SEKOIA.IO Community @ a438a5901a
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: 7efcf9cf-78fe-400e-abe3-6955c394e358
Metadata
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Related rules
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-07-16
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-08-23
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-04-22
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-07-23
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-10-20
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-03-20
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-03-20
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-03-20