What are the Privacy Implications of NTP Requests (time sync) and how to mitigats them

Seeing as this is a Community Guide, this is for anyone who “just got here” and doesn’t quite understand the ramifications of syncing your Qubes OS machine with only Fedora NTP servers…


The Network Time Protocol - Explained without any technical jargon:

How do they know what time it is?

Basically, a bunch of guys and gals have a bunch of caesium, rubidium, and other oscillating elements, and have big computers that measure that oscillation, and they use it to keep their computer’s clocks accurate (Stratum 1).

These guys and gals are also nice enough to host servers that anyone can ask what time it is, and sync their clocks too (Stratum 2).

And a bunch of other guys and gals who are concerned about those servers getting overwhelmed with requests, have set up their own servers, too, to ease the load on the ones higher up the chain. They sync their servers off the secondary servers, instead of the atomic clocks (Stratum 3).

And so on, until you have your home router 14 more levels down the chain, being the “time authority” for your network.

However, like a DNS server or Tor node, you have to earn people’s trust. If your server is found to be doing shenanigans (timing attacks, man in the middle, spoofing), people will drop your server very quickly…


What does your computer actually do to sync its clock?
  1. Your computer puts “Hey, what time is it?” (and in some cases “I think it’s 01/01/1970”) into a data packet
  2. Your computer picks an NTP server (completely arbitrary, and up to the user)
  3. Your computer sends the packet off on its way, and starts a stopwatch, to time how long it takes to receive the response.
  4. The NTP Server will send back a data packet that says:
  • The accurate time when the package was sent to you
  • If there was any delay besides “the speed of light”, and if so, timings of the delays
    • Slow server calculation
    • Sometimes, a bunch of other obscure things that account for time dilation in space (GPS satellites, etc.)
  1. When your computer receives the response packet, the stopwatch stops.
  2. Your computer then assumes that time declared by NTP server + stopwatch time - any declared delays = the REAL current time, and changes its clock accordingly
  3. Sometimes the NTP server will say “Ok, I’ll keep you on my list for the next 12 hours (or however long). Every hour, I’ll update you with the current time. You don’t even have to ask me for it. You already have enough info to calculate the time yourself”
  4. After 2014, NTP servers will also include their signature in the response.

Pretty clever, actually :slight_smile:


When Qubes OS syncs its clock, what does the NTP server actually see?
  • Just a standard “What’s the time?” packet
    • Nothing about Qubes OS
    • Only the WAN IP of whatever network you’re connected to
      • …assuming IPv4. IPv6 they can potentially see your unique global IPv6 address (Google that if you want to know what that is)

So then, who uses encryption keys?

The server, to sign the time, so that you can trust that nobody has messed with it while it was on its way to you.


Wait, so everyone can see that I am syncing my clock?

Everyone can see “What’s the time?” and “When I received your question, it was 4:46pm!”. No OS information, no other unique identifiers except the return address.


Can I pick which NTP servers I ask?

You can pick as many or as few NTP servers as you wish. You can even host your own (but remember they have to get their time from somewhere :stuck_out_tongue:)


But if I ask the Fedora NTP servers, won't everyone know I'm using Fedora?

Well, whoever is passing that data packet along will see the sender and recipient, and might make an assumption that you could be a Fedora user.

If that is an issue for you, then you can arbitrarily replace them with whatever NTP server you like.

It was definitely a big issue for the Tails community 2 years ago:


Can you contact an NTP server via Tor?

Yes and no. NTP packets are UDP, which the Tor Project currently don’t officially route. Only TCP. But that could be changing soon.

Whilst you can tunnel UDP packets via onion routing, the exit node will not spit them out for you as UDP packets. You have to spit them out at a proxy over TCP who will then send them out as UDP packets to the NTP server.

Also, some, if not most NTP servers will refuse to accept anything from Tor exit nodes.

This is where sdwdate in Whonix comes in. It allows clocks to be synced over Tor via onion servers acting as NTP proxies.


How inaccurate can your clock be before Tor stops working?

Not more than 1 hour slow, and not more than 3 hours fast.

This means that it is possible to set your clock to the approximate time manually without NTP, if you feel that better suits your use case.


Do NTP servers store data packets you send them?

I suppose some of them might, but the network operator would more likely be the one who stores them for analysis…


Why would someone want your computer's clock to be wrong?
  • Someone could potentially trick your computer into accepting authentication with an expired key (but because the clock’s wrong, your computer thinks it’s still valid)
  • Most web servers require you to declare your system clock time in the request, and if it’s fast or slow by more than a certain amount (usually 6-12 hours), it’ll refuse to server you anything requiring authentication or encryption
    • Ever tried to update your system packages and your computer thinks it’s 01/01/1970? :smirk:

Are there hardware alternatives to NTP?

And for those who want to actually BE their own NTP server so they never have to ask anyone else over the internet, there’s always this:
OCP-TAP Time Card | Makerfabs

$1,500USD might actually be within some people’s price range.


You can’t really do much without on the internet if your clock’s wrong nowadays. It messes up encryption and certificates, and opens up quite a lot of vulnerabilities that a lot of big players have been bitten by in the past.


From everything you mentioned about NTP servers and clock synchronization, this point caught my eye and made me wonder: Can I use sys-whonix as a clock qube? If yes, do I need additional configuration to do so?

If you open @alzer89 's link to the sdwdate page, you’ll find a " Table: Swdate vs NTP comparison" where it states that sdwdate can not act as a “Server, time provider”.
So the answer is “no”.

2 Likes

Not yet, but they’re working on it.

If you have Whonix installed on your Qubes OS machine (and let’s be honest, who uses Qubes OS without Whonix…? :stuck_out_tongue:), you’ve already got sdwdate installed.

It looks like this:
image

I guess a large percentage of users?

I mean users who make a decision not to have Whonix templates on their machine.

If people out there exist, I meant no offence. It’s just that comes as news to me, and I’d be curious to know the reason why. There’d obviously be a benefit that you identified that I haven’t, and I’d love to know what that benefit is.

If people out there exist, I meant no offence.

At least one exists:

1 Like

On the basis of the information we have available, users of Tor
account for perhaps 12% of the userbase. Most, but not all, of these
are probably using Whonix.

I never presume to speak for the Qubes team. When I comment in the Forum I speak for myself.
1 Like

It is not clear to me if you question whether users have Whonix templates
installed, or whether people use Whonix. I assumed that you meant
the latter.

I do not know how many people choose to customise what templates are
installed as part of the initial install, or how many people remove
templates that they do not use. My guess is that relatively few people
do either.
So this would mean a large number of people have Whonix templates
installed that they do not use.(Do they bother to update them?)

Personally, I choose not to have Whonix templates installed, because I
dont use Whonix. I do use Tor extensively.

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

I meant whether or not people would go out of their way to not have the templates installed. I guess I could have worded that better.

That would be my assumption too.

My assumption would be yes, if they use the GUI updater that keeps alerting them that “updates are available for whonix-17-gw”.

But then again, I could be wrong…

Fair. I guess you learn something new every day :slight_smile:

(moved this discussion into a separate topic per user suggestion)

TL;DR

I believe no one has shared this Github issue in this discussion. Includes some technical discussions:

The initial concern with NTP requests was that they could potentially reveal OS information by sending requests to specific NTP servers, such as fedora.pool.ntp.org.

However, these are fallback NTP servers, as noted in the timesyncd.conf file. The usual servers where the system sends NTP requests are standard NTP servers, and sending requests to them does not disclose any information about your OS.

To be cautious, I changed the FallbackNTPServers from:

0.fedora.pool.ntp.org 1.fedora.pool.ntp.org 2.fedora.pool.ntp.org 3.fedora.pool.ntp.org

To:

0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org

Even without the Fedora subdomain, these addresses remain valid NTP servers, as listed in online NTP server directories.

Regarding other clearnet leak issues, I believe that adding an update check exception in the global configuration for sys-net (or sys-net-dvm) and sys-firewall, and changing the default-dvm NetVM to sys-whonix, resolves the issue if you have no other AppVM sending data to clearnet.

The initial concern with NTP requests was that they could potentially reveal OS information by sending requests to specific NTP servers, such as fedora.pool.ntp.org.

Passive Operating System Identification From TCP/IP packet Headers:

https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=e9307236d76f8e5ed3443151d82ee2f54f6d3561

NTP is an UDP only protocol.

3 Likes

NTP is an UDP only protocol.

I may be wrong but one still needs DNS to reach whatever.tld though and (modern) DNS uses TCP.

1 Like

Related:

1 Like

I think not.
If you have routed everything through Tor, but left NTP, then regardless
of the specific servers used, you have a traffic pattern that correlates
with Qubes. But to be clear - even if you only use Whonix then
traffic analysis can still identify you as a Whonix Qubes user.

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

If I use custom obfs4 bridges, my ISP will only see that I’m visiting random websites, right? At least, that’s what Tor claims and what I observe through Sniffnet on sys-net.

However, I think there might be two scenarios here. One where someone is specifically analyzing your traffic and looking for patterns, in which case nothing may be good enough.

The second scenario is where you want to send your traffic in a way that doesn’t single you out among the vast majority of users using the same ISP. The question is, is this setup good enough for this scenario or not?

‘Nothing may be good enough’ is merely my personal opinion, as I’m not an expert in this field. If anyone has any suggestions or recommendations for reducing or eliminating OS fingerprints when using Qubes OS, please share them. I would genuinely appreciate your insights.