id: interswitch-webpay

info:
  name: Interswitch Webpay - Credentials Exposure
  author: Lloydcoder
  severity: info
  description: |
    Exposure of Interswitch Webpay product IDs, MAC keys and access tokens.
  reference:
    - https://docs.interswitchgroup.com/reference/how-to-use-the-reference
  tags: exposure,interswitch,webpay,token

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

    redirects: true

    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - "macKey[\"']?\\s*[:=]\\s*[\"']?[0-9A-Fa-f]{64}[\"']?"
          - "payItemId[\"']?\\s*[:=]\\s*[\"']?\\d+[\"']?"

      - type: word
        words:
          - "interswitch"
          - "webpay"
          - "macKey"
        condition: or
        case-insensitive: true
# digest: 4b0a004830460221009bf885c5c3a8c5b88ccfb2e965868189dc07984b46e53a4d99035415721a7af0022100de2b7db4c4e55db85a00a8f69f8ef84b51288cd4dfea1e583104b5ee9b7f36d9:922c64590222798bb761d5b6d8e72950