YARA · elceef yara-rulz
ELCEEF_HTML_Smuggling_B
Generic detection for HTML smuggling (T1027.006)
- Author
- marcin@ulikowski.pl
- Date
- 2022-12-02
- Modified
- 2023-04-16
- Score / Quality
- 75 / 75
What this rule detects
Generic detection for HTML smuggling (T1027.006)
It defines 11 patterns (8 text, 3 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
html-smuggling-b.yarMIT License
rule ELCEEF_HTML_Smuggling_B : T1027 FILE
{
meta:
= "Generic detection for HTML smuggling (T1027.006)"
= "marcin@ulikowski.pl"
= "640d70c2-f1fc-5e32-a720-ebc92839ec40"
= "2022-12-02"
= "2023-04-16"
= "https://github.com/elceef/yara-rulz"
= "https://github.com/elceef/yara-rulz/blob/5683b294a12cf0c875b624933586029ae43a852f/rules/HTML_Smuggling.yara#L33-L60"
= "https://github.com/elceef/yara-rulz/blob/5683b294a12cf0c875b624933586029ae43a852f/LICENSE"
= "63955db0ccd6c0613912afb862635bde0fa925847f27adc8a0d65c994a7e05ea"
= "3c42e6f715bd5476aea4d47e9f6431747ddf7c7c8098840560201e2c21723eeb"
= 75
= 75
= "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 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $objecturl | hex | { ( 2e | 22 | 27 ) 63 72 65 61 74 65 4f 62 6a 65 63 74 55 52 4c ( 28 | 22 | 27 ) } | |
| $atob | text | "atob(" | |
| $blob | text | "new Blob(" | |
| $file | text | "new File([" | |
| $array | text | "new Uint8Array(" | |
| $ole2 | text | "0M8R4KGxGuEA" | |
| $pe32 | text | "TVqQAAMAAAAE" | |
| $iso | text | "AAAABQ0QwMDE" | |
| $udf | text | "AAAAQkVBMDEB" | |
| $zip | hex | { 55 45 73 44 42 ( 41 | 42 | 43 | 44 ) ( 6f | 30 | 4d | 51 ) ( 41 | 44 ) ( 41 | 43 ) } | |
| $jsxor | hex | { 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 ) == 1In plain words (Heuristic)
- The file must be smaller than 5MB (a cheap guard that skips large files).
- Pattern $objecturl must occur == 1 times.
- Pattern $file must occur == 1 times.
- Pattern $blob must occur == 1 times.
- Pattern $array must occur == 1 times.
- Pattern $atob must be present.
Test this rule in your browser
Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.
Drop a file here or click to chooseScanned locally with YARA-X. Files up to 200 MB.
References
MITRE ATT&CK
Sample hashes
Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).
- 63955db0ccd6c0613912afb862635bde0fa925847f27adc8a0d65c994a7e05ea
Licence & attribution
Author: marcin@ulikowski.pl
Source repository: elceef yara-rulz @ 5683b294a1
Licence: MIT License (repository licence)
Copyright notice: Copyright (c) 2022 Marcin Ulikowski
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: 640d70c2-f1fc-5e32-a720-ebc92839ec40
Related rules
- Genericelceef yara-rulz· marcin@ulikowski.pl· 2023-04-17
- Genericelceef yara-rulz· marcin@ulikowski.pl· 2021-05-13
- MalwareTrellix Advanced Research Center· TS @ McAfee ATR· 2021-01-19
- Exploitelceef yara-rulz· marcin@ulikowski.pl· 2025-08-18
- Genericelceef yara-rulz· marcin@ulikowski.pl· 2024-04-10
- Genericelceef yara-rulz· marcin@ulikowski.pl· 2023-05-05
- Suspicious / huntingelceef yara-rulz· marcin@ulikowski.pl· 2023-05-01
- Exploitelceef yara-rulz· marcin@ulikowski.pl· 2023-09-23