type.inbound
and any(body.links,
any(ml.link_analysis(.).files_downloaded,
any(file.explode(.),
(
any(.flavors.yara, . == "encrypted_zip")
and any(.scan.zip.all_paths,
any([".img", ".iso", ".vhd"], strings.ends_with(.., .))
)
)
)
)
)
and (
profile.by_sender().prevalence in ("new", "outlier")
or (
profile.by_sender().any_messages_malicious_or_spam
and not profile.by_sender().any_messages_benign
)
)
Playground
Test against your own EMLs or sample data.