id: silverstripe-detect

info:
  name: SilverStripe Detection
  author: Chirag Mistry
  severity: info
  description: |
    An instance running SilverStripe is detected by looking for specific HTTP headers, HTML tags, and known endpoints.
  metadata:
    max-request: 9
    shodan-query: http.component:"SilverStripe"
  tags: silverstripe,detect,tech

http:
  - method: GET
    path:
      - "{{BaseURL}}"
      - "{{BaseURL}}/robots.txt"
      - "{{BaseURL}}/sitemap.xml"
      - "{{BaseURL}}/favicon.ico"
      - "{{BaseURL}}/index.php"
      - "{{BaseURL}}/assets/"
      - "{{BaseURL}}/cms/"
      - "{{BaseURL}}/admin/"
      - "{{BaseURL}}/themes/"

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

      - type: status
        status:
          - 200
          - 403

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

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