GitHub - rskkinfosec/browseguard: Guards your data while browsing · GitHub
Skip to content

rskkinfosec/browseguard

Folders and files

Repository files navigation

🔒 BrowseGuard Extension# Request Logger & Modifier Browser Extension

A comprehensive privacy-focused browser extension that intercepts, logs, and anonymizes web requests while providing advanced data protection features. Built with Manifest V3 for modern Chrome extensions.A Chrome/Edge browser extension that intercepts HTTP requests, modifies them, logs each stage of processing, and displays detailed logs in an organized UI with export capabilities.

✨ Key Features## Features

  • 🔒 Advanced Anonymization: Automatically protects emails, phones, credit cards, SSNs, API tokens, and more- Request Interception: Captures all HTTP requests (GET, POST, etc.)

  • 🎯 Smart Request Detection: Separates user-meaningful requests from background noise- Stage-by-Stage Logging: Logs at every processing stage:

  • ⚖️ Configurable Privacy Levels: Multiple presets from minimal to high privacy - User Input (Query/Body)

  • 📊 Real-time Logging: Live request monitoring with categorized display - Modified Query/Body

  • 🔧 Request Modification: Testing capabilities with data transformation - Server Response

  • 📤 Export & Analysis: JSON export for security analysis and compliance - Reverse Modification

  • 🎛️ User Controls: Easy toggle for anonymization and privacy level selection - Errors

  • 🎯 Intelligent Filtering: Automatically identifies user-meaningful requests from noise

🚀 Quick Start - Filters out tracking, analytics, and resource files

  • Highlights actual user actions (searches, logins, API calls)

Installation - Works with Google, Bing, Yahoo, DuckDuckGo, Baidu, Yandex, and more

  1. Download or clone this repository- Organized UI: Separate sections with color-coded displays for each log type

  2. Open Chrome → chrome://extensions/- Filtering: Filter logs by type with dedicated buttons

  3. Enable "Developer mode" (top right toggle)- Statistics: Real-time counts of different log types

  4. Click "Load unpacked" → Select the browseguard directory- Auto-refresh: Logs update automatically every 2 seconds

  5. Extension icon appears in toolbar- Export Logs: Export all or meaningful-only logs as JSON for analysis

  • Clear Logs: Clear all logs with one click

First Use

  1. Click the extension icon to open the control panel## Installation

  2. Anonymizer is enabled by default with High Privacy mode

  3. Choose your privacy level: High Privacy, Balanced, Log Mode, or Minimal### Chrome/Edge (Developer Mode)

  4. Monitor requests and verify sensitive data is protected

  5. Open Chrome/Edge and navigate to chrome://extensions/ or edge://extensions/

🔒 Privacy Protection2. Enable "Developer mode" (toggle in top-right corner)

  1. Click "Load unpacked"

Anonymization Coverage4. Select the Project_Browser_Extensions folder

| Data Type | Example | Protected As |5. The extension icon should appear in your toolbar

|-----------|---------|--------------|

| Emails | john.doe@company.com | [EMAIL_PROTECTED] |## Usage

| Phone Numbers | (555) 123-4567 | [PHONE_PROTECTED] |

| URLs | https://api.site.com/user?token=abc123 | [URL_PROTECTED] |1. Click the extension icon in your browser toolbar

| IP Addresses | 192.168.1.100 | [IP_PROTECTED] |2. Browse any website - the extension will automatically log requests

| Credit Cards | 4111-1111-1111-1111 | [CARD_PROTECTED] |3. Use 🎯 "User-Meaningful Only" filter to see only actual user requests (recommended!)

| Social Security | 123-45-6789 | [SSN_PROTECTED] |4. View logs organized by type:

| API Tokens | Bearer eyJhbGc... | [TOKEN_PROTECTED] | - User Input: Original request query parameters and body

| Session IDs | PHPSESSID=abc123... | [SESSION_PROTECTED] | - Modified Data: Data after modification processing

  • Server Response: HTTP response status and details

