Aller au contenu

YARA · elceef yara-rulz

ELCEEF_HTML_Smuggling_C

Generic detection for HTML smuggling (T1027.006)

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

Ce que détecte cette règle

Generic detection for HTML smuggling (T1027.006)

Elle définit 4 motifs (2 texte, 2 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

html-smuggling-c.yarMIT License
rule ELCEEF_HTML_Smuggling_C : T1027 FILE
{
	meta:
		description = "Generic detection for HTML smuggling (T1027.006)"
		author = "marcin@ulikowski.pl"
		id = "ea1eafad-905b-571e-a016-8774e65bd976"
		date = "2023-04-17"
		modified = "2023-04-17"
		reference = "https://github.com/elceef/yara-rulz"
		source_url = "https://github.com/elceef/yara-rulz/blob/5683b294a12cf0c875b624933586029ae43a852f/rules/HTML_Smuggling.yara#L62-L82"
		license_url = "https://github.com/elceef/yara-rulz/blob/5683b294a12cf0c875b624933586029ae43a852f/LICENSE"
		hash = "0b4cdfc8ae8ae17d7b6786050f1962c19858b91febb18f61f553083f57d96fea"
		hash = "2b99bf97f3d02ba3b44406cedd1ab31824723b56a8aae8057256cc87870c199e"
		hash = "904ea1ada62cfd4b964a6a3eb9bab5b98022ab000f77b75eb265a2ac44b45b37"
		logic_hash = "83409b0b173980975f6349e448e72fe1b2115fc7dbdec8ee7ad1826a65db17d3"
		score = 75
		quality = 75
		tags = "T1027, FILE"

	strings:
		$blob = "new Blob("
		$array = "new Uint8Array("
		$mssave = { ( 2e | 22 | 27 ) 6d 73 53 61 76 65 }
		$loop = { ?? 5b 69 5d ( 3d | 20 3d | 3d 20 | 20 3d 20 ) ?? 5b 69 5d ( 2d | 20 2d | 2d 20 | 20 2d 20 ) 3? 3b }

	condition:
		filesize < 5MB and $mssave and #blob == 1 and #array == 1 and #loop == 1
}

Chaînes (4 motifs)

IdentifiantTypeValeurModificateurs
$blobtexte"new Blob("
$arraytexte"new Uint8Array("
$mssavehex{ ( 2e | 22 | 27 ) 6d 73 53 61 76 65 }
$loophex{ ?? 5b 69 5d ( 3d | 20 3d | 3d 20 | 20 3d 20 ) ?? 5b 69 5d ( 2d | 20 2d | 2d 20 | 20 2d 20 ) 3? 3b }

Condition

filesize < 5MB and $mssave and #blob == 1 and #array == 1 and #loop == 1

En clair (Heuristique)

  • Le fichier doit faire moins de 5MB (garde-fou peu coûteux qui écarte les gros fichiers).
  • Le motif $blob doit apparaître == 1 fois.
  • Le motif $array doit apparaître == 1 fois.
  • Le motif $loop doit apparaître == 1 fois.
  • Le motif $mssave doit être présent.

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

MITRE ATT&CK

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

  • 0b4cdfc8ae8ae17d7b6786050f1962c19858b91febb18f61f553083f57d96fea
  • 2b99bf97f3d02ba3b44406cedd1ab31824723b56a8aae8057256cc87870c199e
  • 904ea1ada62cfd4b964a6a3eb9bab5b98022ab000f77b75eb265a2ac44b45b37

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: ea1eafad-905b-571e-a016-8774e65bd976

Tags:T1027FILE