PhishLens has three main runtime parts:
Browser tab
-> content script
-> popup UI and options page
-> FastAPI backend
-> optional PhishTank, TLS socket inspection, RDAP domain age, and local ML model
-> development diagnostics and rate limiting
<link> points at a different origin that is itself a known brand
domain).chrome.storage.sync.POST /analyze when the configured backend is available.phishlens-demo-dangerous can trigger an explicit demo threat signal.reasons and structured risk_breakdown items by category.dangerous final result can inject a dismissible page overlay when enabled./diagnostics exposes aggregate counters only when diagnostics are enabled./health and /diagnostics to show backend status, capability flags, and aggregate counters without exposing URLs or page content.POST /analyze returns the final normalized score and a structured category breakdown:
| Category | Score Range | Purpose |
|---|---|---|
url |
0..35 |
URL length, host shape, suspicious keywords, HTTPS, punycode, and entropy. |
dom |
0..30 |
Non-sensitive page structure signals such as forms, password field presence, iframes, external form action, external link ratio, hidden input presence, visible-text brand mismatch, and favicon hotlinked from a known brand domain. |
threat_intel |
0..40 |
Optional PhishTank or local demo threat source result. |
tls |
0..15 |
Backend-side certificate validity, expiration, and controlled TLS errors. |
domain_age |
0..20 |
Optional RDAP domain registration age. Domains registered in the last 30/180 days score higher; missing or privacy-protected registration data scores 0 (not treated as suspicious). |
ml |
-10..20 |
Optional model adjustment. Missing model artifacts use a neutral fallback. |
The top-level reasons list remains for compatibility. New UI should prefer risk_breakdown because it includes category, score, cap, source, and reasons.
The extension does not send full HTML or form values. The backend receives the URL and structured DOM features only.
Feedback uses the same privacy boundary. The popup sends URL, observed label, expected label, and a short non-sensitive note. The backend logs host-level context and persists only host-level label metadata in the configured SQLite feedback store; it does not persist full URLs, note text, page content, form values, credentials, cookies, screenshots, or HTML.
The options page stores:
Custom remote backend origins use optional host permissions instead of broad default host access.
The backend adds an X-Request-ID header to every response. A caller-provided X-Request-ID is accepted only when it is short and uses safe characters; otherwise the backend generates one.
/diagnostics is intended for development and demo workflows. It reports counters for analysis requests, feedback, rate limits, labels, sources, cache hits/misses, external service skips/errors, and non-sensitive capability flags. It does not expose URLs, page text, form values, credentials, cookies, screenshots, model paths, or HTML.
/analyze and /report use process-local in-memory rate limits keyed by route and client host. This is a lightweight development safeguard, not a distributed production limiter.
Chrome extensions cannot reliably inspect full certificate details from page scripts. PhishLens performs TLS checks from the backend using Python sockets and the system trust store.
This can differ from what the browser sees when the user is behind a corporate proxy, local antivirus TLS inspection, captive portal, or custom trust store.
PhishLens looks up domain registration age via the public RDAP bootstrap service
(rdap.org), which redirects to the domain’s authoritative registry RDAP server. Only
the hostname is sent, no path or query string. A missing registration event (common with
privacy-protected WHOIS records) is not treated as suspicious — it is just as common for
legitimate domains as for phishing domains, so it contributes 0 to the score rather than
being penalized.
[Chrome tab]
|
| DOM counts only
v
[Content script] ---- message ----> [Popup React UI]
|
| settings
v
[Options page]
|
| POST /analyze
v
[FastAPI backend]
| | | | |
v v v v v
[PhishTank] [TLS] [RDAP] [ML model] [Diagnostics]
^ ^ ^
| | |
TTL cache