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: 4b0a00483046022100c8851520b7a8cabec731c2f17cda9e75e0696f14e4fa7f8e5db7beb415883152022100f88a07b77ec43f7d4062e9b7f2b14cb9daeb9be9e455ed70f88bd055197d6f38:922c64590222798bb761d5b6d8e72950