Skip to content

dangra/chromedriver-patcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Patch ChromeDriver

patch-cd patches chromedriver binary to well known DOM injections that leak the browser is under scripted control.

It does so by loading chromedriver binary into memory, modifying some identifiers in place respecting binary size, and fexecve'ing directly from memory which doesn't require filesystem write permission of any kind.

For more information on relevant patches:

For patching and execing directly from memory:

Development

memfd_create and fexecve syscalls are only available on Linux, so full development environment requires a linux system (see bellow). But to easy development on other operating systems, the same functionality was implemented using a named temporal file and execve syscall.

Building for linux with Docker

To compile for Linux on MacOS:

docker run --rm --user "$(id -u)":"$(id -g)" -v "$PWD":/usr/src/myapp -w /usr/src/myapp rust:1.53.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