YARA · SEKOIA.IO Community
SEKOIA_Wiper_Win_Caddywiper
Detect CaddyWiper
- Auteur
- Sekoia.io
- Date
- 2022-03-15
- Modifiée
- 2024-12-19
- Score / Qualité
- 75 / 80
Ce que détecte cette règle
Detect CaddyWiper
Famille de malware associée : Caddywiper.
Cibles : PE Windows.
Elle définit 2 motifs (2 texte, 0 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_Wiper_Win_Caddywiper : FILE
{
meta:
= "Detect CaddyWiper"
= "Sekoia.io"
= "869d44ff-79fc-403d-a45d-d33712da5bd0"
= "2022-03-15"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/wiper_win_caddywiper.yar#L4-L37"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "b66b179eac03afafdc69f62c207819eceecfbf994c9efa464fda0d2ba44fe2d7"
= "ea6a416b320f32261da8dafcf2faf088924f99a3a84f7b43b964637ea87aef72"
= "a294620543334a721a2ae8eaaf9680a0786f4b9a216d75b55cfd28f39e9430ea"
= "01a9910b42f402398bbe84546074256f56b10fe0f8524a9a9723aebe43b26a14"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$ = "NETAPI32.dll" ascii
$ = "DsRoleGetPrimaryDomainInformation" ascii
condition:
uint16( 0 ) == 0x5A4D and filesize > 5KB and filesize < 20KB and pe.number_of_sections == 3 and pe.number_of_resources == 0 and all of them or pe.imphash ( ) == "ea8609d4dad999f73ec4b6f8e7b28e55" or pe.imphash ( ) == "bae2d138abe43164fb5e95f313de3d14" 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 ) == "f0d4c11521fc3891965534e6c52e128b" or hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "6be6e878d1e8fed277c5feaf60b57a19" or hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "11f22fc72c3ca7dd6b874bda37c1fe82" )
}
Chaînes (2 motifs)
| Identifiant | Type | Valeur | Modificateurs |
|---|---|---|---|
| $ | texte | "NETAPI32.dll" | ascii |
| $ | texte | "DsRoleGetPrimaryDomainInformation" | ascii |
Condition
uint16( 0 ) == 0x5A4D and filesize > 5KB and filesize < 20KB and pe.number_of_sections == 3 and pe.number_of_resources == 0 and all of them or pe.imphash ( ) == "ea8609d4dad999f73ec4b6f8e7b28e55" or pe.imphash ( ) == "bae2d138abe43164fb5e95f313de3d14" 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 ) == "f0d4c11521fc3891965534e6c52e128b" or hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "6be6e878d1e8fed277c5feaf60b57a19" or hash.md5 ( pe.sections [ i ] . raw_data_offset , pe.sections [ i ] . raw_data_size ) == "11f22fc72c3ca7dd6b874bda37c1fe82" )En clair (Heuristique)
- Le fichier doit commencer par « MZ » — un exécutable Windows (PE).
- Le fichier doit faire moins de 20KB (garde-fou peu coûteux qui écarte les gros fichiers).
- Le fichier doit faire plus de 5KB.
- 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 pe.
- Utilise le module hash.
- Compare un hash du fichier ou d’une partie du fichier.
- Vérifie le hash des imports PE (imphash).
- 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).
- b66b179eac03afafdc69f62c207819eceecfbf994c9efa464fda0d2ba44fe2d7
- ea6a416b320f32261da8dafcf2faf088924f99a3a84f7b43b964637ea87aef72
- a294620543334a721a2ae8eaaf9680a0786f4b9a216d75b55cfd28f39e9430ea
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: 869d44ff-79fc-403d-a45d-d33712da5bd0
Métadonnées
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Règles liées
- APT / acteurSEKOIA.IO Community· Sekoia.io· 2022-04-06
- MalwareSignature Base (Florian Roth / Nextron)· Florian Roth (Nextron Systems)· 2022-03-15
- 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