id: dynatrace-api-token

info:
  name: Dynatrace API Token
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/praetorian-inc/noseyparker/blob/main/crates/noseyparker/data/default/builtin/rules/dynatrace.yml
    - https://www.dynatrace.com/support/help/dynatrace-api
    - https://www.dynatrace.com/support/help/dynatrace-api/basics/dynatrace-api-authentication
  classification:
    cwe-id: CWE-522,CWE-540
  metadata:
    verified: true
    max-request: 1
  tags: dynatrace,token,exposure,vuln

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

    extractors:
      - type: regex
        part: body
        regex:
          - '\b(dt0[a-zA-Z]{1}[0-9]{2}\.[A-Z0-9]{24}\.[A-Z0-9]{64})\b'
# digest: 4a0a00473045022100bb1a687439103e3f312a4e4b0852aabdd582fdd40f338eeaa40785849bfd1e8e022046712d352642450c51684338dda6a7ed0f2b3b355778a0d7db65c5c3507dfe62:922c64590222798bb761d5b6d8e72950