How a malicious email slips past three security layers

A malicious email bypasses SpamAssassin, Microsoft Defender, and Vade by exploiting each filter's blind spots in sequence: reputation-based rules, machine-learning classifiers, and behavioral engines all share structural weaknesses that a well-crafted phishing message can chain together in a single delivery attempt.

Understanding this kill chain is no longer optional for security teams. According to Verizon's 2024 DBIR, email remains the initial access vector in over 30% of confirmed breaches. Yet most organizations still rely on stacked filters that were designed to catch bulk spam — not targeted, multi-stage evasion.

This article walks through exactly how each layer fails, in order, and what a deterministic approach can do that heuristic filters cannot.

Stage 1 — SpamAssassin: rule-based filters and their ceiling

SpamAssassin scores incoming messages against hundreds of static rules: header anomalies, known-bad IP ranges, keyword patterns, DNS blocklists (DNSBL), and Bayesian token analysis. A score above 5.0 typically triggers rejection or quarantine.

The problem is that every rule is public. Attackers read the SpamAssassin ruleset the same way defenders do.

How attackers score under the threshold

  • Clean infrastructure: Messages are sent from freshly registered domains with valid SPF, DKIM, and DMARC records. A new domain has no reputation — negative or positive — so DNSBL checks return nothing.
  • Minimal payload on first touch: The email body contains no malicious URL or attachment at send time. The link points to a legitimate redirector (Google Redirect, OneDrive, SharePoint) that SpamAssassin will not penalize.
  • Bayesian poisoning: Embedding long blocks of benign natural-language text (copied from news articles or Wikipedia) dilutes the token frequency that Bayesian classifiers rely on.
  • Header mimicry: Attackers reproduce the exact header structure of a trusted sender — Microsoft 365, Salesforce, Docusign — making structural anomaly rules fire at near-zero weight.

The cumulative score stays well below 5.0. SpamAssassin passes the message with no flag. The first gate is open.

Stage 2 — Microsoft Defender for Office 365: machine learning under pressure

Microsoft Defender adds a second layer: Safe Links rewrites URLs and detonates them in a sandbox, Safe Attachments opens files in an isolated environment, and ML classifiers assign a phishing confidence score based on signals from billions of messages across the Microsoft tenant ecosystem.

This is substantially stronger than rule-based scoring. But it introduces new attack surfaces.

Time-of-click URL switching

Safe Links scans the URL at delivery time. If the destination is clean at that moment — a parked page, a legitimate cloud file — the rewritten link is marked safe. The attacker then swaps the payload behind the same URL hours or days later, after the message sits in the inbox. When the user clicks, Safe Links performs a second-pass check, but the re-scan window and caching behavior can be abused.

This technique is well-documented by Microsoft's own Threat Intelligence team and has been observed in campaigns targeting financial services and healthcare sectors throughout 2023–2024.

Tenant-trust abuse and QR code smuggling

  • Compromised Microsoft 365 tenants: An email sent from a legitimate, compromised M365 account inherits the sending tenant's trust score. Defender is less aggressive with intra-ecosystem traffic.
  • QR codes instead of hyperlinks: Embedding a malicious URL inside a QR code image bypasses Safe Links entirely, because the scanner does not OCR image content by default. Microsoft acknowledged this gap in 2023; partial mitigations exist but are not universal.
  • HTML smuggling: The malicious payload is assembled client-side via JavaScript blobs. The attachment that Defender's sandbox scans contains no executable — only a script that reconstructs the dropper after delivery.

Defender's ML model scores the message as low-confidence phishing or legitimate. The second gate opens.

Stage 3 — Vade: behavioral and contextual AI at the edge

Vade Secure (now Vade for M365) applies a third pass using its own neural models trained on brand impersonation patterns, sender-recipient relationship graphs, and real-time threat feeds. It specializes in catching what Defender misses — particularly credential harvesting pages and brand spoofs.

Yet Vade, like every filter in this stack, operates on probabilistic inference. Probability can be gamed.

Why Vade's behavioral graph can be manipulated

