Skip to content

Latest commit

 

History

History
156 lines (115 loc) · 4.6 KB

File metadata and controls

156 lines (115 loc) · 4.6 KB

How to use Browser Telemetry Benchmark

What is this

This tool launches a browser with a clean profile, captures all network traffic via tshark, and shows:

  • Which domains the browser contacts on cold start (without any user action)
  • How many of them are telemetry and tracking
  • Volume of data sent
  • Connection timeline (what and when)

Installation

1. tshark (Wireshark CLI)

brew install wireshark

2. ChmodBPF (network interface access on macOS)

brew install --cask wireshark-chmodbpf

A reboot may be required after installation.

3. Python 3.10+

python3 --version  # Must be 3.10+

Running

⚠️ Requires sudo — root privileges are needed for packet capture.

Measuring a single browser

cd /Volumes/work/browser-telemetry-bench

# Google Chrome
sudo python3 bench.py run --browser "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"

# Brave
sudo python3 bench.py run --browser "/Applications/Brave Browser.app/Contents/MacOS/Brave Browser"

# Yandex Browser
sudo python3 bench.py run --browser "/Applications/Yandex.app/Contents/MacOS/Yandex"

# Firefox
sudo python3 bench.py run --browser "/Applications/Firefox.app/Contents/MacOS/firefox"

# Vacuum Browser (when available)
sudo python3 bench.py run --browser "/path/to/Vacuum Browser.app/Contents/MacOS/Vacuum Browser"

Parameters

Parameter Default Description
--browser, -b (required) Path to browser binary
--duration, -d 120 Total measurement time in seconds
--idle, -i 60 Idle time (cold start without any actions)
--url, -u none URL to load after idle phase
--interface auto Network interface (auto-detected by default)
--output, -o ./results Output folder for results

Examples

# Quick test (60 seconds, 30 idle)
sudo python3 bench.py run -b "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" -d 60 -i 30

# Full test with page load
sudo python3 bench.py run \
  -b "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
  -d 180 \
  -i 60 \
  -u "https://ya.ru"

# Test with a specific interface
sudo python3 bench.py run -b "/Applications/Brave Browser.app/Contents/MacOS/Brave Browser" --interface en0

Comparing browsers

After running several browsers, you can compare the results:

# Compare all results
python3 bench.py compare results/*.json

# Save to a file
python3 bench.py compare results/*.json -o results/comparison.md

Results

Everything is saved in the results/ folder:

File Description
BrowserName_TIMESTAMP.pcap Raw traffic dump (can be opened in Wireshark)
BrowserName_TIMESTAMP.md Human-readable report
BrowserName_TIMESTAMP.json Machine-readable data
comparison.md Comparison table (after compare)

What's in the report

Summary

  • Number of unique domains
  • DNS queries
  • TCP connections
  • Telemetry domains (marked with 🔴)
  • Total traffic volume

Telemetry Domains

List of all domains the tool considers telemetry/tracking, with their category (Google, Yandex, Brave, Mozilla, Microsoft).

Connection Timeline

Chronological list of connections — which domain was contacted first and when. Shows what the browser does immediately on launch.

How classification works

The tool contains 50+ regex patterns of known telemetry domains:

  • Google: *.google-analytics.com, clients*.google.com, update.googleapis.com, etc.
  • Yandex: *.metrika.yandex.ru, mc.yandex.ru, clck.yandex.ru, etc.
  • Brave: *.brave.com, laptop-updates.brave.com, etc.
  • Mozilla: *.telemetry.mozilla.org, normandy.mozilla.org, etc.
  • Microsoft: *.microsoft.com, *.bing.com, etc.

You can add your own patterns to the TELEMETRY_PATTERNS array in bench.py.

Tips

  • Close other browsers before testing — otherwise their traffic will end up in the pcap
  • Use the same parameters when comparing (same duration and idle)
  • Wi-Fi vs Ethernet — results may differ slightly
  • First run of Chrome may download updates — this will skew results. You can run it twice and use the second run
  • pcap files are large — delete old ones when no longer needed

Troubleshooting

"tshark: There are no interfaces on which a capture can be done"

brew install --cask wireshark-chmodbpf
# Reboot your Mac

"Permission denied"

sudo python3 bench.py run ...  # Must be run with sudo

"Browser won't launch"

Check the path to the binary:

ls "/Applications/Google Chrome.app/Contents/MacOS/"