Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Loader_Fakebat_Powershell_Fingerprint_May24

Finds FakeBat PowerShell script fingerprinting the infected host.

MalwareSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X
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:
		description = "Finds FakeBat PowerShell script fingerprinting the infected host."
		author = "Sekoia.io"
		id = "7efcf9cf-78fe-400e-abe3-6955c394e358"
		date = "2024-06-21"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/loader_fakebat_powershell_fingerprint_may24.yar#L1-L27"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "04e5c888e5f71873c4fa2d732fbd8e40be3edf406300e65e489e1fa378028c5f"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "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)

IdentifierTypeValueModifiers
$str01text"Get-WmiObject Win32_ComputerSystem"ascii
$str02text"-Class AntiVirusProduct"ascii
$str03text"status = \"start\""ascii
$str04text" | ConvertTo-Json"ascii
$str05text".FromXmlString("ascii
$str06text" = Invoke-RestMethod -Uri "ascii
$str07text".Exception.Response.StatusCode -eq 'ServiceUnavailable'"ascii
$str08text"Invoke-WebRequest -Uri $url -OutFile "ascii
$str09text"--batch --yes --passphrase-fd"ascii
$str10text"--decrypt --output"ascii
$str11text"Invoke-Expression \"tar --extract --file="ascii

Condition

7 of them and filesize < 10KB and true

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

Open in editor

References

Licence & attribution

Author: Sekoia.io

Source repository: SEKOIA.IO Community @ a438a5901a

Licence: Detection Rule License 1.1 (repository licence)

Original rule

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

version1.0
classificationTLP:CLEAR

Tags:FILE