Zum Inhalt springen

YARA · elceef yara-rulz

ELCEEF_HTML_Smuggling_B

Generic detection for HTML smuggling (T1027.006)

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

Was diese Regel erkennt

Generic detection for HTML smuggling (T1027.006)

Sie definiert 11 Muster (8 Text, 3 Hex, 0 Regex).

Zusammenfassung aus den Metadaten und der Bedingung der Regel erzeugt.

Regelquelltext

html-smuggling-b.yarMIT License
rule ELCEEF_HTML_Smuggling_B : T1027 FILE
{
	meta:
		description = "Generic detection for HTML smuggling (T1027.006)"
		author = "marcin@ulikowski.pl"
		id = "640d70c2-f1fc-5e32-a720-ebc92839ec40"
		date = "2022-12-02"
		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#L33-L60"
		license_url = "https://github.com/elceef/yara-rulz/blob/5683b294a12cf0c875b624933586029ae43a852f/LICENSE"
		hash = "63955db0ccd6c0613912afb862635bde0fa925847f27adc8a0d65c994a7e05ea"
		logic_hash = "3c42e6f715bd5476aea4d47e9f6431747ddf7c7c8098840560201e2c21723eeb"
		score = 75
		quality = 75
		tags = "T1027, FILE"

	strings:
		$objecturl = { ( 2e | 22 | 27 ) 63 72 65 61 74 65 4f 62 6a 65 63 74 55 52 4c ( 28 | 22 | 27 ) }
		$atob = "atob("
		$blob = "new Blob("
		$file = "new File(["
		$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 $atob and #objecturl == 1 and #file == 1 and #blob == 1 and #array == 1 and ( #ole2 + #pe32 + #iso + #udf + #zip + #jsxor ) == 1
}

Strings (11 Muster)

BezeichnerTypWertModifikatoren
$objecturlHex{ ( 2e | 22 | 27 ) 63 72 65 61 74 65 4f 62 6a 65 63 74 55 52 4c ( 28 | 22 | 27 ) }
$atobText"atob("
$blobText"new Blob("
$fileText"new File(["
$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 $atob and #objecturl == 1 and #file == 1 and #blob == 1 and #array == 1 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 $objecturl muss == 1-mal vorkommen.
  • Muster $file muss == 1-mal vorkommen.
  • Muster $blob muss == 1-mal vorkommen.
  • Muster $array muss == 1-mal vorkommen.
  • 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).

  • 63955db0ccd6c0613912afb862635bde0fa925847f27adc8a0d65c994a7e05ea

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: 640d70c2-f1fc-5e32-a720-ebc92839ec40

Tags:T1027FILE