id: maxforwards-headers-detect

info:
  name: Max-Forwards Header - Detect
  author: righettod
  severity: info
  description: Max-Forwards response header is specified.
  reference:
    - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Max-Forwards
    - https://http.dev/max-forwards
    - https://twitter.com/irsdl/status/1337299267652825088
  metadata:
    verified: true
    max-request: 1
    shodan-query: "Max-Forwards:"
    fofa-query: header="max-forwards"
  tags: miscellaneous,misc,max-forwards

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

    matchers:
      - type: dsl
        dsl:
          - 'contains(to_lower(header), "max-forwards:")'

    extractors:
      - type: regex
        part: header
        regex:
          - '(?i)max-forwards:\s+([0-9]+)'
# digest: 4a0a00473045022037e390a1578bf27fa994e381f2891535589f4a4213f92395328cead15e5b5d97022100a6081e99a2277c5bf5ca3186b69ac6130eeecb4707282acbd1d645e22ceca20b:922c64590222798bb761d5b6d8e72950