YARA · SEKOIA.IO Community
SEKOIA_Apt_Darkpink_Loader_Decryptionroutine
Detects decryption routine of dark pink loader
- Auteur
- Sekoia.io
- Date
- 2023-01-17
- Modifiée
- 2024-12-19
- Score / Qualité
- 75 / 80
Ce que détecte cette règle
Detects decryption routine of dark pink loader
Famille de malware associée : Darkpink.
Cibles : PE Windows, ELF Linux.
Elle définit 1 motifs (0 texte, 1 hex, 0 regex). Modules YARA utilisés : pe, hash.
YARA-X indique : warning[deprecated_field]: field `number_of_sections` is deprecated
Résumé généré à partir des métadonnées et de la condition de la règle.
Source de la règle
Inclut les imports nécessaires pour la compiler seule.
import "pe"
import "hash"
rule SEKOIA_Apt_Darkpink_Loader_Decryptionroutine : FILE
{
meta:
= "Detects decryption routine of dark pink loader"
= "Sekoia.io"
= "fefc7b2f-eecc-49dc-84bc-24c45e9ea8f0"
= "2023-01-17"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/apt_darkpink_loader_decryptionroutine.yar#L4-L49"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "3f38860d0f6f0ff1b65219379f8793383cba85b11de1c853192fb2d2ba99e481"
= "b3f1d6366ebc184f634a240c838b39d729c28b8718b0b9ca6be988a7e446ec42"
= "fe2726b77c293fc2aa19216025cfa2b4cd0c5194730cbc57a1fcceb6f6198977"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$chunk_1 = {
8A 08
40
84 C9
75 ??
6A 00
2B C2
50
53
56
E8 ?? ?? ?? ??
8A 88 ?? ?? ?? ??
30 0C 3E
83 C6 01
83 D3 00
78 ??
7F ??
81 FE ?? ?? ?? ??
72 ??
55
}
condition:
( uint32be( 0 ) == 0x7f454c46 or uint16be( 0 ) == 0x4d5a ) and filesize < 3MB and ( all of them or hash.md5 ( pe.rich_signature.clear_data ) == "950c0710dc4cbf6e2cd6b857d25da523" or for any i in ( 0 .. pe.number_of_sections -1 ) : ( hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "547e43dd8560fa8b0ca0be9f633bf62d" ) )
}
Chaînes (1 motifs)
| Identifiant | Type | Valeur | Modificateurs |
|---|---|---|---|
| $chunk_1 | hex | { 8A 08 40 84 C9 75 ?? 6A 00 2B C2 50 53 56 E8 ?? ?? ?? ?? 8A 88 ?? ?? ? … |
Condition
( uint32be( 0 ) == 0x7f454c46 or uint16be( 0 ) == 0x4d5a ) and filesize < 3MB and ( all of them or hash.md5 ( pe.rich_signature.clear_data ) == "950c0710dc4cbf6e2cd6b857d25da523" or for any i in ( 0 .. pe.number_of_sections -1 ) : ( hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "547e43dd8560fa8b0ca0be9f633bf62d" ) )En clair (Heuristique)
- Le fichier doit commencer par « MZ » — un exécutable Windows (PE).
- Le fichier doit commencer par l’en-tête ELF — un exécutable Linux/Unix.
- Le fichier doit faire moins de 3MB (garde-fou peu coûteux qui écarte les gros fichiers).
- Tous les motifs de la règle doivent être trouvés.
- Une boucle for vérifie une propriété sur plusieurs occurrences ou éléments.
- Utilise le module hash.
- Utilise le module pe.
- Compare un hash du fichier ou d’une partie du fichier.
- Vérifie les sections PE (noms, nombre ou propriétés).
Tester cette règle dans votre navigateur
Déposez un fichier pour le scanner avec cette règle grâce à YARA-X compilé en WebAssembly. Rien n’est envoyé.
Références
Hashes d’échantillons
Hashes des échantillons listés par l’auteur dans les métadonnées de la règle (à rechercher dans votre plateforme de threat intelligence).
- 3f38860d0f6f0ff1b65219379f8793383cba85b11de1c853192fb2d2ba99e481
- b3f1d6366ebc184f634a240c838b39d729c28b8718b0b9ca6be988a7e446ec42
Licence et attribution
Auteur : Sekoia.io
Dépôt source : SEKOIA.IO Community @ a438a5901a
Licence : Detection Rule License 1.1 (licence du dépôt)
Reprise via YARA Forge 20260927, qui préfixe les noms de règles par la source et ajoute des champs meta normalisés.
Identifiant de règle: fefc7b2f-eecc-49dc-84bc-24c45e9ea8f0
Métadonnées
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Règles liées
- APT / acteurSEKOIA.IO Community· Sekoia.io· 2023-02-22
- APT / acteurSEKOIA.IO Community· Sekoia.io· 2023-06-05
- APT / acteurSEKOIA.IO Community· Sekoia.io· 2023-01-16
- MalwareMalpedia signator rules· Felix Bilstein - yara-signator at cocacoding dot com· 2024-10-31
- APT / acteurSEKOIA.IO Community· Sekoia.io· 2024-09-10
- APT / acteurSEKOIA.IO Community· Sekoia.io· 2024-10-21
- APT / acteurSEKOIA.IO Community· Sekoia.io· 2024-10-21
- APT / acteurSEKOIA.IO Community· Sekoia.io· 2024-09-27