Nmap Development mailing list archives

ntpd query variables script


From: "A. Ramos" <aramosf () gmail com>
Date: Sat, 16 Aug 2008 01:05:39 +0200

Hello all,

This is my first script for nmap, gets variables from ntp server (if its
allowed)

--
id="NTP query variables"
description="Read variables of ntpd server"
author = "A. Ramos <aramosf () unsec net>"
license = "Same as Nmap--See http://nmap.org/book/man-legal.html";

categories = {"default", "discovery", "safe"}

require "comm"
require "shortport"

portrule = shortport.portnumber(123, "udp")

action = function(host, port)

    -- generate ntp_read_list
 local request = string.char(0x16, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00)
 local status, result = comm.exchange(host, port, request, {lines=5,
proto="udp"})

 if not status then
   return
 end

 return result

end
-- 
Regards,

Alejandro Ramos -- aka dab

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: