Detection rules › Sublime MQL
Attachment: HTML smuggling with high entropy and other signals
Recursively scans files and archives to detect HTML smuggling techniques.
Threat classification
Sublime's own taxonomy (not MITRE ATT&CK).
| Category | Values |
|---|---|
| Attack types | Malware/Ransomware |
| Tactics and techniques | Evasion, HTML smuggling, Scripting |
Event coverage
| Message attribute |
|---|
| attachments (collection) |
| type |
Rule body MQL
type.inbound
and any(attachments,
(
.file_extension in~ ("html", "htm", "shtml", "dhtml")
or .file_extension in~ $file_extensions_common_archives
or .file_type == "html"
)
and any(file.explode(.),
.scan.entropy.entropy >= 5
and any(.scan.strings.strings,
regex.icontains(., "fromCharCode")
and regex.icontains(., "parseInt")
and regex.icontains(., "charCodeAt")
and regex.icontains(., '(\\x0.*?){50}')
)
)
)
Detection logic
Scope: inbound message.
Recursively scans files and archives to detect HTML smuggling techniques.
- inbound message
any of
attachmentswhere all hold:any of:
- .file_extension in ('html', 'htm', 'shtml', 'dhtml')
- .file_extension in $file_extensions_common_archives
- .file_type is 'html'
any of
file.explode(.)where all hold:- .scan.entropy.entropy ≥ 5
any of
.scan.strings.stringswhere all hold:- . matches 'fromCharCode'
- . matches 'parseInt'
- . matches 'charCodeAt'
- . matches '(\\\\x0.*?){50}'
Inspects: attachments[].file_extension, attachments[].file_type, type.inbound. Sensors: file.explode, regex.icontains. Reference lists: $file_extensions_common_archives.
Indicators matched (9)
| Field | Match | Value |
|---|---|---|
attachments[].file_extension | member | html |
attachments[].file_extension | member | htm |
attachments[].file_extension | member | shtml |
attachments[].file_extension | member | dhtml |
attachments[].file_type | equals | html |
regex.icontains | regex | fromCharCode |
regex.icontains | regex | parseInt |
regex.icontains | regex | charCodeAt |
regex.icontains | regex | (\\x0.*?){50} |