Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Launcher_Win_Stealthmutant_Bat_Launcher

StealthMutant/StealthVector bat launcher

GenericSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X (with warnings)
Author
Sekoia.io
Date
2021-08-26
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

StealthMutant/StealthVector bat launcher

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

YARA-X says: warning[unintended_pattern_in_set]: pattern `$start` may be unintendedly or redundantly included in pattern set `$s*`

Summary generated from the rule's metadata and condition.

Rule source

launcher-win-stealthmutant-bat-launcher.yarDetection Rule License 1.1
rule SEKOIA_Launcher_Win_Stealthmutant_Bat_Launcher : FILE
{
	meta:
		description = "StealthMutant/StealthVector bat launcher"
		author = "Sekoia.io"
		id = "7452291f-2244-469e-bb7c-5eff1ca17aa2"
		date = "2021-08-26"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/launcher_win_stealthmutant_bat_launcher.yar#L1-L26"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "06ae4bc3ed938738dfca10c182a6a2363aa6aa70e730aefd41f6fe73c675785d"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$s1 = "set \"WORK_DIR=" ascii
		$s2 = "set \"DLL_NAME=" ascii
		$s3 = "set \"SERVICE_NAME=" ascii
		$s4 = "set \"DISPLAY_NAME=" ascii
		$s5 = "set \"DESCRIPTION=" ascii
		$start = "@echo off" ascii
		$end = "net start \"%SERVICE_NAME%\"" ascii

	condition:
		uint16( 0 ) != 0x5A4D and all of ( $s* ) and filesize < 2KB and $start at 0 and $end in ( filesize -30 .. filesize )
}

Strings (7 patterns)

IdentifierTypeValueModifiers
$s1text"set \"WORK_DIR="ascii
$s2text"set \"DLL_NAME="ascii
$s3text"set \"SERVICE_NAME="ascii
$s4text"set \"DISPLAY_NAME="ascii
$s5text"set \"DESCRIPTION="ascii
$starttext"@echo off"ascii
$endtext"net start \"%SERVICE_NAME%\""ascii

Condition

uint16( 0 ) != 0x5A4D and all of ( $s* ) and filesize < 2KB and $start at 0 and $end in ( filesize -30 .. filesize )

In plain words (Heuristic)

  • The file must be smaller than 2KB (a cheap guard that skips large files).
  • All patterns in ( $s* ) must match.
  • Pattern $start must be found at offset 0.
  • Pattern $end must be found within the range filesize -30 .. filesize.

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: 7452291f-2244-469e-bb7c-5eff1ca17aa2

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE