clipos / bugs

CLIP OS issue tracker
https://clip-os.org
28 stars 1 forks source link

Core: Support system clock synchronisation with NTP #28

Closed travier-anssi closed 4 years ago

travier-anssi commented 5 years ago

Core changes

Testing infrastructure

withdark commented 5 years ago

I was working on it

madaidan commented 4 years ago

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: //')
travier-anssi commented 4 years ago

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.

travier-anssi commented 4 years ago

This has been completed successfully as of: