id: concrete5-detect

info:
  name: Concrete5 Detection
  author: Chirag Mistry
  severity: info
  description: |
    An instance running Concrete5 is detected by looking for specific HTTP headers, HTML tags, and known endpoints.
  metadata:
    verified: true
    max-request: 8
  tags: concrete5,detect,tech

http:
  - method: GET
    path:
      - "{{BaseURL}}"
      - "{{BaseURL}}/robots.txt"
      - "{{BaseURL}}/sitemap.xml"
      - "{{BaseURL}}/favicon.ico"
      - "{{BaseURL}}/index.php"
      - "{{BaseURL}}/concrete/js/build/"
      - "{{BaseURL}}/concrete/block/"
      - "{{BaseURL}}/dashboard/"

    stop-at-first-match: true
    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "Powered by Concrete5"
          - "X-Powered-By-Concrete5"
        condition: or
        case-insensitive: true

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        part: body
        name: version
        regex:
          - 'Concrete5 ([0-9.]+)'
          - 'Powered by Concrete5 ([0-9.]+)'

      - type: regex
        part: body
        name: concrete5_id
        regex:
          - 'concrete5-site-id=([a-z0-9]+)'
          - 'concrete5\.org/([^/]+)'
# digest: 4a0a004730450221009d291c6511e243a66485575a58d33dacd733f022c38a7f6931f6ea4a3b3daf2602206f1dc106eb452aa115c08fa01555c539252150daf8a73bf3ea97bd283484e5ca:922c64590222798bb761d5b6d8e72950