Skip to content

Patch Chromedriver binary in-memory just before executing it

Notifications You must be signed in to change notification settings

dangra/chromedriver-patcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Patch Chromedriver binary in-memory just before executing it

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published