YARA · elceef yara-rulz
ELCEEF_Polymorph_BAT_CAB
Detects polymorphic BAT/CAB files self-extracting payload with extrac32.exe/extract.exe
- Author
- marcin@ulikowski.pl
- Date
- 2024-04-10
- Score / Quality
- 75 / 75
What this rule detects
Detects polymorphic BAT/CAB files self-extracting payload with extrac32.exe/extract.exe
It defines 1 patterns (0 text, 1 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
rule ELCEEF_Polymorph_BAT_CAB : FILE
{
meta:
= "Detects polymorphic BAT/CAB files self-extracting payload with extrac32.exe/extract.exe"
= "marcin@ulikowski.pl"
= "10a46120-beaf-5443-bc35-c6d9ef065bb4"
= "2024-04-10"
= "2024-04-10"
= "https://github.com/elceef/yara-rulz"
= "https://github.com/elceef/yara-rulz/blob/5683b294a12cf0c875b624933586029ae43a852f/rules/Suspicious_BAT.yara#L57-L72"
= "https://github.com/elceef/yara-rulz/blob/5683b294a12cf0c875b624933586029ae43a852f/LICENSE"
= "f1296b12925108a5d675a8b9c2033c0b749b121ae3b5a6a912ce4418daa06d99"
= "d29d488b0ebcfb485818c181ac674e3586aa1a41ab68185a1f1d3e49295ffbce"
= 75
= 75
= "FILE"
strings:
$extract = { 65 78 74 72 61 63 ( 33 32 | 74 ) 20 2f 79 20 22 25 7e 66 30 22 }
condition:
uint32be( 0 ) == 0x4d534346 and uint32( 16 ) > 80 and $extract in ( 48 .. 80 )
}
Strings (1 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $extract | hex | { 65 78 74 72 61 63 ( 33 32 | 74 ) 20 2f 79 20 22 25 7e 66 30 22 } |
Condition
uint32be( 0 ) == 0x4d534346 and uint32( 16 ) > 80 and $extract in ( 48 .. 80 )In plain words (Heuristic)
- Pattern $extract must be found within the range 48 .. 80.
Test this rule in your browser
Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.
References
Sample hashes
Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).
- f1296b12925108a5d675a8b9c2033c0b749b121ae3b5a6a912ce4418daa06d99
Licence & attribution
Author: marcin@ulikowski.pl
Source repository: elceef yara-rulz @ 5683b294a1
Licence: MIT License (repository licence)
Copyright notice: Copyright (c) 2022 Marcin Ulikowski
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: 10a46120-beaf-5443-bc35-c6d9ef065bb4
Tags:FILE
Related rules
- Exploitelceef yara-rulz· marcin@ulikowski.pl· 2025-08-18
- Genericelceef yara-rulz· marcin@ulikowski.pl· 2023-05-05
- Suspicious / huntingelceef yara-rulz· marcin@ulikowski.pl· 2023-05-01
- Genericelceef yara-rulz· marcin@ulikowski.pl· 2023-04-17
- Exploitelceef yara-rulz· marcin@ulikowski.pl· 2023-09-23
- Genericelceef yara-rulz· marcin@ulikowski.pl· 2023-03-08
- Genericelceef yara-rulz· marcin@ulikowski.pl· 2022-10-25
- Genericelceef yara-rulz· marcin@ulikowski.pl· 2022-12-02