YARA · SEKOIA.IO Community
SEKOIA_Infostealer_Win_Mars_Stealer
Detect Mars Stealer based on specific strings
- Autor
- Sekoia.io
- Datum
- 2022-02-03
- Geändert
- 2024-12-19
- Score / Qualität
- 75 / 80
Was diese Regel erkennt
Detect Mars Stealer based on specific strings
Zugehörige Malware-Familie: Mars Stealer.
Ziele: Windows-PE.
Sie definiert 18 Muster (17 Text, 1 Hex, 0 Regex). Verwendete YARA-Module: pe.
YARA-X meldet: warning[deprecated_field]: field `number_of_sections` is deprecated
Zusammenfassung aus den Metadaten und der Bedingung der Regel erzeugt.
Regelquelltext
Enthält die Imports, die zum eigenständigen Kompilieren nötig sind.
import "pe"
rule SEKOIA_Infostealer_Win_Mars_Stealer : FILE
{
meta:
= "Detect Mars Stealer based on specific strings"
= "Sekoia.io"
= "3e2c7440b2fc9e4b039e6fa8152ac8fd"
= "2022-02-03"
= "2024-12-19"
= "https://3xp0rt.com/posts/mars-stealer"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/infostealer_win_mars_stealer.yar#L3-L44"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "b2b36a280c3c6cbbb8cbb9f1dd3eb48a4943ebbddb48eba2ac3d0db03924cafd"
= 75
= 80
= "FILE"
= "1.0"
= "2022-02-14"
= "TLP:CLEAR"
strings:
$dec = {a3 ?? ?? ?? ?? 68 ?? ?? ?? ?? e8 ?? ?? 00 00 83 c4 ??}
$api00 = "LoadLibrary" ascii
$api01 = "GetProcAddress" ascii
$api02 = "ExitProcess" ascii
$api03 = "advapi32.dll" ascii
$api04 = "crypt32.dll" ascii
$api05 = "GetTickCount" ascii
$api06 = "Sleep" ascii
$api07 = "GetUserDefaultLangID" ascii
$api08 = "CreateMutex" ascii
$api09 = "GetLastError" ascii
$api10 = "HeapAlloc" ascii
$api11 = "GetProcessHeap" ascii
$api12 = "GetComputerName" ascii
$api13 = "VirtualProtect" ascii
$api14 = "GetUserName" ascii
$api15 = "CryptStringToBinary" ascii
$str0 = "JohnDoe" ascii
condition:
uint16( 0 ) == 0x5A4D and ( #dec > 400 and 12 of ( $api* ) and $str0 ) or for any i in ( 0 .. pe.number_of_sections -1 ) : ( pe.sections [ i ] . name == "LLCPPC" and pe.sections [ i ] . raw_data_size < 5000 )
}
Strings (18 Muster)
| Bezeichner | Typ | Wert | Modifikatoren |
|---|---|---|---|
| $dec | Hex | {a3 ?? ?? ?? ?? 68 ?? ?? ?? ?? e8 ?? ?? 00 00 83 c4 ??} | |
| $api00 | Text | "LoadLibrary" | ascii |
| $api01 | Text | "GetProcAddress" | ascii |
| $api02 | Text | "ExitProcess" | ascii |
| $api03 | Text | "advapi32.dll" | ascii |
| $api04 | Text | "crypt32.dll" | ascii |
| $api05 | Text | "GetTickCount" | ascii |
| $api06 | Text | "Sleep" | ascii |
| $api07 | Text | "GetUserDefaultLangID" | ascii |
| $api08 | Text | "CreateMutex" | ascii |
| $api09 | Text | "GetLastError" | ascii |
| $api10 | Text | "HeapAlloc" | ascii |
| $api11 | Text | "GetProcessHeap" | ascii |
| $api12 | Text | "GetComputerName" | ascii |
| $api13 | Text | "VirtualProtect" | ascii |
| $api14 | Text | "GetUserName" | ascii |
| $api15 | Text | "CryptStringToBinary" | ascii |
| $str0 | Text | "JohnDoe" | ascii |
Bedingung
uint16( 0 ) == 0x5A4D and ( #dec > 400 and 12 of ( $api* ) and $str0 ) or for any i in ( 0 .. pe.number_of_sections -1 ) : ( pe.sections [ i ] . name == "LLCPPC" and pe.sections [ i ] . raw_data_size < 5000 )In Worten (Heuristik)
- Die Datei muss mit „MZ“ beginnen — eine Windows-Programmdatei (PE).
- Mindestens 12 Muster aus ( $api* ) müssen treffen.
- Muster $dec muss > 400-mal vorkommen.
- Eine for-Schleife prüft eine Eigenschaft über mehrere Treffer oder Elemente.
- Muster $str0 muss vorhanden sein.
- Nutzt das Modul pe.
- Prüft PE-Sektionen (Namen, Anzahl oder Eigenschaften).
Diese Regel im Browser testen
Legen Sie eine Datei ab, um sie mit dieser Regel und YARA-X als WebAssembly zu scannen. Nichts wird hochgeladen.
Referenzen
Lizenz & Namensnennung
Autor: Sekoia.io
Quell-Repository: SEKOIA.IO Community @ a438a5901a
Lizenz: Detection Rule License 1.1 (Repository-Lizenz)
Gespiegelt über YARA Forge 20260927, das Regelnamen mit der Quelle präfixiert und normalisierte Meta-Felder ergänzt.
Regel-ID: 3e2c7440b2fc9e4b039e6fa8152ac8fd
Metadaten
| version | 1.0 |
|---|---|
| modification_date | 2022-02-14 |
| classification | TLP:CLEAR |
Tags:FILE
Verwandte Regeln
- MalwareSEKOIA.IO Community· Sekoia.io· 2022-03-10
- MalwareSEKOIA.IO Community· Sekoia.io· 2022-04-06
- 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