id: wireguard-private-key

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
    max-request: 1
  tags: wireguard,exposure,tokens,vuln

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

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