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
  metadata:
    max-request: 1
    shodan-query: http.title:"Ranger - Sign In"
  tags: apache,ranger,default-login

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: 490a0046304402203bf53c048783b3bfa9ae3b589a837d7490de17871f806fdd517ec3f32b79d9b60220319afc2bd265b8457db14da8706c7852f329078070f5b51a82132229b4b31462:922c64590222798bb761d5b6d8e72950
