YARA · SEKOIA.IO Community
SEKOIA_Rat_Win_Ratel_Strings
Detect RATel based on characteristic strings
- Author
- Sekoia.io
- Date
- 2023-04-24
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
Detect RATel based on characteristic strings
Associated malware family: Ratel.
Targets: Windows PE.
It defines 12 patterns (12 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
rat-win-ratel-strings.yarDetection Rule License 1.1
rule SEKOIA_Rat_Win_Ratel_Strings : FILE
{
meta:
= "Detect RATel based on characteristic strings"
= "Sekoia.io"
= "d0c8b89b-c811-47aa-9e03-717998c40d91"
= "2023-04-24"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/rat_win_ratel_strings.yar#L1-L28"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "ff5640b03ec3e535cdb86c2a0feb52d0c472928ff88a36ec9f66ac8aa07c9f69"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$s1 = "[-] Error when changing folder." ascii
$s2 = "cmd.exe" wide
$s3 = "back slash find: " ascii
$s4 = "MOD_ALL:" wide
$s5 = "MOD_PERSISTENCE" wide
$s6 = "MOD_DESTRUCTION:" wide
$s7 = "MOD_RECONNECT" wide
$s8 = "Software\\Microsoft\\Windows\\CurrentVersion\\Run" wide
$s9 = "powershell.exe -command \"([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')\"" wide
$s10 = "The command was executed successfully but no data was returned."
$s11 = "[-] TIMEOUT IN CREATEPROCESS, but all the processes in the name of: " ascii
$s12 = "we were well and truly killed." ascii
condition:
( uint16be( 0 ) == 0x4d5a ) and filesize > 500KB and filesize < 3MB and 8 of them
}
Strings (12 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "[-] Error when changing folder." | ascii |
| $s2 | text | "cmd.exe" | wide |
| $s3 | text | "back slash find: " | ascii |
| $s4 | text | "MOD_ALL:" | wide |
| $s5 | text | "MOD_PERSISTENCE" | wide |
| $s6 | text | "MOD_DESTRUCTION:" | wide |
| $s7 | text | "MOD_RECONNECT" | wide |
| $s8 | text | "Software\\Microsoft\\Windows\\CurrentVersion\\Run" | wide |
| $s9 | text | "powershell.exe -command \"([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltI … | wide |
| $s10 | text | "The command was executed successfully but no data was returned." | |
| $s11 | text | "[-] TIMEOUT IN CREATEPROCESS, but all the processes in the name of: " | ascii |
| $s12 | text | "we were well and truly killed." | ascii |
Condition
( uint16be( 0 ) == 0x4d5a ) and filesize > 500KB and filesize < 3MB and 8 of themIn plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- The file must be smaller than 3MB (a cheap guard that skips large files).
- The file must be larger than 500KB.
- At least 8 patterns in the rule 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: d0c8b89b-c811-47aa-9e03-717998c40d91
Metadata
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Related rules
- MalwareMalpedia signator rules· Felix Bilstein - yara-signator at cocacoding dot com· 2026-05-04
- Hack toolSignature Base (Florian Roth / Nextron)· Matthew @embee_research, Florian Roth· 2022-10-12
- 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
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-10-20
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-03-20