Friday, November 21, 2008

What is epoch time?

There was a nice contest on Packetlife. It had a packet capture uploaded & the contestants had to look at the packet capture to tell what day the router at 10.0.12.1 thinks it is. The packet capture had some OSPF hello packets originating from the 10.0.12.1 device.

The answer to the contest included reading the OSPF hello packets. The OSPF hello packets carry a "Auth Crypto Sequence Number" which increases by one hex digit for every second that passes.



Realizing that the OSPF sequence number increases at a rate of 1 per second, the next step was to determine the counter's reference point. The sequence number is a hexadecimal count of the number of seconds since the UNIX epoch.

So the final step was to convert the hex value into decimal & then add it to the reference time/date to arrive at the date/day the router thinks is.
  • 0x48994f42 hex = 1218006850 decimal
  • 00:00:00 1 Jan 1970 UTC + 1218006850 seconds = 07:14:10 6 Aug 2008 UTC
The post also lists a very useful website by the name of epochconverter.com for conversions from "epoch time" to "human readable" format.

All in all post to learn something from. Nice packetlife, will love to see more of such contests.

No comments: