id: expressionengine-detect

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

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

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

      - type: status
        status:
          - 200

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

      - type: regex
        part: body
        name: expressionengine_id
        regex:
          - 'expressionengine-site-id=([a-z0-9]+)'
          - 'expressionengine\.com/([^/]+)'
# digest: 490a00463044022025fbdb3a642b64ca937a55d227042a6e1dc5db5bc9324057590c98173063fd09022005f00204e9447808da9a06688e5f5b5812f41d15b24b1b4db24af8c33f5f6950:922c64590222798bb761d5b6d8e72950