Closed travier-anssi closed 4 years ago
I was working on it
Why bother with NTP at all? It's unencrypted and unauthenticated which allows for MITM attacks and clock skew fingerprinting.
Connecting to a website over https and extracting the time out of the http header would be better. This would also result in far less attack surface as a full NTP client isn't required. All you'd need is
date -s $(curl -sI --tlsv1.2 --proto =https https://clip-os.org | grep "date:" | sed -e 's/date: //')
Why bother with NTP at all? It's unencrypted and unauthenticated which allows for MITM attacks and clock skew fingerprinting.
I forgot to specify three important conditions in the initial issue:
This accounts for the fact that the protocol is indeed unencrypted and unauthenticated by default.
Connecting to a website over https and extracting the time out of the http header would be better. This would also result in far less attack surface as a full NTP client isn't required. All you'd need is
date -s $(curl -sI --tlsv1.2 --proto =https https://clip-os.org | grep "date:" | sed -e 's/date: //')
Using date
directly may create big jumps in system time that my not be desirable on a live system and HTTPS connection establishment might also require some prior time synchronisation.
Alternatives to NTP (such as NTS (1, 2) or Roughtime (1, 2)) may also be investigated, especially if time synchronisation turns out to be required before an IPsec tunnel can be established.
This has been completed successfully as of:
Core changes
chrony
,ConnMan
,ntpd
,OpenNTPD
,systemd-timesyncd
, etc. (for a non exhaustive list, see https://wiki.archlinux.org/index.php/System_time#Time_synchronization). This choice should preferably be based on a factual comparison with security taken into account.chrony
is currently the preferred choice. This is based on the following security evaluation: https://www.coreinfrastructure.org/blogs/securing-network-time/.root
, etc.Testing infrastructure