Inspiration Every email-security tool wants your mail on its servers to analyze it. PhishNet refuses that trade: a DistilBERT transformer runs entirely inside your browser, so we couldn't read your inbox even if we wanted to. What it does • Inline verdict badges on Gmail/Outlook emails: 🛡️ Safe / ⚠️ Phishing / ❓ Uncertain with confidence scores • Click a badge → Threat Inspector: urgency score, domain trust, link forensics, attachment risk • Spoofed-link engine: Cyrillic homographs, punycode, typosquatting vs 25+ brands, display-text mismatch, suspicious TLDs/shorteners • Flags weaponized attachments and double extensions (invoice.pdf.exe) • Trusted Senders whitelist + local-only scan dashboard How we built it Chrome MV3 extension: content script extracts emails from the DOM → service worker coordinates → isolated offscreen document runs the int8-quantized model (~50MB, cached once) via Transformers.js + ONNX Runtime Web. A rule-based fallback engine takes over if the model can't load. 20 unit tests; CI enforces MV3 CSP compliance. Challenges we ran into MV3 bans remote scripts — we vendored the entire ML runtime locally. Content scripts can't use ES modules. And we had to kill false positives on official domains like login.microsoftonline.com without weakening spoof detection. Accomplishments that we're proud of • Zero-egress ML: the only network call PhishNet ever makes is the one-time model download • Dual-engine design that degrades gracefully — heuristic fallback runs at ~27µs/scan (37,000 scans/sec benchmarked) • Caught our own detector flagging official domains (login.microsoftonline.com, google.co.uk), fixed it with ccTLD-aware registrable-domain logic, locked in with regression tests • Found and fixed a DOM XSS in our own threat modal under deadline, enforced by automated browser tests What we learned • MV3 CSP is stricter than tutorials suggest — remote hosts, blob: workers, worker-src all silently break loading; we built an automated CSP validator into CI • Content scripts are hostile territory: no ES modules, attacker-controlled DOM everywhere — treat every email value as input • On-device AI is viable today: int8 quantization = ~50MB DistilBERT at ~200ms warm inference • Three AI coding agents opening simultaneous PRs creates real merge chaos — verify branch ancestry before deleting, resolve union-style when two fix the same bug differently What's next for PhishNet • Chrome Web Store publication (v1.0.0 package ready) • Firefox & Thunderbird support via WebExtensions • SPF/DKIM/DMARC signals surfaced in the Threat Inspector • Community-driven brand list for regional banks and local services • Optional on-device fine-tuning from user flags — no data ever uploaded

Built With

Share this project:

Updates

Submission history