A browser extension integrated with a Java backend server that analyzes your browsing history, identifies suspicious or malicious URLs, and provides visual reports for safer web usage.
This project combines:
- A browser extension (JavaScript + manifest) to capture and send browsing data.
- A Java-based backend server that stores, analyzes, and classifies URLs.
- An embedded SQLite database for history tracking and frequency analysis.
- Optional VirusTotal integration (VTScanResult) for real-time malicious URL scanning.
✅ Real-time URL monitoring — Detects URLs as you browse
✅ Malicious URL detection — Identifies risky sites using rule-based or API-based checks
✅ History analysis — Parses and stores browsing history in SQLite
✅ Visual report popup — Displays alerts and analysis via the extension popup
✅ Database integration — Maintains scan results and URL frequencies locally
✅ Modular architecture — Easily extendable for new scanning methods
Browser-Extension-main/
├── manifest.json # Extension configuration
├── background.js # Listens for web requests and sends data to backend
├── popup.html # Extension popup UI
├── popup.js # Handles frontend logic for popup
├── blocked.html # Warning page for blocked URLs
├── icon48.svg # Extension icon
├── rules.json # URL filtering rules
│
├── CommunicationServer.java # Handles client-server communication
├── DatabaseManager.java # Manages SQLite database
├── HistoryParser.java # Parses and stores browser history
├── URLAnalyzer.java # Detects URL patterns and frequencies
├── VTScanResult.java # VirusTotal integration (optional)
├── Main.java # Entry point for Java server
│
├── history_analyzer.db # SQLite database
├── sqlite-jdbc.jar # JDBC library for database connection
│
├── build.bat / compile.bat # Windows batch scripts for building
├── create_jar.bat # Packages Java files into a runnable JAR
├── HistoryAnalyzer.bat # Quick-start script
└── Change/ # (Optional) Change logs or configs
- Browser extension captures browsing events.
- Sends URLs to the Java server via a local communication port.
- The backend:
- Parses URLs and stores them in the SQLite database.
- Runs analysis using
URLAnalyzerand optionally VirusTotal API. - Returns a verdict (safe / suspicious / malicious).
- The popup UI displays the result instantly.
- Java 11+
- SQLite JDBC
- Browser with extension developer mode (Chrome, Edge, or Brave)
# On Windows
compile.bat
create_jar.bat
HistoryAnalyzer.batThis starts the local server (CommunicationServer) that listens for URL analysis requests.
- Open your browser → Extensions → Developer Mode: ON
- Click Load unpacked → Select the
Browser-Extension-main/folder - The extension icon should appear in the toolbar
- The extension monitors visited URLs
- The backend classifies them
- Alerts and logs appear in your popup UI
| Table | Description |
|---|---|
history |
Stores URL, timestamp, and status |
scan_results |
Holds VirusTotal or analyzer results |
url_frequency |
Tracks visit counts for frequent analysis |
| Class | Purpose |
|---|---|
CommunicationServer |
Manages HTTP communication between browser and backend |
DatabaseManager |
Creates and maintains SQLite database |
URLAnalyzer |
Checks URLs for patterns, phishing attempts, and frequency |
HistoryParser |
Extracts and stores browsing data |
VTScanResult |
Integrates with VirusTotal API (if configured) |
- You visit
example.com - The extension sends
example.com→CommunicationServer - Server analyzes via
URLAnalyzer - If flagged malicious →
blocked.htmlis shown
Else → Safe browsing continues
# Compile Java source files
javac -cp ".;sqlite-jdbc.jar" *.java
# Package into JAR
jar cfm HistoryAnalyzer.jar Manifest.txt *.class
# Run
java -jar HistoryAnalyzer.jarRun built-in tests with:
python -m warp.testsOr manually visit sample URLs defined in rules.json.
- Java 11+ — Core backend logic
- SQLite — Embedded database
- HTML / JS / CSS — Extension frontend
- JSON — Communication and rules
- VirusTotal API (optional) — External malicious scan verification
P Harshamithran, Navneet Nanda, Yashwant S 🧠 Developed as part of a cybersecurity and browser-safety research project.
This project is licensed under the MIT License.
You are free to modify and redistribute it with attribution.
- Add real-time phishing site detection
- Integrate with browser sandbox for isolation
- Expand to Firefox/Edge extension stores
- Add analytics dashboard for visualization