YARA · SEKOIA.IO Community
SEKOIA_Infostealer_Win_Mars_Stealer_Xor_Routine
Detect Mars Stealer based on a specific XOR routine
- Author
- Sekoia.io
- Date
- 2022-04-06
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
Detect Mars Stealer based on a specific XOR routine
Associated malware family: Mars Stealer.
Targets: Windows PE.
It defines 1 patterns (0 text, 1 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
infostealer-win-mars-stealer-xor-routine.yarDetection Rule License 1.1
rule SEKOIA_Infostealer_Win_Mars_Stealer_Xor_Routine : FILE
{
meta:
= "Detect Mars Stealer based on a specific XOR routine"
= "Sekoia.io"
= "3e2c7440b2fc9e4b039e6fa8152ac8ff"
= "2022-04-06"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/infostealer_win_mars_stealer_xor_routine.yar#L1-L15"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "c7e65550a225431552e8a81bbce81dd66350021b6444c94fe7a37aa96712e9b1"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$xor = {8b 4d ?? 03 4d ?? 0f be 19 8b 55 ?? 52 e8 ?? ?? ?? ?? 83 c4 ?? 8b c8 8b 45 ?? 33 d2 f7 f1 8b 45 ?? 0f be 0c 10 33 d9 8b 55 ?? 03 55 ?? 88 1a eb be}
condition:
uint16( 0 ) == 0x5A4D and $xor
}
Strings (1 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $xor | hex | {8b 4d ?? 03 4d ?? 0f be 19 8b 55 ?? 52 e8 ?? ?? ?? ?? 83 c4 ?? 8b c8 8b 45 ?? 33 d2 f7 f1 8b 45 ?? 0f be 0c 10 33 d9 8b 55 ?? 03 55 ?? 88 1a eb be} |
Condition
uint16( 0 ) == 0x5A4D and $xorIn plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- Pattern $xor must be present.
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: 3e2c7440b2fc9e4b039e6fa8152ac8ff
Metadata
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Related rules
- MalwareSEKOIA.IO Community· Sekoia.io· 2022-03-10
- MalwareSEKOIA.IO Community· Sekoia.io· 2022-02-03
- MalwareMalpedia signator rules· Felix Bilstein - yara-signator at cocacoding dot com· 2026-05-04
- MalwareEmbee Research· Matthew @ Embee_Research· 2023-12-24
- 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