Zum Inhalt springen

YARA · elceef yara-rulz

ELCEEF_HTML_Smuggling_A

Generic detection for HTML smuggling (T1027.006)

Generischelceef yara-rulzMIT LicenseKompiliert mit YARA-X
Autor
marcin@ulikowski.pl
Datum
2021-05-13
Geändert
2023-04-16
Score / Qualität
75 / 75

Was diese Regel erkennt

Generic detection for HTML smuggling (T1027.006)

Sie definiert 14 Muster (6 Text, 8 Hex, 0 Regex).

Zusammenfassung aus den Metadaten und der Bedingung der Regel erzeugt.

Regelquelltext

html-smuggling-a.yarMIT License
rule ELCEEF_HTML_Smuggling_A : T1027 FILE
{
	meta:
		description = "Generic detection for HTML smuggling (T1027.006)"
		author = "marcin@ulikowski.pl"
		id = "b711318f-81d2-5d0b-968f-04ae18fdea5b"
		date = "2021-05-13"
		modified = "2023-04-16"
		reference = "https://github.com/elceef/yara-rulz"
		source_url = "https://github.com/elceef/yara-rulz/blob/5683b294a12cf0c875b624933586029ae43a852f/rules/HTML_Smuggling.yara#L1-L31"
		license_url = "https://github.com/elceef/yara-rulz/blob/5683b294a12cf0c875b624933586029ae43a852f/LICENSE"
		hash = "279d5ef8f80aba530aaac8afd049fa171704fc703d9cfe337b56639732e8ce11"
		logic_hash = "bc076e9f3d4c6d2aa5a3602436408e5b2ac3140ca9f7cc776c44835cba211951"
		score = 75
		quality = 75
		tags = "T1027, FILE"

	strings:
		$mssave = { ( 2e | 22 | 27 ) 6d 73 53 61 76 65 }
		$element = { ( 2e | 22 | 27 ) 63 72 65 61 74 65 45 6c 65 6d 65 6e 74 ( 28 | 22 | 27 ) }
		$objecturl = { ( 2e | 22 | 27 ) 63 72 65 61 74 65 4f 62 6a 65 63 74 55 52 4c ( 28 | 22 | 27 ) }
		$download = { ( 2e | 22 | 27 ) 64 6f 77 6e 6c 6f 61 64 ( 3d | 22 | 27 ) }
		$click = { ( 2e | 22 | 27 ) 63 6c 69 63 6b ( 3d | 22 | 27 ) }
		$atob = { 61 74 6f 62 ( 28 | 22 | 27 ) }
		$blob = "new Blob("
		$array = "new Uint8Array("
		$ole2 = "0M8R4KGxGuEA"
		$pe32 = "TVqQAAMAAAAE"
		$iso = "AAAABQ0QwMDE"
		$udf = "AAAAQkVBMDEB"
		$zip = { 55 45 73 44 42 ( 41 | 42 | 43 | 44 ) ( 6f | 30 | 4d | 51 ) ( 41 | 44 ) ( 41 | 43 ) }
		$jsxor = { 2e 63 68 61 72 43 6f 64 65 41 74 28 [1-10] 29 ( 5e | 20 5e ) }

	condition:
		filesize < 5MB and ( $mssave or ( #element == 1 and #objecturl == 1 and #download == 1 and #click == 1 ) ) and $blob and $array and $atob and ( #ole2 + #pe32 + #iso + #udf + #zip + #jsxor ) == 1
}

Strings (14 Muster)

BezeichnerTypWertModifikatoren
$mssaveHex{ ( 2e | 22 | 27 ) 6d 73 53 61 76 65 }
$elementHex{ ( 2e | 22 | 27 ) 63 72 65 61 74 65 45 6c 65 6d 65 6e 74 ( 28 | 22 | 27 ) }
$objecturlHex{ ( 2e | 22 | 27 ) 63 72 65 61 74 65 4f 62 6a 65 63 74 55 52 4c ( 28 | 22 | 27 ) }
$downloadHex{ ( 2e | 22 | 27 ) 64 6f 77 6e 6c 6f 61 64 ( 3d | 22 | 27 ) }
$clickHex{ ( 2e | 22 | 27 ) 63 6c 69 63 6b ( 3d | 22 | 27 ) }
$atobHex{ 61 74 6f 62 ( 28 | 22 | 27 ) }
$blobText"new Blob("
$arrayText"new Uint8Array("
$ole2Text"0M8R4KGxGuEA"
$pe32Text"TVqQAAMAAAAE"
$isoText"AAAABQ0QwMDE"
$udfText"AAAAQkVBMDEB"
$zipHex{ 55 45 73 44 42 ( 41 | 42 | 43 | 44 ) ( 6f | 30 | 4d | 51 ) ( 41 | 44 ) ( 41 | 43 ) }
$jsxorHex{ 2e 63 68 61 72 43 6f 64 65 41 74 28 [1-10] 29 ( 5e | 20 5e ) }

Bedingung

filesize < 5MB and ( $mssave or ( #element == 1 and #objecturl == 1 and #download == 1 and #click == 1 ) ) and $blob and $array and $atob and ( #ole2 + #pe32 + #iso + #udf + #zip + #jsxor ) == 1

In Worten (Heuristik)

  • Die Datei muss kleiner als 5MB sein (eine günstige Grenze, die große Dateien ausschließt).
  • Muster $element muss == 1-mal vorkommen.
  • Muster $objecturl muss == 1-mal vorkommen.
  • Muster $download muss == 1-mal vorkommen.
  • Muster $click muss == 1-mal vorkommen.
  • Muster $mssave muss vorhanden sein.
  • Muster $blob muss vorhanden sein.
  • Muster $array muss vorhanden sein.
  • Muster $atob muss vorhanden sein.

Diese Regel im Browser testen

Legen Sie eine Datei ab, um sie mit dieser Regel und YARA-X als WebAssembly zu scannen. Nichts wird hochgeladen.

Datei hier ablegen oder klicken zum AuswählenLokal mit YARA-X gescannt. Dateien bis 200 MB.

Im Editor öffnen

Referenzen

MITRE ATT&CK

Proben-Hashes

Hashes der Proben, die der Autor in den Metadaten der Regel nennt (in Ihrer Threat-Intelligence-Plattform nachschlagen).

  • 279d5ef8f80aba530aaac8afd049fa171704fc703d9cfe337b56639732e8ce11

Lizenz & Namensnennung

Autor: marcin@ulikowski.pl

Quell-Repository: elceef yara-rulz @ 5683b294a1

Lizenz: MIT License (Repository-Lizenz)

Copyright-Hinweis: Copyright (c) 2022 Marcin Ulikowski

Originalregel

Gespiegelt über YARA Forge 20260927, das Regelnamen mit der Quelle präfixiert und normalisierte Meta-Felder ergänzt.

Regel-ID: b711318f-81d2-5d0b-968f-04ae18fdea5b

Tags:T1027FILE