id: odbc-connection-string

info:
  name: ODBC Connection String
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/praetorian-inc/noseyparker/blob/main/crates/noseyparker/data/default/builtin/rules/odbc.yml
    - https://docs.aws.amazon.com/redshift/latest/mgmt/configure-odbc-connection.html
    - https://docs.microsoft.com/en-us/azure/data-explorer/kusto/api/connection-strings/kusto
  metadata:
    verified: true
    max-request: 1
  tags: odbc,exposure,tokens

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

    extractors:
      - type: regex
        part: body
        regex:
          - (?i)(?:User|User\sId|UserId|Uid)\s*=\s*([^\s;]{3,100})\s*;[\ \t]*.{0,10}[\ \t]*(?:Password|Pwd)\s*=\s*([^\t\ ;]{3,100})\s*(?:[;]|$)
# digest: 4a0a0047304502207925500be7ec289b3003ec600266056556c3f4b9851c65da8073ad18fb1c32a90221008abe049899224988d8be1a3b68d0f3340ea1e04ab304180a3ec14d0f8fb666a1:922c64590222798bb761d5b6d8e72950