id: drupal-user-enum-ajax

info:
  name: Drupal User Enumration [Ajax]
  author: 0w4ys
  severity: info
  metadata:
    max-request: 4
    shodan-query:
      - http.component:"drupal"
      - cpe:"cpe:2.3:a:drupal:drupal"
    product: drupal
    vendor: drupal
  tags: drupal,misconfig,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/admin/views/ajax/autocomplete/user/a"
      - "{{BaseURL}}/views/ajax/autocomplete/user/a"
      - "{{BaseURL}}/?q=admin/views/ajax/autocomplete/user/a"
      - "{{BaseURL}}/?q=views/ajax/autocomplete/user/a"

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        words:
          - '":"a.'
          - '":"A.'
        part: body

      - type: word
        words:
          - "application/json"
        part: header

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        part: body
        regex:
          - '"[\w \-\_\@\.]+\"'
# digest: 490a0046304402206d8ed777f96c02f13da44e197913827d5f9d0a44befe2001b5cbb1aaa0113f7c02204a957bf6db3549da1115846c1894b4af253de1089080417ea3bccfff23afcba6:922c64590222798bb761d5b6d8e72950