id: django-admin-panel

info:
  name: Python Django Admin Login Panel - Detect
  author: pdteam,righettod
  severity: info
  description: Python Django admin 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:djangoproject:django:*:*:*:*:*:*:*:*
  metadata:
    max-request: 2
    vendor: djangoproject
    product: django
    shodan-query: cpe:"cpe:2.3:a:djangoproject:django" || http.title:"Django administration"
  tags: panel,django,python,djangoproject,login,discovery

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

    redirects: true
    max-redirects: 2
    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains_any(to_lower(body), "| django administration", "| django-administration", "django-admin-interface", "<span>django administration</span>")'
        condition: and

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - '(?i)django-admin-interface\s+([0-9.]+)'
# digest: 4a0a00473045022100cbbf775de6d2f254dd798aa568c5e01657923202fdf8e05f3b1ed9964cf7233b022011be4490a8af21b8a772ea3dcd59bd5a7d769012db6a1b7cca79e8ce85d1a7cc:922c64590222798bb761d5b6d8e72950