type.inbound
// Suspicious recipient
and (
(
length(recipients.to) == 1
and (
sender.email.email == recipients.to[0].email.email
or recipients.to[0].email.domain.valid == false
)
)
or (
(
length(recipients.to) == 0
or all(recipients.to, .email.domain.valid == false)
)
and length(recipients.cc) == 0
and length(recipients.bcc) == 0
)
)
and 0 < length(body.current_thread.links) < 10
and any(body.current_thread.links,
strings.icontains(ml.link_analysis(., mode="aggressive").final_dom.raw,
"aHR0cHM6Ly9nbWFpbC5jb20=" // https://gmail.com
)
and strings.icontains(ml.link_analysis(., mode="aggressive").final_dom.raw,
"/gmail/js/start.js"
)
)
Playground
Test against your own EMLs or sample data.