Skip to content

fix(stealth): harden anti-detection against advanced fingerprinting#357

Merged
jackwener merged 1 commit intomainfrom
claude/nostalgic-northcutt
Mar 24, 2026
Merged

fix(stealth): harden anti-detection against advanced fingerprinting#357
jackwener merged 1 commit intomainfrom
claude/nostalgic-northcutt

Conversation

@jackwener
Copy link
Copy Markdown
Owner

Summary

  • navigator.webdriver returns false instead of undefined to match real Chrome behavior
  • Stealth guard moved from discoverable window property to non-enumerable prototype property on EventTarget
  • Interceptor globals (__opencli_intercepted, etc.) made non-enumerable via Object.defineProperty
  • Monkey-patched fetch/XHR disguised with native toString() signatures, including Function.prototype.toString.call() bypass protection
  • XHR instance URL property uses non-enumerable descriptor with neutral name
  • Removed overly broad chrome-extension:// and self-exposing __opencli from stack trace filter patterns
  • Updated download module User-Agent from Chrome/120 to Chrome/134
  • Cleaned up dead STEALTH_GUARD export constant

Test plan

  • All 242 unit tests pass
  • TypeScript type check passes (tsc --noEmit)
  • Manual verify: navigator.webdriver returns false on target sites
  • Manual verify: Object.keys(window).filter(k => k.includes('opencli')) returns empty array
  • Manual verify: fetch.toString() returns function fetch() { [native code] }

🤖 Generated with Claude Code

- navigator.webdriver returns false instead of undefined (matches real Chrome)
- Stealth guard uses non-enumerable prototype property instead of discoverable window prop
- Interceptor globals are non-enumerable via Object.defineProperty
- Monkey-patched fetch/XHR disguised with native toString() signatures
- XHR instance properties use non-enumerable descriptors
- Remove overly broad chrome-extension:// stack filter
- Remove __opencli from stack patterns to avoid self-exposure
- Update download User-Agent from Chrome/120 to Chrome/134
- Clean up dead STEALTH_GUARD export

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jackwener jackwener merged commit 618dae9 into main Mar 24, 2026
11 checks passed
@jackwener jackwener deleted the claude/nostalgic-northcutt branch March 24, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant