Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2021-21972 PoC — VMware vSphere Client 路径遍历漏洞

Source
Associated Vulnerability
Title:VMware vSphere Client 路径遍历漏洞 (CVE-2021-21972)
Description:VMware vSphere Client是美国威睿(VMware)公司的一个应用软件。提供虚拟化管理。 VMware vSphere Client存在路径遍历漏洞,未授权的攻击者可以通过开放443端口的服务器向vCenter Server发送精心构造的请求,从而在目标系统上远程执行恶意代码。以下产品和版本受到影响:vSphere Client 6.5、vSphere Client 6.7、vSphere Client 7.0、VMware Cloud Foundation(vCenter Server)
Description
Proof of Concept Exploit for vCenter CVE-2021-21972
Readme
# CVE-2021-21972
Proof of Concept Exploit for vCenter CVE-2021-21972

Research credit to: https://swarm.ptsecurity.com/unauth-rce-vmware/, http://noahblog.360.cn/vcenter-6-5-7-0-rce-lou-dong-fen-xi/

Tested on both Windows and Unix vCenter VCSA targets.


## Usage
To benignly check if the target is vulnerable just supply the --target <ip> argument.

To exploit provide the --file, --path, and --operating-system flags.
Write the file supplied in the --file argument to the location specified in the --path argument. 

## Windows Targets:
Tested by uploading the webshell cmdjsp.jsp to the /statsreport endpoint as indicated by PtSwarm. The webshell executes commands in the context of NT AUTHORITY/SYSTEM.

![WindowsExec](Windows-Exec.png)

![WindowsProof](CVE-2021-21972-Windows-Proof.png)

## Unix Targets:
The file will be written in the context of the vsphere-ui user.
If the target is vulnerable, but the exploit fails, it is likely that the vsphere-ui user does not have permissions to write to the specified path.

If writing the vsphere-ui user's SSH authorized_keys, when SSH'ing with the keys it was observed in some cases that the vsphere-ui user's password had expired and forced you to update it (which you cannot because no password is set).

![UnixProof](CVE-2021-21972-Unix-Proof.png)
File Snapshot

[4.0K] /data/pocs/e76f8befc9f49b315af94e2a6024683e34ed83c8 ├── [ 817] cmdjsp.jsp ├── [2.3K] CVE-2021-21972.py ├── [ 38K] CVE-2021-21972-Unix-Proof.png ├── [ 66K] CVE-2021-21972-Windows-Proof.png ├── [ 11K] LICENSE ├── [1.3K] README.md └── [ 23K] Windows-Exec.png 0 directories, 7 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.