A Chrome extension that records and classifies every network request your browser makes — trackers, analytics, ads, fingerprinting scripts, session replay tools, and more — so you can see (and block) exactly what a site is doing in the background.
Browser-native privacy and tracker analysis powered by fully local ML inference.
Specter is a Chrome MV3 extension that intercepts and classifies network requests in real time — trackers, analytics, fingerprinting scripts, session replay tools, ad infrastructure, and more — entirely on-device using ONNX Runtime + WebAssembly.
No proxy. No cloud inference. No telemetry. No browsing data ever leaves your machine.
Most privacy extensions rely heavily on static blocklists. While effective against known trackers, blocklists struggle with rapidly changing ad infrastructure, newly generated domains, behavioral tracking patterns, and fingerprinting systems that evolve faster than manually maintained signatures.
Specter explores a browser-native alternative:
The project also serves as an experiment in running performant ML systems entirely inside Manifest V3 service worker constraints.
declarativeNetRequest API (opt-in, off by default)flowchart LR
A[Chrome Request] --> B[Feature Extraction]
B --> C[ONNX Runtime Web]
C --> D[Classification Engine]
D --> E[Dashboard UI]
D --> F[Privacy Scoring]
D --> G[Session Storage]
Specter ships with a pre-trained XGBoost model located at:
extension/data/model.json
The model classifies requests into five categories:
| Class | Description |
|---|---|
legitimate |
First-party assets, fonts, stylesheets, CDN resources |
analytics |
Analytics and telemetry providers |
ad_network |
Ad exchanges, DSPs, bidding infrastructure |
behavioral |
Cross-site trackers and retargeting systems |
fingerprinting |
Browser fingerprinting scripts and infrastructure |
session_replay detection is handled separately using deterministic heuristics.
The classifier extracts 27 features per request, including:
Inference executes locally in under 50ms using ONNX Runtime Web.
| Metric | Value |
|---|---|
| Training Samples | 25,290 requests |
| Feature Count | 27 |
| Classes | 5 |
| Accuracy | 96.2% |
| Weighted F1 | 0.967 |
| Inference Runtime | <50ms |
| Model Format | ONNX JSON |
| Model Size | ~2.4 MB |
Manifest V3 replaces persistent background pages with ephemeral service workers, introducing several engineering constraints:
Specter is designed around these constraints while maintaining low-latency request classification.
Running inference directly inside a browser extension introduces additional challenges:
Specter uses ONNX Runtime Web for efficient local execution without requiring external infrastructure.
You can retrain the model locally using your own crawl data.
npm run chrome
npm run crawl
Export sessions from the Specter dashboard and place them into:
tools/exports/
pip install xgboost scikit-learn onnxmltools numpy
python tools/train.py
Outputs:
extension/data/model.json
extension/data/model_labels.json
The training pipeline:
All browsing data remains local to the device.
Specter does not:
Optional VirusTotal lookups are disabled by default and require a user-provided API key.
| Key | Contents |
|---|---|
session:current |
Active session metadata |
requests:{session_id} |
Classified request objects |
scores:{session_id} |
Per-site privacy scores |
sessions:history |
Session summaries |
settings |
User preferences |
blocking:dynamic_domains |
Domains promoted to DNR block rules |
blocking:allowlist |
Per-site domain overrides |
blocking:stats:{session_id} |
Blocked/stripped counts per session |
blocking:daily |
Calendar-day blocked count for the popup |
fp:session_seed (session storage) |
PRNG seed for fingerprint defense while a session is active |
Install directly from the Chrome Web Store.
npm install
npm run bundle-libs
Load the extension:
chrome://extensionsextension/ folderThe extension ships as plain JavaScript with no frontend build system.
Requirements: Chrome 114+ · Node.js 18+ (build step only)
Click the Specter icon in your toolbar, then click ▶ NEW SESSION. Browse normally. Specter records every request in the background.
Open the dashboard (OPEN DASHBOARD in the popup). The feed shows each request with its category, domain, confidence score, and size. Click any row to see the full URL, headers, response metadata, and which signals drove the classification.
In the dashboard bottom panel, open the Network tab to see a live force-directed graph: your site and third-party domains as nodes, request flow as edges. It respects the same filters and site scope as the timeline. Drag nodes to rearrange, hover for details, click a domain to filter the feed, or export the view as SVG.
Go to Settings → Blocking and toggle Enable blocking. Blocking is off by default.
With blocking on, Specter:
declarativeNetRequest dynamic rulesfbclid, gclid, utm_*, etc.) from URLs before requests are sentBLOCKED or amber STRIPPED badge on affected feed rowsIf a site breaks, click the blocked request in the feed and choose Allow on this site or Allow everywhere to add it to the allow-list.
Click the clock icon in the dashboard nav to open Session History. Click any session to see a per-site breakdown with tracker counts and privacy scores. Export a full JSON dump or copy a plain-text report.
All settings are in Dashboard → Settings.
| Setting | Default | Description |
|---|---|---|
| Autoscroll | On | Feed scrolls to new rows automatically |
| Min confidence | 0% | Hides requests classified below this confidence |
| Data retention | Forever | Auto-delete sessions older than N days |
| VirusTotal API key | — | Enables domain reputation lookups in the detail panel |
| Use ML classifier | On | Switch to rule-based classifier if off |
| Enable blocking | Off | Master switch for the blocking engine |
| Blocking mode | Smart | Smart (ML-driven) · Strict (all third-party) · Param strip only |
| Block threshold | 85% | Confidence required to block in Smart mode |
| Block session replay | On | Always block Hotjar, FullStory, LogRocket, etc. |
| Block fingerprinting | On | Always block canvas/font/WebGL fingerprint scripts |
| Block behavioral | On | Block behavioral trackers above threshold |
| Block ad networks | On | Block ad exchanges and bidding infrastructure above threshold |
| Block analytics | Off | Block analytics (may break some sites) |
| Enable fingerprint defense | Off | MAIN-world noise on canvas/WebGL/audio/navigator/fonts before page scripts |
| FP defense surfaces | All on | Per-surface toggles when master switch is on |
specter/
├── extension/ Chrome extension (load this folder)
│ ├── dashboard.html/js/css
│ ├── graph.js Network tab (D3 force graph, v1.4)
│ ├── popup.html/js/css
│ ├── blocking-ui.js Blocking settings UI + feed badges
│ ├── blocking.js Adaptive blocking engine (DNR rules)
│ ├── fp-defense.js MAIN-world fingerprint API hooks (v1.3)
│ ├── fp-defense-ui.js Fingerprint defense settings UI
│ ├── service_worker.js
│ ├── shared.css
│ └── data/
│ ├── blocking_rules.json
│ ├── model.json
│ ├── model_labels.json
│ └── sites.txt
│
├── tools/
│ ├── crawl.js
│ ├── launch-chrome.js
│ ├── train.py
│ └── exports/
│
├── scripts/
│ └── bundle-libs.js
│
└── LICENSE
extension/ — changes take effect after clicking ⟳ in chrome://extensionsnpm run bundle-libs is needed oncenpm run bundle-libs && npm run validate (same checks as GitHub Actions CI)Chrome Web Store uploads run automatically when you publish a GitHub Release whose tag matches extension/manifest.json (see scripts/get-cws-token.md for OAuth setup).
[!NOTE] The extension uses Manifest V3.
webRequestBlockingis not available to regular (non-enterprise) MV3 extensions. All blocking is done viadeclarativeNetRequest. Do not addwebRequestblocking listeners — they will be silently ignored.
MIT — Divij Agarwal. See LICENSE.