Imagine that...
Secure NTP is an easy-to-use and universally deployed protocol extension...
The NTP pool is dedicated to providing accurate time from anyone to everyone, securely...
NIST, creators of some of the world's best clocks and keepers of official time for the USA, decide that the NTP pool is an excellent project which they would like to help. They donatate machines and install them around the world and dedicate them to providing time as part of the NTP pool. Their generous funding allows them to become a large and particularly well-connected proportion of the pool.
In fact NIST is a sock-puppet of the NSA. Their time servers are modified so that they are as truthful and as accurate as possible to everyone, except those who the US government decides they do not like.
The NSA has set up a system dedicated to replay attacks. They cause occasional minor outages and screwups in various cryptographic systems - certificate authorities, DNS registries - which seem to be brief and benign when they happen, but no-one notices that the bogus invalid certificates and DNS records all have validity periods covering a particular point in time.
Now the NSA can perform a targeted attack, in which they persuade the victim to reboot, perhaps out of desperation because nothing works and they don't understand denial-of-service attacks. The victim's machine reboots, and it tries to get the time from the NTP pool. The NIST sock-puppet servers all lie to it. The victim's machine believes the time is in the NSA replay attack window. It trustingly fetches some crucial "software update" from a specially-provisioned malware server, which both its DNSSEC and X.509 PKIs say is absolutely kosher. It becomes comprehensively pwned by the NSA.
How can we provide the time in a way that is secure against this attack?
no subject
Date: 2013-11-13 01:57 (UTC)This would need an implementation similar to the Perspectives project for cross-verifying SSL certificates. Perhaps cooperating time services would provide an any k-of-n proof of knowledge of a signature that they would publish at longer intervals.
no subject
Date: 2013-11-13 02:28 (UTC)The crucial thing is proving that you are actually, right now, talking to multiple independent sources, that are not colluding to fool you.
no subject
Date: 2013-11-13 02:30 (UTC)On trusting time
Date: 2013-11-13 10:18 (UTC)In this case it seems to me that the main two other mechanisms of defence one has (other than "ask multiple people") are time-specific:
1. Time is monotonically increasing: it doesn't flow backwards; if it seems to be, either you overcounted earlier, or someone is lying to you, or both -- all of those are exceptional situations where the paranoid could require, eg, manual intervention.
2. Time flows at a steady rate, which you can reasonably accurately follow over short periods by "dead reckoning" (eg, local oscillator); if the external view of time appears to be flowing significantly more unevenly than your local oscillator, you have a problem that needs manual intervention. (Which at least limits the attack to gradual slowing at whatever fudge factor you permit your local oscillator to be unstable by.)
If you don't have (a) a local source of starting time that you can at least vaguely trust, and (b) a local oscillator whose stability you trust over short periods within some margin you can live with being off by, then you are at the mercy of what the outside world is telling you -- if they are in cahoots to tell you lies, you will believe lies. (And yes, lots of embedded hardware is in exactly this position -- no local RTC, wildly unstable local oscillator, naively believing the outside world usually with no authentication.)
Ewen
PS: I strongly suspect that time is another of those things like (well deployed) crypto: the strongest thing in a weak system. So everything else is attacked instead. But maybe if there was a really juicy replay attack...
PPS: If your protocol/implementation can keep state ("we did this already") then you have another means to avoid replays beyond "you're saying this happened a while ago".
Re: On trusting time
Date: 2013-11-13 10:38 (UTC)This would hurt then
Date: 2013-11-13 03:28 (UTC)Getting a quorum of servers would be hard if this idea was widely deployed.
random time
Date: 2013-11-13 03:30 (UTC)Re: random time
Date: 2013-11-13 13:47 (UTC)no subject
Date: 2013-11-13 11:07 (UTC)There's currently 4000 NTP pool servers distributed all around the world and it's nice and easy to add more. Even if you're slaving from a NIST server it doesn't matter because you're effectively proxying the victim from them.
So the defence would be not to allow NIST to have a substantial fraction of the pool, given the ease of which you can set up an ntp server that shouldn't be too hard.
I'd make it a requirement of secure DNS that the DNS server must also run a secure NTP server which ups the difficulty of the attack considerably - compromising every root server would be very hard.
no subject
Date: 2013-11-13 12:22 (UTC)no subject
Date: 2013-11-13 13:14 (UTC)If you have no local storage at all then it gets a bit harder :-)
no subject
Date: 2013-11-13 12:33 (UTC)no subject
Date: 2013-11-13 12:41 (UTC)Tiny systems
Date: 2013-11-23 10:50 (UTC)You could also use a GPS receiver, or a GSM modem to get the phone network's time data (or, more generally, for attack purposes you *could* be using that if you were suitably paranoid), so they'd have to modify that to ensure avoiding detection.
(As an amusing aside: after exile from 131.111 to another university much further north, I found one of the central NTP servers my department's machines used misbehaving and raised a support ticket with the central IT department. A few days later, the ticket got escalated back to me ... apparently, their servers thought they got their time feed from mine. Whoops. A rather wonky Cisco firewall was eating UDP packets between some central servers, meaning the most reliable path between two of their NTP servers was now via client machines in another building...)
no subject
Date: 2013-11-14 01:39 (UTC)PS I'm not supposed to tell you but that actually happened to you, last Thursday night.