id: vtun-server

info:
  name: VTUN Server - Detection
  author: pussycat0x
  severity: info
  description: |
    VTUN (Virtual Tunnel) server was detected.
  impact: |
    Discovery of VTUN server indicates a virtual tunneling service is running, which may be used for network bridging or VPN functionality.
  remediation: |
    Ensure VTUN server is properly configured with appropriate access controls and authentication if it's intended to be publicly accessible.
  reference:
    - https://vtun.sourceforge.net/
    - https://linux.die.net/man/8/vtund
  metadata:
    verified: true
    max-request: 1
    shodan-query: product:"Vtun Virtual Tunnel"
    fofa-query: server=="VTUN server"
  tags: network,vtun,detect,tcp,service,discovery

tcp:
  - inputs:
      - data: "\n"

    host:
      - "{{Hostname}}"
    port: 5001

    matchers:
      - type: word
        words:
          - "VTUN server"

    extractors:
      - type: regex
        regex:
          - '(VTUN server ver\s+[0-9A-Za-z.]+(?:\s+[0-9]{2}/[0-9]{2}/[0-9]{4})?)'
# digest: 4a0a0047304502210092372b6907813e014a66938c494fe966640a53dcfc7318e006d3e1f1a9804255022069586b1687316d3b01b63fd3c15b432d0904c7710bf8119c211c64e30c76c90c:922c64590222798bb761d5b6d8e72950