id: akamai-cache-detect

info:
  name: Akamai Cache Detection
  author: nybble04
  severity: info
  description: |
    Sends a HEAD request with a Pragma header value of "akamai-x-cache-on" and looks for an akamai-specific response header value.
  reference:
    - https://community.akamai.com/customers/s/article/Using-Akamai-Pragma-headers-to-investigate-or-troubleshoot-Akamai-content-delivery?language=en_US
    - https://spyclub.tech/2022/12/14/unusual-cache-poisoning-akamai-s3/
  metadata:
    verified: true
    max-request: 1
  tags: cache,akamai,tech,discovery

http:
  - method: HEAD
    path:
      - "{{BaseURL}}"

    headers:
      Pragma: akamai-x-cache-on
    matchers:
      - type: regex
        part: header
        regex:
          - '(?:TCP_HIT|TCP_MISS).*deploy\.akamaitechnologies\.com'
# digest: 4a0a00473045022100de8e601f87111dc597d87b2a0d0c991a2fd79b8d096826f5908f6cf11cea2b440220227d2efa6d20c9037cd022bba784f6323ea8e28c4e8ee9df540d2077d1e29c4c:922c64590222798bb761d5b6d8e72950