POC for CVE-2022-22972 affecting VMware Workspace ONE, vIDM, and vRealize Automation 7.6.
## Technical Analysis
A technical root cause analysis of the vulnerability can be found on our blog:
This script can be used by bypass authentication on vRealize Automation 7.6 using CVE-2022-22972. Workspace ONE and vIDM have different authentication endpoints, but the crux of the vulnerability remains the same. We're happy to accept pull requests if you happen to have test articles to verify the flow.
This script works by changing the Host header of a HTTP POST request of a VMware authentication endpoint to a Host controlled by an attacker. This causes the VMware application to reach out to the Host with credential information and if the Host returns 200, the user is successfully authenticated.
This script results in a HZN cookie which can be included with later requests to perform actions as the compromised user.
**NOTE**: The script's default args will send the authentication request to **our AWS API gateway** which is configured to reply with a 200 for the specific endpoint mentioned in the blog. You can change this with the `--host` option. This endpoint **will not receive any sensitive data** during the exploit flow - just a request from the vulnerable application with the bogus auth header which it replies to.
dev@ubuntu:~/vmware/vra/exploit$ python3 CVE-2022-22972.py https://vra-app01.vra.intranet
Extracting state from vcac redirects...
Sending POST to auth endpoint
Set the HZN cookie in your browser to bypass authentication
Update to the latest version or mitigate by following the instructions within the VMSA
## Follow the Horizon3.ai Attack Team on Twitter for the latest security research:
* [Horizon3 Attack Team](https://twitter.com/Horizon3Attack)
* [James Horseman](https://twitter.com/JamesHorseman2)
* [Zach Hanley](https://twitter.com/hacks_zach)
This software has been created purely for the purposes of academic research and for the development of effective defensive techniques, and is not intended to be used to attack systems except where explicitly authorized. Project maintainers are not responsible or liable for misuse of the software. Use responsibly.