Medium Severity
Attachment: HTML smuggling with hex strings
Description
Recursively scans files and archives to detect HTML smuggling using hex-encoded string content.
References
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(.),
any(.scan.strings.strings,
// ["\x00\x00\x00\xAA..."]
regex.icontains(., '(\\x([a-zA-Z0-9]{2})){100}')
)
)
)
Playground
Test against your own EMLs or sample data.