Vade assigns a trust score partly based on prior communication history. An attacker who compromises a vendor account that has exchanged emails with the target organization for months inherits a high relationship score. The behavioral graph works against the defender in a supply-chain compromise scenario.

Vade's brand-impersonation engine relies on visual similarity hashing of login pages. Attackers now use reverse-proxy phishing kits (Evilginx2, Modlishka) that serve the real brand's page as a live proxy — there is no impersonation to detect, because the victim is seeing the genuine Microsoft or Google login page, with credentials captured in transit.

FrozenSpam editorial note: Every heuristic filter — regardless of vendor — makes a probabilistic bet on whether a message is malicious. A sufficiently patient attacker simply engineers the inputs until the bet lands wrong. The only way to stop an unknown sender unconditionally is to require them to prove they are human before the message ever reaches the inbox.

The compounding problem: evasion is sequential, not parallel

What makes this threat model particularly dangerous is that the attacker does not need to defeat all three filters simultaneously. Each layer is tested independently, and a message that clears SpamAssassin is handed to Defender with no accumulated suspicion score. Defender's output feeds Vade under the same assumption of partial innocence.

The attacker's strategy is therefore sequential optimization: craft a message that clears Layer 1 first, then iterate on what Layer 2 flags, then tune for Layer 3. Modern phishing-as-a-service platforms (PhaaS) offer A/B testing against live filter APIs, dramatically accelerating this iteration cycle.

According to Cofense's 2024 Annual State of Email Security Report, 90% of phishing emails that reached end users had already passed through a Secure Email Gateway. Stacking more heuristic filters does not change the underlying math.

What a challenge-response mechanism stops that filters cannot

Challenge-response anti-spam operates on a fundamentally different principle. Instead of scoring message content, it withholds delivery from any unknown sender until that sender completes a human verification step — typically an interactive challenge served over a separate channel.

This approach is orthogonal to every evasion technique described above:

  • Clean infrastructure, low spam scores, and spoofed headers are irrelevant — the sender's reputation is never consulted.
  • Time-of-click URL switching and HTML smuggling cannot occur because the message never reaches the inbox in the first place.
  • Compromised vendor accounts and reverse-proxy kits require a human operator to manually complete each challenge — this is operationally impossible at the scale required for mass phishing campaigns.

The challenge is not a content inspection. It is a gate that requires interactive human effort, and that effort cannot be automated cheaply at volume. Botnets and phishing kits are designed for scale; challenge-response destroys their economics.

Practical architecture: layering challenge-response with existing filters

Challenge-response is not a replacement for SpamAssassin or Defender — it is a complementary layer that handles the specific failure mode those tools share: unknown or low-reputation senders carrying novel payloads.

A realistic deployment model looks like this:

  1. Known senders (whitelist): Established contacts bypass the challenge and flow through existing filters normally.
  2. Unknown senders: Message is held; sender receives an automated challenge. On successful completion, the original message is released and the sender is added to the allowlist.
  3. No response: Message is discarded after a configurable timeout — no quarantine storage, no analyst time, no false-negative risk.

This architecture means that a compromised vendor account sending a first-ever message to a new recipient — the exact scenario that defeats Vade's relationship graph — is stopped at step 2. The attacker controlling that account must manually complete the challenge for every targeted recipient. At that point, the economics of the attack collapse entirely.

Conclusion: filters score, challenge-response decides

SpamAssassin, Microsoft Defender, and Vade are sophisticated tools built by world-class engineering teams. They fail against targeted evasion not because of poor design, but because heuristic scoring is structurally exploitable by an adversary who can iterate against it. The sequential bypass documented here is reproducible, commercially available as a service, and increasingly used in attacks against mid-market and enterprise targets.

Challenge-response does not guess. It requires proof of humanity before delivery — a test that no automated phishing infrastructure can pass at scale. If your current stack relies entirely on content scoring, you have a gap that no additional AI layer will close.

Explore how FrozenSpam fits into your existing email architecture at /pilote or review deployment options at /tarifs.