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

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: 4b0a0048304602210087eec31a121840c0e9a0b5ee2432366d20b7b58259911e03f4d04a4ddc84fd4a022100b261bf46eb4732a606866130a934ffba05877a71d6201955dc2a19ec8ed8d556:922c64590222798bb761d5b6d8e72950