id: ntp-version-detect info: name: NTP Version Detection author: pussycat0x severity: info description: | Detects if a target host is running NTP Service on port 123. metadata: verified: true shodan-query: "NTP" tags: ntp,ntpsec,udp,javascript javascript: - pre-condition: | isUDPPortOpen(Host, Port); code: | const c = require("nuclei/net"); const payload = "160203e80000000000000000"; const conn = c.Open('udp', `${Host}:${Port}`); conn.SendHex(payload); let resp = conn.RecvFullString(2048); resp; args: Host: "{{Host}}" Port: 123 matchers: - type: dsl dsl: - contains_all(response, "version","processor","system") extractors: - type: regex group: 1 regex: - 'version="([^"]+)"' # digest: 4b0a00483046022100bef1525877ce587d7b5e3b8af20d4b5277e7a5dc417913e96d7023c1bd37bc33022100f80e8f7e2e7ad6ee8721fab941a053ce24f92fc2e6cfb5a366519fc4e6f4e6f2:922c64590222798bb761d5b6d8e72950