Skip to content

Commit c636b8a

Browse files
committed
docs: add AudioLab tool with JSONL viewer, multi-context test scene, and cross-linked documentation
1 parent a7f0574 commit c636b8a

13 files changed

Lines changed: 1524 additions & 5 deletions

File tree

ADVANCED_FEATURES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ All commands live under the `BotBrowser` CDP domain. Send them through a CDP ses
492492
- [Validation Results](VALIDATION.md) - Research and testing data
493493
- [Mirror](tools/mirror/) - Distributed privacy consistency verification
494494
- [CanvasLab](tools/canvaslab/) - Canvas 2D / WebGL / WebGL2 forensics and tracking analysis tool
495+
- [AudioLab](tools/audiolab/) - Web Audio API forensics and audio fingerprint collection analysis tool
495496
- [Examples](examples/) - Playwright, Puppeteer, bot-script integration
496497
- [Main README](README.md) - Project overview and quick start
497498

CLI_FLAGS.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,25 @@ Records all Canvas 2D, WebGL, and WebGL2 API calls to a JSONL file for forensic
242242

243243
Learn more: [CanvasLab Documentation](tools/canvaslab/)
244244

245+
<a id="--bot-audio-record-file"></a>
246+
### `--bot-audio-record-file`
247+
Web Audio forensics and tracking analysis.
248+
249+
Records all Web Audio API calls to a JSONL file for forensic analysis of audio fingerprint collection.
250+
251+
```bash
252+
--bot-audio-record-file="/tmp/audiolab.jsonl"
253+
```
254+
255+
**Key Features:**
256+
- Complete Web Audio API recording: context creation, node creation, parameter setting, routing topology, data extraction
257+
- Automatic detection of common audio fingerprinting patterns
258+
- Sample previews (first/last 10 values, sums) for quick inspection
259+
- Codec support queries (canPlayType, MediaSource.isTypeSupported)
260+
- JSONL format for easy parsing with `jq` or the interactive Audio Viewer
261+
262+
Learn more: [AudioLab Documentation](tools/audiolab/)
263+
245264
<a id="--bot-script"></a>
246265
### `--bot-script`
247266
Framework-less approach with a privileged JavaScript context.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ Examples: [Playwright](examples/playwright/) • [Puppeteer](examples/puppeteer/
170170
| Headless / GUI parity | [Headless Compatibility](ADVANCED_FEATURES.md#headless-incognito-compatibility) | [Guide](docs/guides/fingerprint/INCOGNITO.md) |
171171
| Mirror: distributed privacy consistency | [Mirror Documentation](tools/mirror/) | [Guide](docs/guides/deployment/MIRROR_DISTRIBUTED.md) |
172172
| CanvasLab: Canvas 2D / WebGL / WebGL2 recorder | [--bot-canvas-record-file](CLI_FLAGS.md#--bot-canvas-record-file) | [Guide](docs/guides/getting-started/CANVASLAB.md) |
173+
| AudioLab: Web Audio API recorder | [--bot-audio-record-file](CLI_FLAGS.md#--bot-audio-record-file) | [Guide](docs/guides/getting-started/AUDIOLAB.md) |
173174

174175
### Session & Behavior
175176

docs/guides/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ These guides cover everything from initial setup to advanced deployment scenario
1919
| [First Verification](getting-started/FIRST_VERIFICATION.md) | Validate fingerprint consistency with CreepJS, Iphey, BrowserScan, and Pixelscan. |
2020
| [Automation Consistency Practices](getting-started/AUTOMATION_CONSISTENCY.md) | Reduce framework-related inconsistency signals in Playwright/Puppeteer workflows. |
2121
| [CanvasLab](getting-started/CANVASLAB.md) | Record Canvas 2D, WebGL, and WebGL2 API calls to study tracking techniques and verify fingerprint protection. |
22+
| [AudioLab](getting-started/AUDIOLAB.md) | Record Web Audio API calls to study audio fingerprint collection and verify audio privacy protection. |
2223

2324
<a id="network-proxy"></a>
2425
## Network and Proxy

docs/guides/fingerprint/AUDIO.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,15 @@ To verify protection is active:
100100

101101
## Next Steps
102102

103+
- [AudioLab](../getting-started/AUDIOLAB.md). Record and analyze Web Audio API calls for forensic inspection.
103104
- [Canvas Fingerprinting](CANVAS.md). Another rendering-based fingerprint surface.
104105
- [Performance Fingerprinting](PERFORMANCE.md). Timing as a tracking vector.
105106
- [Browser Fingerprinting Explained](BROWSER_OVERVIEW.md). The full fingerprinting landscape.
106107
- [CLI Flags Reference](../../../CLI_FLAGS.md). All noise and configuration flags.
107108

108109
---
109110

110-
**Related documentation:** [Advanced Features: Multi-Layer Fingerprint Noise](../../../ADVANCED_FEATURES.md#multi-layer-fingerprint-noise) | [CLI Flags Reference](../../../CLI_FLAGS.md)
111+
**Related documentation:** [Advanced Features: Multi-Layer Fingerprint Noise](../../../ADVANCED_FEATURES.md#multi-layer-fingerprint-noise) | [AudioLab Forensics Tool](../../../tools/audiolab/) | [CLI Flags Reference](../../../CLI_FLAGS.md)
111112

112113
---
113114

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
# AudioLab: Web Audio Forensics and Tracking Analysis
2+
3+
> Record Web Audio API calls to study audio fingerprint collection techniques and verify privacy protection.
4+
5+
---
6+
7+
<a id="prerequisites"></a>
8+
9+
## Prerequisites
10+
11+
- **BotBrowser** installed and running. See [Installation Guide](../../../INSTALLATION.md).
12+
- **A profile file** (`.enc` for production).
13+
14+
---
15+
16+
<a id="quick-start"></a>
17+
18+
## Quick Start
19+
20+
Record all Web Audio API calls to a JSONL file:
21+
22+
```bash
23+
chromium-browser \
24+
--bot-profile="/path/to/profile.enc" \
25+
--bot-audio-record-file=/tmp/audiolab.jsonl \
26+
--user-data-dir="$(mktemp -d)" \
27+
"https://example.com"
28+
```
29+
30+
After the session, `/tmp/audiolab.jsonl` contains every Web Audio API call the page made. Open it in the [Audio Viewer](https://botswin.github.io/BotBrowser/docs/tools/audiolab/audio_viewer.html) to inspect events interactively.
31+
32+
---
33+
34+
<a id="how-it-works"></a>
35+
36+
## How It Works
37+
38+
When `--bot-audio-record-file` is set, BotBrowser intercepts every Web Audio API call at the browser engine level and writes it to a JSONL file. Each line is a JSON object representing one API call, including:
39+
40+
- **Event type**: `context_create`, `node_create`, `param_set`, `connect`, `start`, `start_rendering`, `read_channel_data`, `analyser_read`, `codec_check`, and more
41+
- **Full parameters**: all arguments serialized (node types, parameter values, timing, sample previews)
42+
- **Audio graph topology**: which nodes connect to which, showing the complete signal routing
43+
- **Data extraction**: sample previews (first 10 + last 10 values), sums, frequency data, codec results
44+
- **Execution context**: sequence number, timestamp, process/thread ID, source URL
45+
46+
---
47+
48+
<a id="common-scenarios"></a>
49+
50+
## Common Scenarios
51+
52+
### Record and analyze with Playwright
53+
54+
```javascript
55+
import { chromium } from "playwright-core";
56+
57+
const browser = await chromium.launch({
58+
executablePath: process.env.BOTBROWSER_EXEC_PATH,
59+
headless: true,
60+
args: [
61+
`--bot-profile=${process.env.BOT_PROFILE_PATH}`,
62+
"--bot-audio-record-file=/tmp/audiolab.jsonl",
63+
],
64+
});
65+
66+
const page = await browser.newPage();
67+
await page.goto("https://example.com");
68+
// Let the page run its audio fingerprinting
69+
await page.waitForTimeout(5000);
70+
await browser.close();
71+
72+
// Now inspect /tmp/audiolab.jsonl
73+
```
74+
75+
### View recordings in the Audio Viewer
76+
77+
Open the HTML-based viewer to inspect recordings interactively:
78+
79+
1. Navigate to the [Audio Viewer](https://botswin.github.io/BotBrowser/docs/tools/audiolab/audio_viewer.html)
80+
2. Load your `.jsonl` file
81+
3. Browse events, view the audio graph topology, and inspect extracted data
82+
83+
### Identify which fingerprinting recipe a site uses
84+
85+
The Audio Viewer automatically detects known recipes:
86+
87+
```bash
88+
# Record a site's audio fingerprinting
89+
chromium-browser \
90+
--bot-profile="/path/to/profile.enc" \
91+
--bot-audio-record-file=/tmp/audiolab.jsonl \
92+
--user-data-dir="$(mktemp -d)" \
93+
"https://target-site.com"
94+
95+
# Quick check: what context parameters were used?
96+
cat /tmp/audiolab.jsonl | jq 'select(.type == "context_create")'
97+
# The viewer auto-detects common patterns from context parameters
98+
```
99+
100+
### Inspect extracted audio data
101+
102+
```bash
103+
# See what data the tracker extracted
104+
cat /tmp/audiolab.jsonl | jq 'select(.type == "read_channel_data")'
105+
106+
# Check codec probing
107+
cat /tmp/audiolab.jsonl | jq 'select(.type == "codec_check")'
108+
```
109+
110+
### Cross-platform protection validation
111+
112+
Record the same page on multiple platforms and compare the JSONL output to verify that BotBrowser's noise produces consistent protection:
113+
114+
```bash
115+
# Record on Linux host
116+
chromium-browser \
117+
--bot-profile="/path/to/win-profile.enc" \
118+
--bot-audio-record-file=/tmp/audiolab-linux.jsonl \
119+
--user-data-dir="$(mktemp -d)" \
120+
"https://example.com"
121+
122+
# Compare with recording from macOS host
123+
diff /tmp/audiolab-linux.jsonl /tmp/audiolab-macos.jsonl
124+
```
125+
126+
### Record audio and canvas simultaneously
127+
128+
```bash
129+
chromium-browser \
130+
--bot-profile="/path/to/profile.enc" \
131+
--bot-audio-record-file=/tmp/audiolab.jsonl \
132+
--bot-canvas-record-file=/tmp/canvaslab.jsonl \
133+
--user-data-dir="$(mktemp -d)" \
134+
"https://example.com"
135+
```
136+
137+
---
138+
139+
<a id="troubleshooting"></a>
140+
141+
## Troubleshooting / FAQ
142+
143+
| Problem | Solution |
144+
|---------|----------|
145+
| JSONL file is empty | Ensure the page actually uses Web Audio APIs. Try a known fingerprint test site like [CreepJS](https://abrahamjuliot.github.io/creepjs/). |
146+
| File path not writable | Use an absolute path and ensure the directory exists. BotBrowser does not create parent directories. |
147+
| Only codec_check events appear | The page may only test codec support (canPlayType/isTypeSupported) without rendering audio. This is normal for some tracking systems. |
148+
| Missing analyser_read events | Not all fingerprinting patterns use AnalyserNode. Some recipes only read channel data. |
149+
150+
---
151+
152+
<a id="next-steps"></a>
153+
154+
## Next Steps
155+
156+
- [AudioLab Documentation](../../../tools/audiolab/). Complete reference including recording format, event types, and viewer usage.
157+
- [Audio Fingerprinting](../fingerprint/AUDIO.md). Configure audio noise and rendering consistency.
158+
- [CanvasLab](CANVASLAB.md). Similar forensics tool for Canvas 2D, WebGL, and WebGL2.
159+
- [CLI Flags Reference](../../../CLI_FLAGS.md#--bot-audio-record-file). Flag documentation.
160+
161+
---
162+
163+
**Related documentation:** [AudioLab Tool](../../../tools/audiolab/) | [CLI Flags: --bot-audio-record-file](../../../CLI_FLAGS.md#--bot-audio-record-file)
164+
165+
---
166+
167+
**[Legal Disclaimer & Terms of Use](https://github.com/botswin/BotBrowser/blob/main/DISCLAIMER.md) - [Responsible Use Guidelines](https://github.com/botswin/BotBrowser/blob/main/RESPONSIBLE_USE.md)**. BotBrowser is for authorized fingerprint protection and privacy research only.

0 commit comments

Comments
 (0)