Skip to content

Latest commit

 

History

History
42 lines (25 loc) · 1.79 KB

File metadata and controls

42 lines (25 loc) · 1.79 KB

ChromeDriver Patcher

patch-cd is a utility that modifies ChromeDriver binaries to prevent detection of automated browser control. The tool removes well-known DOM injection indicators that can reveal automation activities to websites.

How It Works

The utility operates entirely in memory:

  1. Loads the ChromeDriver binary into memory
  2. Patches specific identifiers while preserving binary size
  3. Executes the modified binary directly from memory using fexecve()
  4. No temporary files are written to disk, avoiding filesystem write permission requirements

Technical Background

Anti-Detection Patches

These modifications hide automation indicators that websites commonly check for:

Memory-Only Execution Technique

The in-memory execution approach is based on:

Development

Platform Compatibility

The core functionality (memfd_create and fexecve) is Linux-specific. However, for development on other platforms, the tool includes a fallback implementation using temporary files and the standard execve syscall.

Building for Linux from Other Platforms

To compile for Linux when developing on MacOS or other systems:

docker run --rm --user "$(id -u)":"$(id -g)" -v "$PWD":/usr/src/myapp -w /usr/src/myapp rust:1.86.0 cargo build --release