YARA · SEKOIA.IO Community
SEKOIA_Wiper_Win_Caddywiper
Detect CaddyWiper
- Autor
- Sekoia.io
- Fecha
- 2022-03-15
- Modificada
- 2024-12-19
- Puntuación / Calidad
- 75 / 80
Qué detecta esta regla
Detect CaddyWiper
Familia de malware asociada: Caddywiper.
Objetivos: PE de Windows.
Define 2 patrones (2 de texto, 0 hex, 0 regex). Módulos YARA usados: pe, hash.
YARA-X dice: warning[deprecated_field]: field `number_of_sections` is deprecated
Resumen generado a partir de los metadatos y la condición de la regla.
Código de la regla
Incluye los imports necesarios para compilarla por sí sola.
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" )
}
Cadenas (2 patrones)
| Identificador | Tipo | Valor | Modificadores |
|---|---|---|---|
| $ | texto | "NETAPI32.dll" | ascii |
| $ | texto | "DsRoleGetPrimaryDomainInformation" | ascii |
Condición
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 palabras sencillas (Heurística)
- El archivo debe empezar por «MZ»: un ejecutable de Windows (PE).
- El archivo debe ocupar menos de 20KB (un límite barato que descarta archivos grandes).
- El archivo debe ocupar más de 5KB.
- Deben coincidir todos los patrones de la regla.
- Un bucle for comprueba una propiedad sobre varias coincidencias o elementos.
- Usa el módulo pe.
- Usa el módulo hash.
- Compara un hash del archivo o de una parte.
- Comprueba el hash de importaciones PE (imphash).
- Comprueba secciones PE (nombres, número o propiedades).
Prueba esta regla en tu navegador
Arrastra un archivo para escanearlo con esta regla usando YARA-X compilado a WebAssembly. No se sube nada.
Referencias
Hashes de muestras
Hashes de las muestras que el autor lista en los metadatos de la regla (búscalos en tu plataforma de threat intelligence).
- b66b179eac03afafdc69f62c207819eceecfbf994c9efa464fda0d2ba44fe2d7
- ea6a416b320f32261da8dafcf2faf088924f99a3a84f7b43b964637ea87aef72
- a294620543334a721a2ae8eaaf9680a0786f4b9a216d75b55cfd28f39e9430ea
Licencia y atribución
Autor: Sekoia.io
Repositorio de origen: SEKOIA.IO Community @ a438a5901a
Licencia: Detection Rule License 1.1 (licencia del repositorio)
Obtenida a través de YARA Forge 20260927, que añade a los nombres el prefijo de la fuente y campos meta normalizados.
Id de la regla: 869d44ff-79fc-403d-a45d-d33712da5bd0
Metadatos
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Etiquetas:FILE
Reglas relacionadas
- APT / actorSEKOIA.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