Randomize static fingerprint values across browser sessions #71

Closed
opened 2026-02-24 01:13:42 +00:00 by Claude · 2 comments
Collaborator

Parent Epic: #68

Problem

Every browser session created by go-extractor has identical fingerprint values hardcoded in the stealth init scripts:

  • WebGL renderer: always Intel Inc. / Intel Iris OpenGL Engine
  • Plugin list: always the same 3 Chrome plugins with identical descriptions and MIME types
  • Connection info: always { effectiveType: '4g', rtt: 50, downlink: 10, saveData: false }
  • Canvas noise: identical noise pattern every session

Anti-bot systems that fingerprint across sessions can trivially identify go-extractor instances because every session looks identical. Real browsers show natural variation in hardware, plugins, and network conditions.

Proposed Solution

  1. Create a hardware profile pool (5-10 realistic profiles):

    type HardwareProfile struct {
        WebGLVendor    string
        WebGLRenderer  string
        Platform       string
        HWConcurrency  int
        DeviceMemory   int
        ConnectionRTT  int
        ConnectionDown float64
    }
    
    var profiles = []HardwareProfile{
        {"Intel Inc.", "Intel Iris OpenGL Engine", "Win32", 8, 8, 50, 10.0},
        {"Google Inc. (NVIDIA)", "ANGLE (NVIDIA GeForce GTX 1660 ...)", "Win32", 12, 16, 25, 50.0},
        {"Google Inc. (AMD)", "ANGLE (AMD Radeon RX 580 ...)", "Win32", 8, 16, 75, 8.0},
        // ... more profiles
    }
    
  2. Randomly select a profile per session and inject its values into the stealth scripts

  3. Replace static script slices with a dynamic builder:

    func buildStealthScripts(profile HardwareProfile, browser BrowserType) []string {
        // Generate scripts with profile-specific values
    }
    
  4. Add slight randomization within profiles for connection stats (RTT ±20ms, downlink ±2Mbps) to avoid even profile-level fingerprinting

Files to Modify

  • stealth.go — hardware profiles, dynamic script builder
  • browser_init.go — select random profile at session creation
  • stealth_test.go — test profile selection and script generation

References

  • #68 — parent epic
**Parent Epic:** #68 ## Problem Every browser session created by go-extractor has identical fingerprint values hardcoded in the stealth init scripts: - **WebGL renderer:** always `Intel Inc.` / `Intel Iris OpenGL Engine` - **Plugin list:** always the same 3 Chrome plugins with identical descriptions and MIME types - **Connection info:** always `{ effectiveType: '4g', rtt: 50, downlink: 10, saveData: false }` - **Canvas noise:** identical noise pattern every session Anti-bot systems that fingerprint across sessions can trivially identify go-extractor instances because every session looks identical. Real browsers show natural variation in hardware, plugins, and network conditions. ## Proposed Solution 1. **Create a hardware profile pool** (5-10 realistic profiles): ```go type HardwareProfile struct { WebGLVendor string WebGLRenderer string Platform string HWConcurrency int DeviceMemory int ConnectionRTT int ConnectionDown float64 } var profiles = []HardwareProfile{ {"Intel Inc.", "Intel Iris OpenGL Engine", "Win32", 8, 8, 50, 10.0}, {"Google Inc. (NVIDIA)", "ANGLE (NVIDIA GeForce GTX 1660 ...)", "Win32", 12, 16, 25, 50.0}, {"Google Inc. (AMD)", "ANGLE (AMD Radeon RX 580 ...)", "Win32", 8, 16, 75, 8.0}, // ... more profiles } ``` 2. **Randomly select a profile per session** and inject its values into the stealth scripts 3. **Replace static script slices with a dynamic builder:** ```go func buildStealthScripts(profile HardwareProfile, browser BrowserType) []string { // Generate scripts with profile-specific values } ``` 4. **Add slight randomization within profiles** for connection stats (RTT ±20ms, downlink ±2Mbps) to avoid even profile-level fingerprinting ## Files to Modify - `stealth.go` — hardware profiles, dynamic script builder - `browser_init.go` — select random profile at session creation - `stealth_test.go` — test profile selection and script generation ## References - #68 — parent epic
Claude added the enhancementpriority/mediumtype/task labels 2026-02-24 01:13:50 +00:00
Author
Collaborator

Starting work on this issue. Plan:

  1. Replace static stealthChromiumScripts and stealthFirefoxScripts vars with builder functions that accept a hardware profile struct
  2. Add pools of 6 realistic profiles per engine, randomly sampled per session
  3. Add connection jitter (±20ms RTT, ±2 Mbps downlink) for Chromium profiles
  4. Update browser_init.go to call builders instead of referencing static slices
  5. Update tests to use builder functions

Branch: feature/71-randomize-fingerprints

Starting work on this issue. Plan: 1. Replace static `stealthChromiumScripts` and `stealthFirefoxScripts` vars with builder functions that accept a hardware profile struct 2. Add pools of 6 realistic profiles per engine, randomly sampled per session 3. Add connection jitter (±20ms RTT, ±2 Mbps downlink) for Chromium profiles 4. Update `browser_init.go` to call builders instead of referencing static slices 5. Update tests to use builder functions Branch: `feature/71-randomize-fingerprints`
Author
Collaborator

Work finished. PR #74 implements fingerprint randomization:

  • Replaced static stealthChromiumScripts/stealthFirefoxScripts with builder functions accepting hardware profile structs
  • 6 realistic profiles per engine (Chromium ANGLE strings, Firefox Mesa/native driver strings), randomly sampled per session
  • Chromium connection stats get per-session jitter (±20ms RTT, ±2 Mbps downlink)
  • 7 new tests covering profile pools, value templating, connection jitter, and single-quote guards
  • All existing tests adapted and passing

#74

Work finished. PR #74 implements fingerprint randomization: - Replaced static `stealthChromiumScripts`/`stealthFirefoxScripts` with builder functions accepting hardware profile structs - 6 realistic profiles per engine (Chromium ANGLE strings, Firefox Mesa/native driver strings), randomly sampled per session - Chromium connection stats get per-session jitter (±20ms RTT, ±2 Mbps downlink) - 7 new tests covering profile pools, value templating, connection jitter, and single-quote guards - All existing tests adapted and passing https://gitea.stevedudenhoeffer.com/steve/go-extractor/pulls/74
steve closed this issue 2026-02-24 01:39:28 +00:00
Sign in to join this conversation.