id: alibaba-canal-info-leak

info:
  name: Alibaba Canal Config - Detect
  author: pikpikcu
  severity: info
  description: Alibaba Canal configuration information was detected.
  reference:
    - https://github.com/alibaba/canal/issues/632
    - https://netty.io/wiki/reference-counted-objects.html
    - https://my.oschina.net/u/4581879/blog/4753320
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
    cvss-score: 0
    cwe-id: CWE-200
  metadata:
    max-request: 1
  tags: config,exposure,alibaba,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/api/v1/canal/config/1/1"

    headers:
      Content-Type: application/json

    matchers-condition: and
    matchers:
      - type: status
        status:
          - 200

      - type: word
        words:
          - "application/json"
        condition: and
        part: header

      - type: word
        words:
          - "ncanal.aliyun.accessKey"
          - "ncanal.aliyun.secretKey"
        condition: and
        part: body
# digest: 4a0a004730450220664c69fe5cd2b98a36c1b0b2b54d589393a987e7cca14ece9f540632f8ed13e00221009d7a1befd01c8f62c5dae87ce98e615bd2c71d8f916c248f6202d493c52637d1:922c64590222798bb761d5b6d8e72950