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}')
)
)
)
Playground
Test against your own EMLs or sample data.