id: drupal-user-enum-redirect

info:
  name: Drupal User Enumeration [Redirect]
  author: 0w4ys
  severity: info
  metadata:
    verified: true
    max-request: 4
    shodan-query: http.component:"Drupal"
  tags: drupal,misconfig

http:
  - method: GET
    path:
      - "{{BaseURL}}/user/0"
      - "{{BaseURL}}/user/1"
      - "{{BaseURL}}/user/2"
      - "{{BaseURL}}/user/3"

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: regex
        regex:
          - '(?i)Location: https?:\/\/[\w\.\-]+[:\/\w-]*\/users\/\w+'
        part: header

      - type: status
        status:
          - 301

    extractors:
      - type: regex
        part: header
        regex:
          - 'users\/\w+'

# digest: 4a0a0047304502200de89bdfcb97c4155efda7d3f5205c3f4a69ad3ba6f4fed003236be2c344fdc8022100dae0c0e6ac45c5ff55dede27fe4bddad9ba930e2566f79daa348ae68d5184bec:922c64590222798bb761d5b6d8e72950
