YARA · SEKOIA.IO Community
SEKOIA_Tool_Masky_Strings
Detects Masky tool
- Author
- Sekoia.io
- Date
- 2022-08-23
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
Detects Masky tool
Targets: Windows PE.
It defines 5 patterns (5 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
tool-masky-strings.yarDetection Rule License 1.1
rule SEKOIA_Tool_Masky_Strings : FILE
{
meta:
= "Detects Masky tool"
= "Sekoia.io"
= "542670ee-9f2e-4148-853d-a3f055bd584c"
= "2022-08-23"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/tool_masky_strings.yar#L1-L21"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "35dc536879d9464919028ace6b65b225455621035184d7b58468d259ccda62aa"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$s1 = "caa1aa2e-8a2a-4f98-bc51-b7cf10663fa9" ascii
$s2 = "Masky" ascii
$s3 = "\\Windows\\Temp\\" wide
$s4 = "Length must be non-negative" wide
$s5 = "CSP does not contain a private key" wide
condition:
uint16be( 0 ) == 0x4d5a and filesize < 1MB and 4 of them or $s1
}
Strings (5 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "caa1aa2e-8a2a-4f98-bc51-b7cf10663fa9" | ascii |
| $s2 | text | "Masky" | ascii |
| $s3 | text | "\\Windows\\Temp\\" | wide |
| $s4 | text | "Length must be non-negative" | wide |
| $s5 | text | "CSP does not contain a private key" | wide |
Condition
uint16be( 0 ) == 0x4d5a and filesize < 1MB and 4 of them or $s1In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- The file must be smaller than 1MB (a cheap guard that skips large files).
- At least 4 patterns in the rule must match.
- Pattern $s1 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: 542670ee-9f2e-4148-853d-a3f055bd584c
Metadata
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Related rules
- Hack toolSEKOIA.IO Community· Sekoia.io· 2024-09-06
- Hack toolSEKOIA.IO Community· Sekoia.io· 2024-02-29
- Hack toolSEKOIA.IO Community· Sekoia.io· 2023-12-05
- Hack toolSEKOIA.IO Community· Sekoia.io· 2023-11-15
- Hack toolSEKOIA.IO Community· Sekoia.io· 2023-08-23
- Hack toolSEKOIA.IO Community· Sekoia.io· 2022-02-08
- Hack toolSEKOIA.IO Community· Sekoia.io· 2022-07-22
- Hack toolSEKOIA.IO Community· Sekoia.io· 2022-09-09