YARA · SEKOIA.IO Community
SEKOIA_Apt_Darkpink_Sample
Detects two parts of cmd.exe /c
- Author
- Sekoia.io
- Date
- 2023-06-05
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
Detects two parts of cmd.exe /c
Associated malware family: Darkpink.
Targets: Windows PE, Linux ELF.
It defines 2 patterns (0 text, 2 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
apt-darkpink-sample.yarDetection Rule License 1.1
rule SEKOIA_Apt_Darkpink_Sample : FILE
{
meta:
= "Detects two parts of cmd.exe /c "
= "Sekoia.io"
= "91b4c64a-7622-4f03-bd3f-9fe56f01dfbe"
= "2023-06-05"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/apt_darkpink_sample.yar#L1-L19"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "8dc3f6179120f03fd6cb2299dbc94425451d84d6852b801a313a39e9df5d9b1a"
= "c9d3952036bffe2d924ea553fd53f8b6f0b3f16f1060fbde69496c800d4d5ad9"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$cmd_xor_part_1 = {DF 00 A1 00 E4 00 F0 00 4B 00 3A 00 D1 00 C4 00}
$cmd_xor_part_2 = {bc 00 cc 00 80 00 d0 00 64 00 59 00 F1 00 E6 00 FD 00 83 00 C6}
condition:
( uint32be( 0 ) == 0x7f454c46 or uint16be( 0 ) == 0x4d5a ) and filesize < 1MB and all of them
}
Strings (2 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $cmd_xor_part_1 | hex | {DF 00 A1 00 E4 00 F0 00 4B 00 3A 00 D1 00 C4 00} | |
| $cmd_xor_part_2 | hex | {bc 00 cc 00 80 00 d0 00 64 00 59 00 F1 00 E6 00 FD 00 83 00 C6} |
Condition
( uint32be( 0 ) == 0x7f454c46 or uint16be( 0 ) == 0x4d5a ) and filesize < 1MB and all of themIn plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- The file must start with the ELF header — a Linux/Unix executable.
- The file must be smaller than 1MB (a cheap guard that skips large files).
- All 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
Sample hashes
Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).
- 8dc3f6179120f03fd6cb2299dbc94425451d84d6852b801a313a39e9df5d9b1a
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: 91b4c64a-7622-4f03-bd3f-9fe56f01dfbe
Metadata
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Related rules
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2023-02-22
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2023-01-16
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2023-01-17
- MalwareMalpedia signator rules· Felix Bilstein - yara-signator at cocacoding dot com· 2024-10-31
- 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