NTP Time Spoofing

I am trying to send a fake time to a Windows computer when it asks for the time from an NTP server.

My server will show packets for now and send back data, however I can't figure out what exactly I need to send to give Windows a fake time. I tried to grab legitimate packets to send but failed.

In this example I am just sending blank space, I am trying to figure out what data to send to tell the computer, for example, the time is 10:00 when it is actually 12 o'clock.

I intend to spoof DNS requests on the local network in order to redirect them to this server, which will react with the wrong time.

I've heard it can be done, but I've never seen a tool to do it, so now I'm trying to do it.

require 'socket'

class UDPServer
  def initialize(port)
    @port = port
  end

    def start
    @socket = UDPSocket.new
    @socket.bind('', @port) 
    data = " "
    while true
      packet = @socket.recvfrom(1024)
      puts packet
      @socket.send("${data}", 0, '10.0.0.16', "#{@port}")
    end
  end
end

server = UDPServer.new(123)
server.start

      

+3


source to share


1 answer


I can give a great reason:

You are a software tester; there is a critical test case where the create trigger only occurs 60 days after login. You don't want to sit in your chair until day 61 to make sure the code is working correctly. The device does not have a local clock (see: Apple TV). And the developers won't change the code to accommodate your testing, because this is production and they have high priorities.



NTP server spoofing is now the best bet. And this is an excellent, valid, non-harmful reason for this.

0


source







All Articles