Phishing Detection On-Device: How It Works and Why It Matters

Phishing remains the most common cyberattack vector, accounting for over 90% of data breaches according to Verizon's 2024 DBIR. Here is how on-device AI can help you reason about phishing emails before you click — without sending your messages to a server.

Veilsort on-device phishing-detection pipeline (each stage runs locally)
StageWhat happensWhat does NOT happen
1. IntakeEmail text arrives via Share Extension or pasteEmail is not uploaded anywhere
2. PII maskingNames, emails, phone numbers, addresses are tokenized before the model sees the textPII is not logged, not sent off-device
3. FoundationModels inferenceThe on-device model produces a summary, risk flags, deadlines, and a draft replyNo network call; no cloud LLM; no vendor API
4. Structured resultSummary, risk flags (with verbatim quotes), deadlines, and a cautious suggested reply are rendered on screenNo behavioral profile is built; no analytics emitted
5. Optional historyThe analysis is stored locally (configurable retention)History never syncs to any server

Walk into any cybersecurity conference and you will hear about AI-powered threat detection, behavioral analytics, and cloud-scale phishing prevention. These are impressive technologies, but they share a fundamental limitation: they require your email content to be processed on someone else's servers. For individual users — not enterprises with security operations centers — this creates an impossible tradeoff: expose your messages to a third party to protect against phishing, or keep your messages private and risk falling for a scam.

On-device analysis reframes this tradeoff. Modern iPhones running iOS 26 with Apple Intelligence can run Apple Foundation Models locally — large enough to reason about the language of a suspicious email (urgency cues, impersonation patterns, requests for action), without requiring any email content to leave the device.

What Veilsort Actually Analyzes

Veilsort is not a header, SPF/DKIM, URL-destination, or attachment analyzer. v1.0 is text-only. What it does is take the body of a suspicious email — shared from Mail.app or pasted directly — and produce a structured analysis: a plain-English summary of what the sender is really asking for, risk flags with a domain (legal, financial, employment, privacy, reputation, or safety) and a severity of low, medium, or high, explicit or inferred deadlines with verbatim source quotes, and a cautious, non-committal suggested reply. Each risk flag includes a rationale and a verbatim quote from the email, so you can verify the model's reasoning against the original text.

What Veilsort does not do

Veilsort does not inspect email headers, validate SPF/DKIM, follow redirect chains to inspect link destinations, analyze attachments, learn from your inbox over time, or build a personalized sender baseline. Each analysis is independent and text-only. Anything that would require ongoing access to your inbox or persistent data about your communications is out of scope — not because it is not useful, but because it is incompatible with the zero-network, zero-account architecture that makes Veilsort trustworthy for sensitive emails.

The Pipeline, End to End

When you share an email into Veilsort, it runs a fixed on-device pipeline. First, PIIMasker strips personal identifiers — names, phone numbers, addresses, URLs, email addresses, and similar — using NSDataDetector, NLTagger, and a set of regex layers, replacing them with token placeholders before the text reaches the model. Second, if the email is long, TextChunker splits it into chunks for a map-reduce pass. Third, Apple Foundation Models produce the structured EmailAnalysis — summary, risks, deadlines, and reply draft. The result is rendered into four cards on screen. None of these steps makes a network request; the only thing that ever leaves the device is the Apple system-level MetricKit diagnostics, which is not initiated by Veilsort and contains no email content.

Why On-Device Matters for Phishing

Phishing emails often contain the very information attackers are trying to steal — your bank's name, your employer's domain, your colleagues' email addresses. Sending these details to a cloud scanner creates a new target. NIST's Phish Scale framework recommends that phishing detection tools minimize data exposure as a core design principle. On-device analysis is not just a privacy preference — it is the only architecture that aligns with NIST's guidance on protecting sensitive content during security analysis.

Enjoyed this post?