id: wireguard-private

info:
  name: WireGuard Private Key
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/praetorian-inc/noseyparker/blob/main/crates/noseyparker/data/default/builtin/rules/wireguard.yml
    - https://www.wireguard.com/quickstart/
    - https://manpages.debian.org/testing/wireguard-tools/wg.8.en.html
    - https://gist.github.com/lanceliao/5d2977f417f34dda0e3d63ac7e217fd
  metadata:
    verified: true
  tags: wireguard,keys,file

file:
  - extensions:
      - all

    extractors:
      - type: regex
        part: body
        regex:
          - PrivateKey\s*=\s*([A-Za-z0-9+/]{43}=)
# digest: 4a0a00473045022100916c78d4b2f212e91d0c252bace4ed08d3ee18994b516d8602c6a946deefeba402205b9adaff8507b714bbd5c3f1481c24dd6588c3a1187923879b6b86a6afb7fd8f:922c64590222798bb761d5b6d8e72950