SeleniumGreed: Threat actors exploit exposed Selenium Grid services for Cryptomining
Exposed Selenium Grid services lack authentication, allowing attackers to execute arbitrary commands via the WebDriver API. The threat actor used this to run a reverse shell and deploy a cryptominer.
Published on wiz.io
Wiz Research has detected an ongoing threat campaign dubbed “SeleniumGreed” that exploits exposed Selenium Grid services to deploy cryptominers. Selenium is a popular open-source suite used for testing web applications, allowing users to write tests that simulate user interactions across different browsers and…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the lack of default authentication and network security controls on Selenium Grid, which is designed for internal use only.
Impact
Attackers could execute arbitrary commands on exposed Selenium Grid instances, leading to cryptomining and potential further compromise.
What the attacker needed
Selenium Grid exposed to internet; No authentication enabled; Inadequate firewall policy
The fix
Enable authentication and restrict network access to Selenium Grid instances.
How it was found
- Send a request to the exposed Selenium Grid hub with the Chrome binary path set to Python and an argument containing a base64-encoded script.
- The script creates a reverse shell, disables command history logging, and sets an environment variable.
- The attacker then creates a hidden script under /tmp or /dev/shm and executes it with sudo.
- The script downloads the miner and a runner script to /bin, sets permissions, and timestomps the files.
- The script modifies the sudoers file to require a password for the seluser account.
- The miner and scripts are run with nohup to persist after the session ends.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Selenium Grid is a tool for testing websites automatically. If it is left open to the internet without a password, anyone can use it to run commands on the machine, like a remote control. Attackers found these open services and used them to install software that mines cryptocurrency.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.