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: 490a00463044022022ed141224ddf79333ef17db22ff7e353429f88f75c909a4e04f041cf536ba7c022038cd8d269125ed5d4d124d9d5f8f0225c53763900db26a0a79df409584d3f5da:922c64590222798bb761d5b6d8e72950