ScamShield is a Chrome extension MVP that analyzes the page a user is currently visiting, looks for scam and phishing patterns, and explains the risk in plain language. It combines fast local heuristics with an optional AI explanation layer so users get both an immediate safety signal and a human-readable reason for the warning.
The system is designed for live browser protection and demo-friendly evaluation:
- It scans the active page for suspicious domain, content, link, form, iframe, and script signals.
- It assigns a local safety score from
0-100, where higher means safer. - It classifies pages as
safe,suspicious, ordangerous. - It highlights risky outgoing links before the user navigates away.
- It shows results inside a Chrome side panel and on-page warning UI.
- It can generate an AI explanation through Gemini or OpenRouter for pages that need more context.
ScamShield follows a staged detection pipeline:
-
Content script scan
The extension reads the current page and extracts URL, title, metadata, visible text, links, forms, iframes, and script behavior. -
Heuristic scoring
The background worker scores the page locally using weighted signals such as:- suspicious TLDs and lookalike domains
- brand impersonation patterns
- urgency language and sensitive-data prompts
- off-site login links
- suspicious forms and hidden iframes
- obfuscated or hostile JavaScript behavior
-
Threat enrichment
The system checks additional intelligence such as local blocklist matches and domain-age risk when available. -
User-facing response
ScamShield updates the side panel, stores the result per tab, and shows in-page warnings or overlays for suspicious and dangerous pages. -
Optional AI explanation
For non-obviously-safe pages, the extension can ask Gemini or OpenRouter to turn the detected signals into a short explanation and recommended next steps.
- Real-time page scanning for every loaded or meaningfully updated page
- Client-side detection pipeline for fast first-pass scoring
- Risky link interception before users click through
- Side panel dashboard for readable scan results
- Session-aware tab state so results persist while browsing
- Optional AI assistance with fallback explanations when no provider is configured
- Demo testcase suite for safe and scam scenarios
.
|-- scam-shield/
| |-- background.js # Main scan orchestration pipeline
| |-- content/ # Page scanning + on-page warnings
| |-- scoring/ # Heuristics, blocklist, domain-age, AI explanation
| |-- sidebar/ # Side panel UI
| |-- popup/ # Extension popup
| |-- options/ # Provider/API key settings
| `-- manifest.json # Chrome extension manifest
|-- testcases/ # Demo pages for safe vs scam
evaluation
`-- README.md
- Open
chrome://extensions - Turn on
Developer mode - Click
Load unpacked - Select the
scam-shieldfolder - Open any website and click the extension icon to open the side panel
ScamShield supports two optional providers for explanations:
- Gemini
- OpenRouter
You can configure them in either of these ways:
- Add local values in
scam-shield/config.local.json - Or open the extension options page and save provider settings there
If no provider is configured, ScamShield still works. It falls back to a locally generated explanation based on the detected signals.
The repository includes a testcases/ folder with judge-ready pages for demos:
safe/contains benign examplesscam/contains scam-like phishing pages meant to trigger detection logic
See testcases/README.md for hostname mapping and local demo instructions.
This repository is intentionally built as a hackathon MVP. It is strong for demos, prototyping, and validating the user experience, but it is not yet production hardened.
Important limitations:
- API keys can be configured locally inside the extension workflow
- AI calls are made directly from the extension for development speed
- the detection logic is heuristic-first and should be continuously tuned against real-world datasets
- a production version should move sensitive provider access and threat intelligence behind a secure backend
ScamShield is aimed at a practical browser-security problem: most users do not need raw technical indicators, they need a fast and understandable answer to a simple question:
"Does this page look safe, and why?"
This project focuses on answering that question quickly, visibly, and in a form that non-technical users can act on.