id: CVE-2020-3952

info:
  name: VMware vCenter Server LDAP Broken Access Control
  author: 0x_Akoko
  severity: critical
  description: |
    Under certain conditions, vmdir that ships with VMware vCenter Server, as part of an embedded or external Platform Services Controller (PSC), does not correctly implement access controls.
  impact: |
    Unauthorized users may access sensitive functions, potentially leading to privilege escalation or data exposure.
  remediation: |
    Apply the latest security patches and updates provided by VMware to address access control issues.
  reference:
    - https://nvd.nist.gov/vuln/detail/CVE-2020-3952
    - https://www.vmware.com/security/advisories/VMSA-2020-0006.html
    - https://github.com/guardicore/vmware_vcenter_cve_2020_3952
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2020-3952
    cwe-id: CWE-306
    epss-score: 0.90384
    epss-percentile: 0.99787
    cpe: cpe:2.3:a:vmware:vcenter_server:6.7:-:*:*:*:*:*:*
  metadata:
    verified: false
    max-request: 1
    vendor: vmware
    product: vcenter_server
  tags: cve,cve2020,vmware,vcenter,ldap,auth-bypass,passive,kev,vkev

http:
  - raw:
      - |
        POST /sdk/ HTTP/1.1
        Host: {{Hostname}}
        Content-Type: text/xml
        SOAPAction: "urn:vim25/6.5"

        <?xml version="1.0" encoding="UTF-8"?>
        <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
           <soap:Header>
              <operationID>00000001-00000001</operationID>
           </soap:Header>
           <soap:Body>
              <RetrieveServiceContent xmlns="urn:internalvim25">
                 <_this xsi:type="ManagedObjectReference" type="ServiceInstance">ServiceInstance</_this>
              </RetrieveServiceContent>
           </soap:Body>
        </soap:Envelope>

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - 'RetrieveServiceContentResponse'
          - 'urn:vim'
        condition: or

      - type: word
        part: content_type
        words:
          - "text/xml"

      - type: status
        status:
          - 200

      - type: dsl
        dsl:
          - compare_versions(version, '< 6.7.0')

    extractors:
      - type: regex
        part: body
        name: version
        group: 1
        regex:
          - "<version>([^<]+)</version>"
# digest: 4a0a00473045022100b70d22a9bb82a119c8d5afcb448c1f4bdc1afd3ffc23aed27e6a095011b5eab5022040bceb6bf18c5d4a17fa1906bb3cc01aa6811283cbfc59cc98ef6a3217e3cdd3:922c64590222798bb761d5b6d8e72950