Let’s Do The Time Warp Again!
A little known Windows feature is making news due to the repercussions it recently caused a phone provider, which has been intermittently making sysadmin’s lives quite frustrating for years. Secure Time Seeding is meant to provide a backup for the RTC on computers, in case battery failure causes the machine to lose the current time. This certainly sounds like a good idea as a system with an incorrect time and date is not able to authenticate against digital certificates and will start scheduled jobs at the wrong time. It can also cause immense problems on servers which maintain databases which track data over time, as one rather upset sysadmin discovered.
The Secure Time Seeding feature checks the local system time against values found in a field in the SSL certificates it exchanges when making a secure connection to another server. It could consult the nearest server, but as that connection is not necessarily secure that would open up another attack vector. The problem is that since no one really knew about this feature, and so the field containing the time value in an SSL certificate often just contains a random number. Why bother to ensure it is accurate when nothing uses it?
This has lead to some serious issues with servers, but since it happens so infrequently the cause never revealed itself until now. Ars Technica delves into the full story about STS and some of the fallout it has caused in this story.
The culprit was a little-known feature in Windows known as Secure Time Seeding. Microsoft introduced the time-keeping feature in 2016 as a way to ensure that system clocks were accurate. Windows systems with clocks set to the wrong time can cause disastrous errors when they can’t properly parse timestamps in digital certificates or they execute jobs too early, too late, or out of the prescribed order.