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

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