
سكربت Nmap لاكتشاف ثغرة CVE-2021-21972 RCE في VMware vCenter Server من خلال فحص نقطة نهاية uploadova والتحقق من وجود استجابة قابلة للاستغلال.
ثغرة تنفيذ التعليمات البرمجية عن بُعد في VMware vCenter Server CVE-2021-21972
يتحقق هذا البرنامج النصي من وجود ثغرة CVE-2021-21972 بناءً على المسار التالي "/ui/vropspluginui/rest/services/uploadova" عبر طلب POST والبحث في نص الاستجابة (500) عن الكلمات "uploadFile"، ما يعني أن vCenter متاح لقبول الملفات عبر POST دون أي قيود
الفحص اليدوي:
# curl -i -s -k -X $'GET' -H $'Host: <target>' -H $'User-Agent: alex666' $'https://<target>/ui/vropspluginui/rest/services/getstatus'
# curl -i -s -k -X $'GET' -H $'Host: <target>' -H $'User-Agent: alex666'$'https://<target>/ui/vropspluginui/rest/services/uploadova'
# curl -i -s -k -X $'POST' -H $'Host: <target>' -H $'User-Agent: alex666' -H $'Content-Type: application/x-www-form-urlencoded' -H $'Content-Length: 0' $'https://<target>/ui/vropspluginui/rest/services/uploadova'
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-21972
https://www.vmware.com/security/advisories/VMSA-2021-0002.html
nmap -p443 --script CVE-2021-21972.nse <target>
---
-- @usage
-- nmap -p443 --script CVE-2021-21972.nse <target>
-- @output
-- PORT STATE SERVICE
-- 443/tcp open https
-- | CVE-2021-21972:
-- | VULNERABLE:
-- | vCenter 6.5-7.0 RCE
-- | State: VULNERABLE (Exploitable)
-- | IDs: CVE:CVE-2021-21972
-- | The vSphere Client (HTML5) contains a remote code execution vulnerability in a vCenter Server plugin.
-- | A malicious actor with network access to port 443 may exploit this issue to execute commands with
-- | unrestricted privileges on the underlying operating system that hosts vCenter Server.
-- | Disclosure date: 2021-02-23
-- | References:
-- |_ https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-21972

Alex Hernandez المعروف أيضًا باسم (@_alt3kx_)