id: cloudfoundry-detect

info:
  name: Cloudfoundry Detect
  author: uomogrande
  severity: info
  description: Detects cloudfoundry based on response headers
  reference: https://docs.cloudfoundry.org/concepts/cf-routing-architecture.html
  metadata:
    max-request: 2
  tags: cloudfoundry,tech

http:
  - raw:
      - |
        GET / HTTP/1.1
        Host: {{Hostname}}
      # request unknown (random) route
      - |
        GET / HTTP/1.1
        Host: {{randstr}}.com

    stop-at-first-match: true
    matchers:
      - type: dsl
        dsl:
          - 'contains(header, "X-Vcap-Request-Id:") || contains(header, "X-Cf-Routererror:")'
# digest: 490a00463044022036f5fc4f7093c2c5e476bf28e60464ad4ea7e9363afd755a06ec35cc60938d98022024b1ed64be7d3725303e87f77b46b6c2c36fcb2933ab5ee525af56059cf755b4:922c64590222798bb761d5b6d8e72950