id: drupal-login

info:
  name: Drupal Login Panel - Detect
  author: pathtaga
  severity: info
  description: Drupal login panel was detected.
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
    cwe-id: CWE-200
    cpe: cpe:2.3:a:drupal:drupal:*:*:*:*:*:*:*:*
  metadata:
    max-request: 2
    vendor: drupal
    product: drupal
    shodan-query:
      - http.component:"drupal"
      - cpe:"cpe:2.3:a:drupal:drupal"
  tags: panel,drupal,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}"
      - "{{BaseURL}}/user/login"

    stop-at-first-match: true

    matchers-condition: or
    matchers:
      - type: regex
        part: body
        regex:
          - '<(?:link|style)[^>]+"/sites/(?:default|all)/(?:themes|modules)/'
          - '<[^>]+(?:id="block[_-]commerce[_-]cart[_-]cart|class="commerce[_-]product[_-]field)'
        condition: or

      - type: regex
        part: header
        regex:
          - '(?i)x-drupal'
          - "(?i)x-generator: drupal"
        condition: or
# digest: 4a0a00473045022100f39f5c60f2d67f0848e52a825139e20c9a5f9db6fba9a4ed225899e92f87ab5f02201434dd9033fa446b800cbf470fa2b671f8ce428c749d6cb5b36bc147e7aceb9b:922c64590222798bb761d5b6d8e72950