Privacy Levels - Reverse Modified: Post-processed response data

  • 🔒 High Privacy: Maximum protection, anonymizes all sensitive data - Errors: Any network errors encountered

  • ⚖️ Balanced: Protects PII while preserving some context for debugging5. Export logs for analysis:

  • 📋 Log Mode: Optimized for log analysis with token/auth focus - Click "Export Logs" for complete data

  • 📝 Minimal: Basic email/phone protection with minimal performance impact - Click "Export Meaningful" for clean, filtered data

  1. Use filter buttons to view specific log types

🎛️ User Controls7. Click "Refresh" to manually update logs

  1. Click "Clear Logs" to remove all logged data

Main Toggle

  • 🔒 Anonymizer: ON/OFF - Master switch for all anonymization### Finding Your Requests in the Noise

  • Visual feedback with color-coded status

  • Instant enable/disable without extension reloadModern websites make hundreds of requests. Use the 🎯 User-Meaningful Only button to filter out:

  • ❌ JavaScript/CSS files

Privacy Level Selector- ❌ Images and fonts

  • Dropdown menu for quick preset switching- ❌ Analytics and tracking

  • Real-time application to new requests- ❌ Background widgets

  • Saved preferences across browser sessions

And show only:

Advanced Features- ✅ Your searches

  • Smart Filtering: User-meaningful vs background requests- ✅ Your form submissions

  • Export Options: All logs or meaningful requests only- ✅ Your logins

  • Real-time Stats: Request counts and categorization- ✅ Your API calls

  • Clear Logs: Privacy-focused log management

Documentation

📊 Request Intelligence

  • SETUP.md - Installation and setup instructions

User-Meaningful Detection 🎯- TEST_MODE_GUIDE.md - Current test mode: All inputs replaced with "who is India's PM?"

Automatically identifies important requests:- FILTERING_GUIDE.md - How to find your requests in the noise

  • Search Queries: Google, Bing, DuckDuckGo, Yahoo, Baidu, Yandex- DETECTION_LOGIC.md - How meaningful request detection works

  • API Endpoints: /api/, /graphql, /rest/, versioned APIs- MODIFICATION_GUIDE.md - How request modification is implemented

  • Authentication: Login, OAuth, token exchanges- EXPORT_GUIDE.md - How to export and use logs for analysis

  • User Actions: Form submissions, CRUD operations- ANALYSIS_README.md - Tools and methods for analyzing exported logs

  • File Operations: Uploads, downloads

🧪 Test Mode Active

Background Noise Filtering 📦

Filters out irrelevant requests:The extension is currently in TEST MODE.

  • Static resources (CSS, JS, images, fonts)

  • Analytics and tracking pixelsAll user inputs (queries and POST bodies) will be automatically replaced with:

  • Third-party widgets and ads**"Modified Test String"**

  • System-generated heartbeats

This makes it easy to verify that modification is working.

🔧 Technical Architecture

Quick Test:

Components1. Go to Google

  • Background Script: Service worker handling request interception2. Search for anything (e.g., "hello world")

  • Content Script: Page-level request modification3. URL should change to show q=Modified+Test+String

  • Popup Interface: User controls and log visualization4. Search results show "Modified Test String" instead of your query

  • Anonymizer Engine: Pattern-based data protection

  • Storage Manager: Persistent settings and log managementSee TEST_MODE_GUIDE.md for complete testing instructions

Data Flow## Export & Analysis

  1. Request Capture: Background script intercepts all requests

  2. Classification: Smart filtering identifies meaningful requests### Export Logs

  3. Anonymization: Sensitive data automatically protected

  4. Storage: Anonymized logs stored locallyClick the "Export Logs" or "Export Meaningful" button in the extension popup to download logs as JSON.

  5. Display: Protected data shown in popup interface

Analyze Logs

📁 Project Structure

Use the included Python script:


browseguard/```bash

├── manifest.json              # Extension configuration# View statistics

├── background.js              # Request interception & loggingpython analyze_logs.py request-logs-meaningful-1730203845.json

├── content-script.js          # Page-level modification

├── extension-anonymizer.js    # Anonymization engine# Search for specific terms

├── popup.html/css/js         # User interfacepython analyze_logs.py request-logs-meaningful-1730203845.json search google

├── extension-test.html       # Testing interface```

