Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ BrowserShield

Real-time browser security monitoring application + Chrome extension.

BrowserShield reads actual browser data (history, bookmarks, extensions) from all installed browsers, monitors your network connections in real-time, detects ads/trackers, and uses AI agents (Gemini, OpenAI, Claude) for intelligent threat analysis.

Dashboard Extension AI


✨ Features

πŸ–₯️ Dashboard

  • Real browser history from Chrome, Safari, Edge, Brave, Firefox
  • Real bookmarks from all browsers
  • 52+ installed apps detection with categories
  • 11+ browser extensions with risk analysis
  • Activity heatmap (24-hour view)
  • Threat breakdown with risk scoring

πŸ“‘ Network Monitor

  • Upload/Download bandwidth tracking (real-time)
  • Active connections table with process names
  • Hidden packet detection β€” catches suspicious connections
  • Data exfiltration monitoring β€” flags connections to pastebin, ngrok, webhook.site, etc.
  • Suspicious port scanning β€” detects ports 4444, 1337, 31337, etc.

πŸ€– AI Security Agents

  • Gemini, OpenAI, Claude integration
  • API keys stored in .env (never hardcoded)
  • Auto-analyze threats β€” AI activates when threats are detected
  • Test any URL with AI from the dashboard
  • Alerts pushed to Live Activity stream

πŸ” URL Detail Modal

  • Click any URL in history to see full details
  • Total visits, unique pages, first/last visit
  • 30-day visit graph (bar chart)
  • Browser breakdown (which browser visited most)
  • Recent pages list on that domain

⚑ Live Activity

  • Real-time URL monitoring as you browse
  • Browser open/close detection
  • WebSocket-powered live updates

🚫 Ads & Trackers

  • Ad/tracker detection across browsing history
  • Top ad networks breakdown
  • Percentage of browsing affected

🧩 Chrome Extension (v2.0)

  • 4-tab popup: Security, Time, Extensions, Settings
  • Time tracking per domain
  • IP address resolution (Cloudflare DNS-over-HTTPS)
  • Ad blocking β€” 50 declarativeNetRequest rules + DOM ad removal
  • Settings β€” on/off toggles, custom block/allow URL lists
  • Extension listing via chrome.management API

πŸ“¦ Installation

Prerequisites

  • Node.js v18+ (Download)
  • npm (comes with Node.js)
  • macOS, Windows, or Linux

Quick Start

# 1. Clone the repository
git clone https://github.com/Jalendar10/Browsershield.git
cd Browsershield

# 2. Install dependencies
npm install

# 3. Start the server
npm start

The dashboard opens at http://localhost:3847 πŸš€

Install the Chrome Extension

# Auto-open browser extension pages
npm run install-extension

Then in the browser:

  1. Enable Developer mode (top-right toggle)
  2. Click Load unpacked
  3. Select the extension/ folder from this project

Enable Auto-Start on Login

npm run autostart

This creates a LaunchAgent (macOS) so BrowserShield starts automatically when you log in.


πŸ€– AI Setup (Optional)

To enable AI-powered threat analysis, add your API keys:

Option 1: Via Dashboard

  1. Go to AI Settings in the sidebar
  2. Enter your API key(s)
  3. Click Save AI Settings

Option 2: Via .env file

Create a .env file in the project root:

# Choose: gemini, openai, or claude
AI_PROVIDER=gemini

# Google Gemini (https://aistudio.google.com/apikey)
GEMINI_API_KEY=your_key_here

# OpenAI (https://platform.openai.com/api-keys)
OPENAI_API_KEY=your_key_here

# Anthropic Claude (https://console.anthropic.com/)
CLAUDE_API_KEY=your_key_here

πŸ—‚οΈ Project Structure

Browsershield/
β”œβ”€β”€ server.js                    # Express + WebSocket server
β”œβ”€β”€ package.json                 # Dependencies & scripts
β”œβ”€β”€ .env                         # AI API keys (not committed)
β”œβ”€β”€ public/                      # Frontend dashboard
β”‚   β”œβ”€β”€ index.html               # Main dashboard (9 sections)
β”‚   β”œβ”€β”€ styles.css               # Dark cybersecurity theme
β”‚   └── app.js                   # Frontend logic
β”œβ”€β”€ src/core/                    # Backend modules
β”‚   β”œβ”€β”€ browser-detector.js      # Detect installed browsers
β”‚   β”œβ”€β”€ history-reader.js        # Read browser history (SQLite)
β”‚   β”œβ”€β”€ bookmark-reader.js       # Read bookmarks
β”‚   β”œβ”€β”€ threat-analyzer.js       # URL threat scoring
β”‚   β”œβ”€β”€ live-monitor.js          # File system watcher
β”‚   β”œβ”€β”€ process-monitor.js       # Running browser detection
β”‚   β”œβ”€β”€ app-monitor.js           # Installed apps scanner
β”‚   β”œβ”€β”€ extension-reader.js      # Browser extensions reader
β”‚   β”œβ”€β”€ ad-tracker.js            # Ad/tracker analysis
β”‚   β”œβ”€β”€ network-monitor.js       # Bandwidth & connection monitor
β”‚   └── ai-agents.js             # Gemini/OpenAI/Claude integration
β”œβ”€β”€ extension/                   # Chrome Extension (Manifest V3)
β”‚   β”œβ”€β”€ manifest.json            # Extension config
β”‚   β”œβ”€β”€ background.js            # Service worker
β”‚   β”œβ”€β”€ content.js               # Ad blocker & DOM scanner
β”‚   β”œβ”€β”€ popup.html/css/js        # 4-tab popup UI
β”‚   β”œβ”€β”€ rules.json               # 50 ad-blocking rules
β”‚   └── icons/                   # Extension icons
└── scripts/                     # Utility scripts
    β”œβ”€β”€ install-extension.js     # Auto-open extension pages
    └── autostart.js             # Enable auto-start on login

πŸ› οΈ Scripts

Command Description
npm start Start BrowserShield server at http://localhost:3847
npm run install-extension Open browser extension pages for installation
npm run autostart Enable auto-start on login

πŸ“Έ Screenshots

Dashboard

Full overview with 8 stat cards, detected browsers, top domains, activity heatmap, and threat breakdown.

Network Monitor

Real-time bandwidth (upload/download), active connections table, hidden packet threat detection.

AI Security Agents

Gemini/OpenAI/Claude agent cards, API key configuration, and test URL analysis.

URL Detail Modal

Click any URL for full stats: visits, unique pages, 30-day graph, browser breakdown, recent pages.


βš™οΈ How It Works

  1. Browser Detection β€” Scans for Chrome, Safari, Edge, Brave, Firefox
  2. Data Reading β€” Reads SQLite databases for history/bookmarks
  3. Threat Analysis β€” Scores every URL (0-100 risk score)
  4. Network Monitoring β€” Uses lsof/netstat for active connections
  5. AI Analysis β€” Sends threats to AI agent for intelligent assessment
  6. Real-time Updates β€” WebSocket pushes live browsing activity
  7. Extension β€” Runs in-browser for per-page analysis and ad blocking

πŸ”’ Privacy

  • 100% local β€” No data leaves your machine (except AI API calls if configured)
  • No telemetry β€” Zero tracking or analytics
  • Your data stays yours β€” All browser data is read directly from local files

πŸ“„ License

MIT License β€” feel free to use, modify, and distribute.


Built with ❀️ by Jalendar

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages