id: odbc-connection

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
  metadata:
    verified: true
  tags: odbc,keys,file

file:
  - extensions:
      - all

    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: 4b0a00483046022100c2d89a19f64ba7944dc80c7e8c81a7ffa2d38e081e27caca3722a8f2dc9ed75d022100d929632b0f0690adddd6e3f74a684a2157fc0766cd094c6997e671aec47bdfa2:922c64590222798bb761d5b6d8e72950