├── COMPLETE_GUIDE.md         # Comprehensive documentation

├── anonymizer-lib/           # Standalone library**See EXPORT_GUIDE.md and ANALYSIS_README.md for complete details**

└── icons/                    # Extension icons

```## File Structure



## 🧪 Testing & Validation```

Project_Browser_Extensions/

### Built-in Test Suite├── manifest.json       # Extension configuration

- Open `extension-test.html` for interactive testing├── background.js       # Background service worker (request interception)

- Verify anonymization of sample sensitive data├── popup.html         # Popup UI structure

- Performance benchmarking tools├── popup.js           # Popup logic and display

- Real-time log validation├── popup.css          # Styling for popup

├── README.md          # This file

### Manual Testing└── icon*.png          # Extension icons (create these)

1. Visit sites with forms (search engines, login pages)```

2. Submit data containing emails, phones, etc.

3. Check extension popup for anonymized logs## Modification Logic

4. Verify sensitive data is protected with 🔒 indicator

The extension includes placeholder modification functions that you can customize:

## 🔐 Security & Compliance

### In `background.js`:

### Privacy Principles

- **Local Processing**: All anonymization happens in browser- **modifyRequestData()**: Modify outgoing request data

- **No External Communication**: Zero data transmission to servers- **reverseModification()**: Process incoming response data

- **Memory Safety**: Original sensitive data not retained

- **User Control**: Complete control over anonymization settingsExample customizations:

- Add custom headers

### Compliance Ready- Transform request payloads

- **GDPR**: European data protection compliance- Encrypt/decrypt data

- **HIPAA**: Healthcare data anonymization- Add authentication tokens

- **PCI-DSS**: Payment card data protection- Filter sensitive information

- **Enterprise**: Corporate data loss prevention

## Permissions

## 🆘 Troubleshooting

- `webRequest`: To intercept and monitor HTTP requests

### Common Issues- `storage`: To persist logs across sessions

- **Anonymizer not working**: Check toggle is ON, reload page if needed- `activeTab`: To access the active tab

- **No logs appearing**: Ensure requests are "meaningful" (not background noise)- `<all_urls>`: To monitor requests to all domains

- **Performance issues**: Use Minimal preset, clear logs regularly

- **Settings not saved**: Check Chrome storage permissions## Notes



### Debug Mode- In Manifest V3, direct request body modification is limited

Enable detailed logging:- For full request modification, consider using `declarativeNetRequest` API

```javascript- Logs are stored in memory and chrome.storage.local (limited to last 100 entries)

// In browser console- The extension filters out `chrome://` and `chrome-extension://` URLs

localStorage.setItem('browseGuard_debug', 'true');

```## Development



## 📄 DocumentationTo modify the extension:



- **Complete Guide**: `COMPLETE_GUIDE.md` - Comprehensive usage and configuration1. Edit the source files

- **API Reference**: `anonymizer-lib/docs/API.md` - Library documentation2. Go to `chrome://extensions/`

- **Source Code**: Inline comments and documentation3. Click the refresh icon on your extension card

4. Test your changes

## 🤝 Contributing

## Security Considerations

1. Fork the repository

2. Create feature branch- This extension has access to all network requests

3. Add tests for new functionality- Be cautious when sharing or publishing

4. Ensure anonymization works correctly- Validate and sanitize any data displayed in the UI

5. Submit pull request with description- Consider implementing content security policies



## 📜 License## Future Enhancements



MIT License - Free for personal and commercial use.- Export logs to JSON/CSV

- Advanced filtering and search

---- Request/response body editing

- Breakpoints for debugging

**Version**: 1.0.0  - Pattern-based modification rules

**Last Updated**: October 29, 2025  - Integration with external APIs

**Chrome Store**: Coming Soon  

**Support**: [GitHub Issues](repository-url/issues)## License

MIT License - Feel free to modify and use as needed.

About

Guards your data while browsing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors