id: wireguard-preshared

info:
  name: WireGuard Preshared 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:
          - PresharedKey\s*=\s*([A-Za-z0-9+/]{43}=)
# digest: 4b0a00483046022100e61f6af1983ebb086970cb07fee85be905dddab8136fee4a313c60eea5d45af1022100e4e17433932caa364a54bd617c1df1f9813d69374d53f02f4363db72c3a6a53d:922c64590222798bb761d5b6d8e72950