YARA · SEKOIA.IO Community
SEKOIA_Infostealer_Win_Xehook_Str
Finds XehookStealer standalone samples based on specific strings.
- Author
- Sekoia.io
- Date
- 2024-06-12
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
Finds XehookStealer standalone samples based on specific strings.
Targets: Windows PE.
It defines 17 patterns (17 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
infostealer-win-xehook-str.yarDetection Rule License 1.1
rule SEKOIA_Infostealer_Win_Xehook_Str : FILE
{
meta:
= "Finds XehookStealer standalone samples based on specific strings."
= "Sekoia.io"
= "fa76988d-f0a2-4fc2-a122-c104fd585f34"
= "2024-06-12"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/infostealer_win_xehook_str.yar#L1-L32"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "543ec3b523e5f00d3c285e453c8d11f3d5c7778b2986b7fe03f2d62ff18c2778"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$str01 = "xehook" ascii
$str02 = "Classes.LogRecord" ascii
$str03 = "__ _____| |__ ___ ___ | | __" wide
$str04 = "\\ \\/ / _ \\ '_ \\ / _ \\ / _ \\| |/ /" wide
$str05 = " > < __/ | | | (_) | (_) | <" wide
$str06 = "/_/\\_\\___|_| |_|\\___/ \\___/|_|\\_\\" wide
$str07 = "https://t.me/xehook" wide
$str08 = "About PC.txt" wide
$str09 = "Browser: {4} v{5} ({6})" wide
$str10 = "http://ip-api.com/json/?fields=11827" wide
$str11 = "{0}gate.php?id={1}&build={2}&passwords={3}&cookies={4}" wide
$str12 = "getjson.php?id=" wide
$com01 = "CheckRemoteDebuggerPresent" ascii
$com02 = "get_CurrentThread" ascii
$com03 = "get_InstalledInputLanguages" ascii
$com04 = "get_Ticks" ascii
$com05 = "System.Security.Cryptography" ascii
condition:
uint16( 0 ) == 0x5A4D and 2 of ( $str* ) and 4 of ( $com* )
}
Strings (17 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $str01 | text | "xehook" | ascii |
| $str02 | text | "Classes.LogRecord" | ascii |
| $str03 | text | "__ _____| |__ ___ ___ | | __" | wide |
| $str04 | text | "\\ \\/ / _ \\ '_ \\ / _ \\ / _ \\| |/ /" | wide |
| $str05 | text | " > < __/ | | | (_) | (_) | <" | wide |
| $str06 | text | "/_/\\_\\___|_| |_|\\___/ \\___/|_|\\_\\" | wide |
| $str07 | text | "https://t.me/xehook" | wide |
| $str08 | text | "About PC.txt" | wide |
| $str09 | text | "Browser: {4} v{5} ({6})" | wide |
| $str10 | text | "http://ip-api.com/json/?fields=11827" | wide |
| $str11 | text | "{0}gate.php?id={1}&build={2}&passwords={3}&cookies={4}" | wide |
| $str12 | text | "getjson.php?id=" | wide |
| $com01 | text | "CheckRemoteDebuggerPresent" | ascii |
| $com02 | text | "get_CurrentThread" | ascii |
| $com03 | text | "get_InstalledInputLanguages" | ascii |
| $com04 | text | "get_Ticks" | ascii |
| $com05 | text | "System.Security.Cryptography" | ascii |
Condition
uint16( 0 ) == 0x5A4D and 2 of ( $str* ) and 4 of ( $com* )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- At least 2 patterns in ( $str* ) must match.
- At least 4 patterns in ( $com* ) 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.
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: fa76988d-f0a2-4fc2-a122-c104fd585f34
Metadata
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Related rules
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-10
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-10-21
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-10-21
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-27
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-27
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-09-23
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-06-11
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2024-03-06