An autonomous, dual-expert neural anti-phishing engine executing entirely inside Google Chrome. Zero cloud telemetry. Complete mathematical confidentiality.
Commercial anti-phishing tools routinely upload private enterprise communications to vendor cloud servers. MailGuard AI establishes a new privacy paradigm: executing 100% of feature extraction, cryptographic header verification, and deep neural inference natively within the local browser sandbox.
How the architecture transformed from an academic experimental script into an enterprise-grade Chrome Manifest V3 service worker.
MailGuard AI models heterogeneous email payloads into a compact 74-dimensional vector across three complementary forensic signal groups:
SPF, DKIM, DMARC validation states, sender identity consistency, domain alignment indicators, and RFC 2369 List-Unsubscribe header evidence.
Hop counts, relay timing delta ($\Delta t_i$), inter-MTA latency vectors, routing irregularities, and infrastructure topology extracted from Received: headers.
Body length, vocabulary density, urgency tokens, combined with Fast Fourier Transform (FFT) harmonic spectral invariants from the raw character stream.
Detects Cyrillic vs Latin visual homoglyphs, concealed target hyperlinks where anchor text differs from actual destinations (href mismatch), open redirects, and newly registered high-risk TLDs.
Analyzes MIME Date headers against historical organizational circadian rhythms. Flags anomalous off-hour transmissions (e.g., 3:00 AM CEO wire transfer requests) combined with server timestamp discrepancies across relay hops.
Quantifies cognitive coercion patterns designed to bypass human rational thinking (e.g., "Immediate action required", "Account suspended within 2 hours", "Final legal notice") using localized semantic intensity scoring.
Inspects the chain of custody in RFC 5322 Received: headers to spot forged envelope senders, MTA latency injection, and SPF/DKIM authentication failures disguised through custom relay proxies.
Uncovers invisible zero-width spaces (U+200B, U+FEFF) and RTL override characters maliciously injected into body text or sender display names to break NLP keyword filters while remaining invisible to the human eye.
Flags deceptive file attachments leveraging whitespace padding or dual-extension masquerading (e.g., Invoice_Q3.pdf.vbs or Receipt.docx.exe), alongside mismatched MIME content-type headers.
🔒 Feature normalizers, hyperparameter distributions, and training dictionaries are retained in a private repository in accordance with university FYP submission guidelines.
Eliminating Google API rate limitations (HTTP 429) while guaranteeing 60 FPS viewport smoothness:
Sub-millisecond instant lookup during an active Gmail session.
On-disk transactional store. Survives browser restarts and SW sleep.
Syncs inspect state between content scripts and popup UI.
Immutable Human-in-the-Loop sender reputation overrides.
A multi-tier pipeline engineered for Chrome Manifest V3, eliminating UI thread freezing while handling asynchronous Service Worker lifecycles.
content.js)
Monitors Gmail viewport mutations using lazy on-demand row detection, injecting non-intrusive threat indicators (flex-shrink: 0) without layout shifting.
background.js)
Fetches RFC 5322 raw authentication headers (SPF, DKIM, DMARC), extracts the 74-dimensional vector, and executes dual-expert inference via the local V8 engine.
popup.js)
Translates complex mathematical tensors into human-readable risk diagnostics, displaying top attack contributors alongside one-click Trust Whitelist controls.
The four core mathematical formulations powering real-time edge evaluation directly inside the browser V8 JavaScript engine.
Maps normalized 74-D input vector $\mathbf{x}$ to non-linear threat probability $p \in [0, 1]$ via a multi-tier feedforward perceptron. Hidden layers utilize ReLU non-linearities, terminating in an output Sigmoid activation $\sigma$.
Computes a calibrated convex combination between supervised posterior probability $p$ and OCSVM boundary deviation $S_{\text{OCSVM}}$ using optimal fusion weighting $\alpha$, evaluated against decision boundary threshold $\tau$.
Approximates Shapley marginal attributions $\phi_i(x)$ on-demand via deterministic sequential leave-one-out feature ablation, collapsing intractable exponential complexity $O(2^{74})$ into a lean $O(74)$ linear pass.
Detects non-semantic evasion techniques (e.g., zero-width unicode steganography and homoglyph substitution) by converting ASCII ordinal sequences $x[n]$ into frequency domain harmonic spectrum $X[k]$.
Evaluated across adversarial benchmark corpora under client-side V8 production conditions.
| Metric | Measured Result | Engineering Implication |
|---|---|---|
| Spam F1-Score | > 95% | Robust balance between high precision and adversarial recall |
| Cross-Validation Stability | Consistent (~0.95) | Multi-fold validation confirming generalization across diverse distributions |
| False Positive Rate (FPR) | < 0.1% | Virtually zero disruption to legitimate daily enterprise communication |
| On-Device V8 Inference | 38 ms | Native client-side execution with zero external network roundtrips |
| Tensor Model Size | 162 KB | Ultra-compact JSON payload stored locally in the extension bundle |
| Full Inbox Scan (50 rows) | 3 – 5 seconds | Staggered asynchronous dispatch preventing Google 429 quota limits |
Developed as a Final Year Project thesis at Universiti Tunku Abdul Rahman (UTAR).
🔒 The core neural network weights and raw implementation scripts are maintained in a private repository in accordance with academic submission guidelines.