Securing Network Time
coreinfrastructure.org
coreinfrastructure.org
OpenNTPD has one feature, in particular, that I'd love to see supported in Chrony: "authenticated TLS constraints" [0].
> "Time can also be fetched from TLS HTTPS servers to reduce the impact of unauthenticated NTP man-in-the-middle attacks."
In my testing, OpenNTPD wasn't nearly as accurate as Chrony or ntpd -- although I believe it wasn't really intended to be. Instead, if memory serves, it was designed to be a more secure replacement that was "good enough" for most uses.
[0]: https://marc.info/?l=openbsd-tech&m=142356166731390&w=2
We only use the time from the HTTPS header, and not the TLS timestamp, as the latter is most possibly randomized in modern SSL/TLS implementations.
Do any HTTP servers lie in the Date header? That would be weird.
OpenNTPD supports both the singular and plural versions [0] of the directive and they operate in the same fashion as chrony's "server" and "pool" directives do (i.e. single vs. multiple hosts). With several such sources configured, outliers here can also be easily detected.
Personally, I use several sources across many different organizations (U.S. government, U.S. tech companies, foreign entities, and my own servers) and it gives me much more confidence that an attacker can't manipulate the time on any of the hosts under my control.
Please do reconsider adding this feature! If you'd like, I'd be more than happy to open a bug/file a feature request/whatever.
IoT is especially scary, since often the first authority is a local Wi-Fi network. Users can easily be deceived to configure the wrong network, and become exploited. Additionally, users can easily exploit system clocks in many products to install custom firmware which, when resold or returned may then be passed on to other users. Does Amazon reflash all consumer electronics that are returned?
Lastly, we decided to use a combination of HTTPS, certificate pinning, and client certificates to fetch a remote timestamp. We also use other, signed timestamps when available, but permanently record the most accurate time we suspect we have received. Devices cannot rewind prior to this, so if you have a device that has been offline for four or five years, you may be vulnerable, but chances are you are very vulnerable at that point anyways. If your device connects at least once a year, you should be good. Most devices connect constantly throughout the day.
This is important. We don't often get the chance to compare side-by-side implementations of the same requirement, so when big differences turn up we need to understand why.
They ask you not to do the "did you read" trope. What would be particularly better is if you explained, instead, what the commenter missed in the article. Then we all learn something.