Aller au contenu

YARA · elceef yara-rulz

ELCEEF_ZIP_High_Ratio_Single_Doc

Detects ZIP archives containing single MS Word document with unusually high compression ratio

Génériqueelceef yara-rulzMIT LicenseCompile avec YARA-X
Auteur
marcin@ulikowski.pl
Date
2023-03-08
Score / Qualité
75 / 75

Ce que détecte cette règle

Detects ZIP archives containing single MS Word document with unusually high compression ratio

Elle définit 2 motifs (1 texte, 1 hex, 0 regex).

Résumé généré à partir des métadonnées et de la condition de la règle.

Source de la règle

zip-high-ratio-single-doc.yarMIT License
rule ELCEEF_ZIP_High_Ratio_Single_Doc : FILE
{
	meta:
		description = "Detects ZIP archives containing single MS Word document with unusually high compression ratio"
		author = "marcin@ulikowski.pl"
		id = "0fbe89d9-1bf5-50a9-b6c1-1d739162a2ba"
		date = "2023-03-08"
		modified = "2023-03-08"
		reference = "https://github.com/elceef/yara-rulz"
		source_url = "https://github.com/elceef/yara-rulz/blob/5683b294a12cf0c875b624933586029ae43a852f/rules/ZIP_High_Ratio_Single_Doc.yara#L8-L27"
		license_url = "https://github.com/elceef/yara-rulz/blob/5683b294a12cf0c875b624933586029ae43a852f/LICENSE"
		hash = "4d9a6dfca804989d40eeca9bb2d90ef33f3980eb07ca89bbba06d0ef4b37634b"
		hash = "4bc2d14585c197ad3aa5836b3f7d9d784d7afe79856e0ddf850fc3c676b6ecb1"
		logic_hash = "470300b8d6356cff43a1e2be3a23a97be5d1e2ce5a76f2fb2eccdbbb47a4d327"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$magic = { 50 4b 03 04 }
		$ext = ".doc"

	condition:
		filesize < 1MB and $magic at 0 and #magic == 1 and uint32( 22 ) > 1024 * 1024 * 100 and $ext at ( uint16( 26 ) + 26 )
}

Chaînes (2 motifs)

IdentifiantTypeValeurModificateurs
$magichex{ 50 4b 03 04 }
$exttexte".doc"

Condition

filesize < 1MB and $magic at 0 and #magic == 1 and uint32( 22 ) > 1024 * 1024 * 100 and $ext at ( uint16( 26 ) + 26 )

En clair (Heuristique)

  • Le fichier doit faire moins de 1MB (garde-fou peu coûteux qui écarte les gros fichiers).
  • Le motif $magic doit apparaître == 1 fois.
  • Le motif $magic doit se trouver à l’offset 0.
  • Le motif $ext doit se trouver à l’offset (.

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é.

Déposez un fichier ici ou cliquez pour choisirScanné localement avec YARA-X. Fichiers jusqu’à 200 Mo.

Ouvrir dans l’éditeur

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).

  • 4d9a6dfca804989d40eeca9bb2d90ef33f3980eb07ca89bbba06d0ef4b37634b
  • 4bc2d14585c197ad3aa5836b3f7d9d784d7afe79856e0ddf850fc3c676b6ecb1

Licence et attribution

Auteur : marcin@ulikowski.pl

Dépôt source : elceef yara-rulz @ 5683b294a1

Licence : MIT License (licence du dépôt)

Mention de copyright : Copyright (c) 2022 Marcin Ulikowski

Règle d’origine

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: 0fbe89d9-1bf5-50a9-b6c1-1d739162a2ba

Tags:FILE