type.inbound
and any(attachments,
(
.file_extension in~ ("html", "htm", "shtml", "dhtml")
or .file_extension in~ $file_extensions_common_archives
or .file_type in~ ("html", "svg")
)
and any(file.explode(.),
1 of (
any(.scan.javascript.identifiers,
. in~ ("rot13", "decodeROT13")
),
any(.scan.strings.strings,
// ROT13 encoded value for https & http
strings.icontains(., "\"uggcf://")
or strings.icontains(., "\"uggc://")
)
)
and length(.scan.javascript.identifiers) < 100
)
)
Playground
Test against your own EMLs or sample data.