id: craft-cms-detect

info:
  name: Craft CMS Detect
  author: skeltavik
  severity: info
  description: Detects Craft CMS
  reference:
    - https://craftcms.com
  metadata:
    max-request: 1
  tags: tech,craftcms,discovery

http:
  - method: GET
    path:
      - '{{BaseURL}}'

    host-redirects: true
    max-redirects: 2

    matchers:
      - type: word
        part: header
        words:
          - 'X-Powered-By: Craft CMS'

      - type: regex
        part: header
        regex:
          - 'Set-Cookie: (Craft|CRAFT)'

      - type: regex
        part: body
        regex:
          - '(?i)CRAFT_CSRF_TOKEN'
# digest: 4a0a00473045022100edbed631f955d8c3325f11832ade1259bb003a8ac4281b162db2c1e05f181c32022072edad9876ce94f9b25edc919bfcb1b8ad4990e60f5a34c8eab7fe0151f108c9:922c64590222798bb761d5b6d8e72950