YARA · SEKOIA.IO Community
SEKOIA_Backdoor_Win_Ketrum2
Detect Ke3chang's Ketrum backdoor version 2
- Author
- Sekoia.io
- Date
- 2022-10-19
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
Detect Ke3chang's Ketrum backdoor version 2
Associated malware family: Ketrum.
Targets: Windows PE.
It defines 8 patterns (8 text, 0 hex, 0 regex). YARA modules used: pe, hash.
YARA-X says: warning[deprecated_field]: field `number_of_resources` is deprecated
Summary generated from the rule's metadata and condition.
Rule source
Includes the imports needed to compile it on its own.
import "pe"
import "hash"
rule SEKOIA_Backdoor_Win_Ketrum2
{
meta:
= "Detect Ke3chang's Ketrum backdoor version 2"
= "Sekoia.io"
= "afcc349a-d44b-4b66-b86f-c62e700fa899"
= "2022-10-19"
= "2024-12-19"
= "https://www.intezer.com/blog/research/the-evolution-of-apt15s-codebase-2020/"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/backdoor_win_ketrum2.yar#L4-L35"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "271384a078f2a2f58e14d7703febae8a28c6e2d7ddb00a3c8d3eead4ea87a0c0"
= "aa467945dd7b9b095e592fc96384bb385f2c95d00d5424e42bb6ab09827cb0ce"
= "aacaf0d4729dd6fda2e452be763d209f92d107ecf24d8a341947c545de9b7311"
= "ac5cb6e17f094068686225075251153e3eb21dc2d1ae744a97ab113cab034a36"
= "5317b133337ad333c97bbfa6c9d62aea5fd81f3b570f1d6b1ac93ea82062ef61"
= 75
= 80
= ""
= "1.0"
= "TLP:CLEAR"
strings:
$ = "powershell.exe" wide
$ = "cmd.exe" wide
$ = "%s\\adult.sft" wide
$ = "%s\\Notice" wide
$ = "%s\\Message" wide
$ = "\\Microsoft\\Media Player" wide
$ = "Windows\\CurrentVersion\\Explorer\\Shell Folders" wide ascii
$ = "Windows\\CurrentVersion\\Internet Settings" wide ascii
condition:
all of them and for any i in ( 0 .. pe.number_of_resources -1 ) : ( hash.sha256 ( pe.resources [ i ] . offset , pe.resources [ i ] . length ) == "49a60be4b95b6d30da355a0c124af82b35000bce8f24f957d1c09ead47544a1e" )
}
Strings (8 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $ | text | "powershell.exe" | wide |
| $ | text | "cmd.exe" | wide |
| $ | text | "%s\\adult.sft" | wide |
| $ | text | "%s\\Notice" | wide |
| $ | text | "%s\\Message" | wide |
| $ | text | "\\Microsoft\\Media Player" | wide |
| $ | text | "Windows\\CurrentVersion\\Explorer\\Shell Folders" | wide ascii |
| $ | text | "Windows\\CurrentVersion\\Internet Settings" | wide ascii |
Condition
all of them and for any i in ( 0 .. pe.number_of_resources -1 ) : ( hash.sha256 ( pe.resources [ i ] . offset , pe.resources [ i ] . length ) == "49a60be4b95b6d30da355a0c124af82b35000bce8f24f957d1c09ead47544a1e" )In plain words (Heuristic)
- All patterns in the rule must match.
- A for-loop checks a property over several matches or items.
- Uses the pe module.
- Uses the hash module.
- Compares a hash of the file or a part of it.
Test this rule in your browser
Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.
Sample hashes
Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).
- 271384a078f2a2f58e14d7703febae8a28c6e2d7ddb00a3c8d3eead4ea87a0c0
- aa467945dd7b9b095e592fc96384bb385f2c95d00d5424e42bb6ab09827cb0ce
- aacaf0d4729dd6fda2e452be763d209f92d107ecf24d8a341947c545de9b7311
- ac5cb6e17f094068686225075251153e3eb21dc2d1ae744a97ab113cab034a36
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: afcc349a-d44b-4b66-b86f-c62e700fa899
Metadata
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Related rules
- MalwareMalpedia signator rules· Felix Bilstein - yara-signator at cocacoding dot com· 2026-05-04
- 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
- MalwareSEKOIA.IO Community· Sekoia.io· 2024-03-20