Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Backdoor_Powershellempire_Batlauchers

Detect BAT launchers for Empire

MalwareSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X
Author
Sekoia.io
Date
2022-04-15
Modified
2024-12-19
Score / Quality
75 / 74

What this rule detects

Detect BAT launchers for Empire

It defines 3 patterns (3 text, 0 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

backdoor-powershellempire-batlauchers.yarDetection Rule License 1.1
rule SEKOIA_Backdoor_Powershellempire_Batlauchers : FILE
{
	meta:
		description = "Detect BAT launchers for Empire"
		author = "Sekoia.io"
		id = "ad371665-ec59-45c8-9d99-2a675842c384"
		date = "2022-04-15"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/backdoor_powershellempire_batlauchers.yar#L1-L17"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "0453c739ad936b0cc5ed2e36ba4a011a90600b74ca23c08165c23a3e63fe60e9"
		score = 75
		quality = 74
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$ = "powershell -noP -sta -w 1 -enc  SQB" nocase wide ascii
		$ = "powershell -ep bypass -noP -sta -w 1 -enc SQB" nocase wide ascii
		$ = "-nol -nop -ep bypass \"[IO.File]::ReadAllText('%~f0')|iex" nocase wide ascii

	condition:
		any of them and filesize < 1MB
}

Strings (3 patterns)

IdentifierTypeValueModifiers
$text"powershell -noP -sta -w 1 -enc SQB"nocase wide ascii
$text"powershell -ep bypass -noP -sta -w 1 -enc SQB"nocase wide ascii
$text"-nol -nop -ep bypass \"[IO.File]::ReadAllText('%~f0')|iex"nocase wide ascii

Condition

any of them and filesize < 1MB

In plain words (Heuristic)

  • The file must be smaller than 1MB (a cheap guard that skips large files).
  • At least one pattern 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: ad371665-ec59-45c8-9d99-2a675842c384

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE