Expand description
Peripheral detection surface hardening.
Covers secondary browser detection vectors that build bot-confidence scores:
- iframe
innerWidthmismatch — ensures iframe inner dimensions differ slightly from the parent window (Kasada check). - Document visibility — forces
document.hidden = falseandvisibilityState = "visible". - Camera / microphone device names — returns platform-appropriate fake
device names with seeded random
deviceId/groupId. - Port scan protection — blocks
fetchandXMLHttpRequestto localhost on commonly-probed ports. - History length — overrides
history.lengthto a plausible 3-8. requestAnimationFrametiming — adds light per-frame jitter to prevent headless rAF timing detection.- PDF viewer — ensures
navigator.pdfViewerEnabledreadstrue.
§Example
use stygian_browser::peripheral_stealth::{peripheral_stealth_script, PeripheralStealthConfig};
use stygian_browser::noise::NoiseSeed;
let cfg = PeripheralStealthConfig::default_with_seed(NoiseSeed::from(1_u64));
let js = peripheral_stealth_script(&cfg);
assert!(js.contains("document.hidden"));
assert!(js.contains("History.prototype"));Structs§
- Peripheral
Stealth Config - Per-subsystem toggles for peripheral stealth injection.
Functions§
- peripheral_
stealth_ script - Generate the peripheral stealth injection script.
- peripheral_
stealth_ script_ with_ profile - Generate peripheral stealth script with optional
FingerprintProfilefor platform-aware device names.