Saltar al contenido

YARA · elceef yara-rulz

ELCEEF_EICAR_Encrypted_ZIP

Detects EICAR file in any encrypted ZIP archive

Genéricaelceef yara-rulzMIT LicenseCompila con YARA-X (con avisos)
Autor
marcin@ulikowski.pl
Fecha
2022-12-13
Modificada
2022-12-16
Puntuación / Calidad
75 / 75

Qué detecta esta regla

Detects EICAR file in any encrypted ZIP archive

Define 1 patrones (0 de texto, 1 hex, 0 regex).

YARA-X dice: warning[potentially_slow_loop]: potentially slow loop

Resumen generado a partir de los metadatos y la condición de la regla.

Código de la regla

eicar-encrypted-zip.yarMIT License
rule ELCEEF_EICAR_Encrypted_ZIP
{
	meta:
		description = "Detects EICAR file in any encrypted ZIP archive"
		author = "marcin@ulikowski.pl"
		id = "c12d42de-356a-584b-9c48-71e65940f1cf"
		date = "2022-12-13"
		modified = "2022-12-16"
		reference = "https://github.com/elceef/yara-rulz"
		source_url = "https://github.com/elceef/yara-rulz/blob/5683b294a12cf0c875b624933586029ae43a852f/rules/EICAR_Encrypted_ZIP.yara#L14-L44"
		license_url = "https://github.com/elceef/yara-rulz/blob/5683b294a12cf0c875b624933586029ae43a852f/LICENSE"
		logic_hash = "56851056671bde38338bd200d9fde59c042f35a2cd84ac9401e716f376c9502c"
		score = 75
		quality = 75
		tags = ""

	strings:
		$local = {
			50 4b 03 04 // local file header signature (PK)
			?? 00 // minimum version
			?? 00 // flags (bit 0 and 6 indicate encryption)
			?? 00 // compression method
			?? ?? // last modification time
			?? ?? // last modification date
			?? ?? ?? ?? // CRC-32 of uncompressed and unencrypted data
			?? ?? ?? ?? // compressed size
			?? ?? ?? ?? // uncompressed size
			}

	condition:
		for any i in ( 1 .. #local ) : ( ( uint8( @local [ i ] + 6 ) & 0x01 or uint8( @local [ i ] + 6 ) & 0x40 ) and uint32( @local [ i ] + 14 ) == 0x6851cf3c and uint32( @local [ i ] + 22 ) == 68 )
}

Cadenas (1 patrones)

IdentificadorTipoValorModificadores
$localhex{ 50 4b 03 04 // local file header signature (PK) ?? 00 // minimum version ?? 00 // flags (bit 0 and 6 indicate encryption) ?? 00 // compression met …

Condición

for any i in ( 1 .. #local ) : ( ( uint8( @local [ i ] + 6 ) & 0x01 or uint8( @local [ i ] + 6 ) & 0x40 ) and uint32( @local [ i ] + 14 ) == 0x6851cf3c and uint32( @local [ i ] + 22 ) == 68 )

En palabras sencillas (Heurística)

  • Un bucle for comprueba una propiedad sobre varias coincidencias o elementos.

Prueba esta regla en tu navegador

Arrastra un archivo para escanearlo con esta regla usando YARA-X compilado a WebAssembly. No se sube nada.

Arrastra un archivo aquí o haz clic para elegirSe escanea en local con YARA-X. Archivos de hasta 200 MB.

Abrir en el editor

Referencias

Licencia y atribución

Autor: marcin@ulikowski.pl

Repositorio de origen: elceef yara-rulz @ 5683b294a1

Licencia: MIT License (licencia del repositorio)

Aviso de copyright: Copyright (c) 2022 Marcin Ulikowski

Regla original

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: c12d42de-356a-584b-9c48-71e65940f1cf