News for hackers. Stuff that matters.
Re:Windows feature that resets system clocks based on random... by LeifCarrotson on Wednesday August 16, 2023 @04:02PM (#37152902)
> ...if it has a network...

But that network is not trusted.

Imagine this: You boot a machine for the first time, and the system clock tells you it's January 1, 1970. You might know when your OS was built, so you could maybe hard-code some sanity checks there, but you basically don't know what the date is.

You want to communicate securely with weather.gov? Sure, you can do that over SSL/TLS. You send it a list of cipher suites and SSL/TLS versions you can use, the weather.gov server selects a cipher and version, and sends you their certificate. It's valid from Jun 2023 to Jun 2024, signed by a DigiCert TLS RSA SHA256 2020 CA1 certificate valid Apr 2021 to Jun 2024, which is itself signed by the Digicert root global CA encoded into your OS's root certificate store, valid Nov 2006 to Sun, Apr 2031.

Wait a second. Or maybe 1.7 billion seconds. Are any of those certificates valid? Do you want to let the attacker set the date back to when a revoked, potentially leaked Trustico or Symantec private certificate was valid?

You don't have a secure network if you don't know what time it is.

Re:Windows feature that resets system clocks based on random... by yetanotherloss on Wednesday August 16, 2023 @04:13PM (#37153069)
Man it's like you and the other respondent want to be helpful but didn't read the next sentence after that bit of hyperbole.

If all available time sources are not trustable and none of the existing answers make sense, do not try to set the clock! Coming up with more complicated ways to use untrustable data is not an improvement.

Re:Windows feature that resets system clocks based on random... by solardev on Wednesday August 16, 2023 @04:35PM (#37153402)
Why can't it just ask the human to provide it, either in the welcome UI or in a setup script? That's how we've set up computers for many milliseconds.
Re:Windows feature that resets system clocks based on random... by dylan604 on Wednesday August 16, 2023 @04:45PM (#37153540)
because every developer has been told to never trust user input, and to sanitize the hell out of it.
Re:Windows feature that resets system clocks based on random... by akira2501 on Wednesday August 16, 2023 @05:16PM (#37153964)
There are public users and owner users. Specifically, you don't trust input from public users. You absolutely should trust input from owner users, or if you won't by default for some reason, you absolutely should give them the option to do so. Primarily, you should be giving them the choice as to what their system will do when it cannot reliably determine the actual time.

The alternative is to pretend that you can somehow divine a 'projected secure time.' Just, the gall to even write a sentence like that.

Re:Windows feature that resets system clocks based on random... by bob-09 on Wednesday August 16, 2023 @06:04PM (#37154497)
If your goal is to phase out local accounts and force microsoft.com logins as part of the computer setup, being able to trust your certificates seems like a prerequisite to being able to trust your users. And the correct time is a prerequisite to trusting your certificates.
Re:Windows feature that resets system clocks based on random... by solardev on Thursday August 17, 2023 @01:29AM (#37157610)
This makes no sense..? If the admin wants to change the clock to something else and make their certs invalid, they can always do so. It's just for getting an initial handshake, and then after that NTP should keep working (at least until the next reset with a dead CMOS battery).

There's no way for the server to accurately determine the client's hardware clock, barring some sort of user-hostile hardware clock with a nuclear battery or hardened GPS or radio time receiver or something.

Re:Windows feature that resets system clocks based on random... by dylan604 on Wednesday August 16, 2023 @06:50PM (#37154918)
>'projected secure time.'

It's 5 o'clock somewhere!

Re:Windows feature that resets system clocks based on random... by dullcrisp on Wednesday August 16, 2023 @07:15PM (#37155140)
It’s 1970-01-01T00:00:00Z somewhere
Re:Windows feature that resets system clocks based on random... by dragonwriter on Wednesday August 16, 2023 @05:04PM (#37153821)
But the user input thing is not the rule, its a specific case of the more general rule regarding external data generally.

It definitely applies even more to the data it is trusting in this case.

Re:Windows feature that resets system clocks based on random... by cesarb on Wednesday August 16, 2023 @06:28PM (#37154726)
If I understood the article correctly, this misfeature is for the rare case in which the server reboots after a power loss and the real-time-clock battery on the motherboard is dead, which can happen long after the initial setup of the server.
Re:Windows feature that resets system clocks based on random... by sudosysgen on Wednesday August 16, 2023 @09:03PM (#37155874)
This is a hardware failure. The server should report to the domain controller a malfunction (by assuming it's certificate is valid) and then give up.
Re:Windows feature that resets system clocks based on random... by jmholla on Wednesday August 16, 2023 @04:13PM (#37153058)
But this isn't just impacting machines at first boot. This is enabled in an on-going fashion.
Re:Windows feature that resets system clocks based on random... by Arnavion on Wednesday August 16, 2023 @05:47PM (#37154338)
The point isn't restricted to first boot. Lots of systems forget the time when they power cycle because of bad batteries or other trouble.
Re:Windows feature that resets system clocks based on random... by pixl97 on Wednesday August 16, 2023 @06:03PM (#37154493)
I mean, at that point the system should go to the IT group and be fixed.
Re:Windows feature that resets system clocks based on random... by cpeterso on Wednesday August 16, 2023 @04:54PM (#37153683)
The article says:

> Because Secure Time Seeding used SSL certificates Windows already stored locally, it could ensure that the machine was securely connected to the remote server. The mechanism, Microsoft engineers wrote, “helped us to break the cyclical dependency between client system time and security keys, including SSL certificates.”

But in that case, why does the Windows time service connect to a random server running OpenSSL instead of a trusted server under Microsoft's control like time.microsoft.com (or whatever)?

Re:Windows feature that resets system clocks based on random... by pixl97 on Wednesday August 16, 2023 @06:02PM (#37154478)
>instead of a trusted server under Microsoft's control like time.microsoft.com (or whatever)?

"Golly it's getting expensive hosting 100 billion random requests per year, lets let someone else shoulder the problem".

While this might not be it, we've seen plenty of other providers really screw up with time like this. I believe it was Linksys years ago just pointed their NTP as someone elses NTP servers and flooded them out.

Re:Windows feature that resets system clocks based on random... by X-Cubed on Wednesday August 16, 2023 @08:46PM (#37155774)
Not all PCs are on the internet or have access to time.microsoft.com
Re:Windows feature that resets system clocks based on random... by dragonwriter on Wednesday August 16, 2023 @05:02PM (#37153800)
> You don't have a secure network if you don't know what time it is

Yes, that's a very good reason not to trust the network to tell you what time it is.

Unfortunately, Windows, because it doesn't trust the network in the broad sense, relies on specific and known-to-be-unreliable SSL handshake data on the network to reset the clock.