News for hackers. Stuff that matters.
Re:Technical Details on the Recent Firefox Add-On Outage by johncolanduoni on Thursday May 09, 2019 @05:14PM (#19872494)
For the time stamp method to work, you need a trusted mechanism to attest that the timestamp is correct, otherwise the mechanism is useless (an attacker with an outdated private key can just backdate the timestamp in the executable and then sign it). Windows code signing uses a server Microsoft runs to provide this, and Mozilla would need to do the same.

I’m not saying they shouldn’t, but it is a significant piece of complexity.

Re:Technical Details on the Recent Firefox Add-On Outage by reificator on Thursday May 09, 2019 @05:18PM (#19872531)
> Windows code signing uses a server Microsoft runs to provide this, and Mozilla would need to do the same.

Mozilla already requires uploading even your private extensions to a Mozilla server to be signed for internal or external deployment.

https://wiki.mozilla.org/Add-ons/Extension_Signing

Re:Technical Details on the Recent Firefox Add-On Outage by Boulth on Friday May 10, 2019 @03:30AM (#19875836)
> Windows code signing uses a server Microsoft runs to provide this, and Mozilla would need to do the same.

Nope. Actually all CAs that offer code signing certificates are required to provide timestamping service compatible with RFC 3161. These timestamping servers are usually free to use, see for example https://knowledge.digicert.com/generalinformation/INFO4231.h...

Re:Technical Details on the Recent Firefox Add-On Outage by eps on Thursday May 09, 2019 @05:54PM (#19872810)
Every major CA runs a trusted timestamping service. Mozilla doesn't need to maintain their own timestamping infrastructure, they could delegate to one of the CAs, probably based on some sort of formal agreement with them.

Though the way things stand, all CAs have no problem timestamping sigs made with certs that are from other CAs, so perhaps even no explicit agreement is required.

Re:Technical Details on the Recent Firefox Add-On Outage by temac on Thursday May 09, 2019 @07:24PM (#19873507)
The checker just has to have roots tracing to timestamping CAs.

I really don't understand why Mozilla designed their system like they did. Code signing is well known and probably even done for the Windows installer of Firefox, why did they just not duplicate the model? Checking expiration vs current time makes absolutely no sense for code signing, esp. at runtime (it could kind-of sort-of make a little bit of sense at install time, but I'm not really convinced, and maybe it is even not really possible to distinguish between the two with an effective boundary)

Re:Technical Details on the Recent Firefox Add-On Outage by StavrosK on Thursday May 09, 2019 @06:27PM (#19873056)
Can you explain why you need the current time anywhere in this? Say I download a ten-year-old addon, it's signed by a valid signature from that root, with a valid signing date. What's the problem?

Are we worried that someone will steal an old/expired cert and have control over a user's clock?

Re:Technical Details on the Recent Firefox Add-On Outage by cortesoft on Thursday May 09, 2019 @09:22PM (#19874239)
Imagine you have an old expired key... you take your new malicious extension, and sign it with the expired key and a time stamp that says it was signed at a time the key was still valid.

Without some other verification mechanism, you can't tell the difference between this and an actual signature signed when the key WAS valid

Re:Technical Details on the Recent Firefox Add-On Outage by josteink on Friday May 10, 2019 @01:30AM (#19875309)
> sign it with the expired key and a time stamp that says it was signed at a time the key was still valid.

The whole point of a trusted timestamp is that such signature cannot be made for a fraudulent date, otherwise it would be utterly pointless.

This scenario and threat model does not exist if timestamping is correctly implemented.

Re:Technical Details on the Recent Firefox Add-On Outage by tialaramex on Friday May 10, 2019 @04:00AM (#19875971)
Nope.

RFC 3161 timestamps - which is what we're discussing here - can be fraudulently constructed for any timestamp value by someone who has the private key for the TSA (Time stamping authority). So what your parent described is easily possible: A system that relies on RFC 3161 timestamps has to trust that

* any cryptographic hash algorithms used remain safe

* any public key signature methods used remain safe

* the TSAs retain control over their private keys for as long as you continue to accept timestamps from that TSA

This is a big ask, and in practice the code signing systems you're probably thinking of just don't care very much. A state actor (e.g. the NSA) could almost certainly fake materials for these systems, we know that this has been done (presumably by the NSA or Mossad) in order to interfere with the Iranian nuclear weapons programme in the past.

You _can_ build a system that has tamper evident timestamping, but it's much more sophisticated and has much higher technical requirements. That's what drives the Certificate Transparency system. CT logs can prove they logged a specific certificate within a 24-hour period, and monitors verify that their proofs remain consistent, the to-be-built Gossip layers allow monitors to compare what they see in order to achieve confidence that logs don't tell different stories to different monitors. But to achieve this a CT log must be immediately distrusted if it falls off line for just 24 hours or if an error causes it to not log even a single timestamp certificate it issued. Massive Earthquake hit your secure data centre and destroyed the site? You have 24 hours to get everything back on line or be distrusted permanently. Bug in a Redis configuration lost one cert out of 4 million issued? You are distrusted permanently. Most attempts to build a CT log fail the first time, some outfits give up after a couple of tries and just accept they're not up to the task.

Re:Technical Details on the Recent Firefox Add-On Outage by stupidthrottle on Friday May 10, 2019 @04:23AM (#19876061)
> can be fraudulently constructed for any timestamp value by someone who has the private key for the TSA

Sure. Which is why these are heavily secured and guarded. Just like the keys for any cert, and highly trusted root certs in particular.

Any private/public crypto system can be compromised if the private keys are leaked. Everyone knows that.

That however is in no way a good argument for not using timestamps.

Re:Technical Details on the Recent Firefox Add-On Outage by tialaramex on Friday May 10, 2019 @04:58AM (#19876198)
RFC 3161 timestamps are used because they let people do something Mozilla doesn't care about at all and which was largely irrelevant here.

Alice the OS Vendor wants to let Bob the Developer make certificates saying these are his Programs, she is worried Bob will screw up so his cert needs to have a short lifetime, but her OS needs to be able to accept the certs after that lifetime expires so users can still run their Programs. So, Bob makes certificates and uses Trent's public TSA that Alice authorised to prove they were made when they say they were. Alice only has to trust Trent (who is good at his job) for a long period, and Bob who can be expected to screw up gets only short-lived certificates.

But Mozilla's setup doesn't have these extra parties. There is intentionally no Bob in Mozilla's version of the story, they sign add-ons themselves, so timestamping plays no role. If a 25 year TSA would be appropriate (hint: it would not) then a 25 year intermediate cert would be just as appropriate and simpler to implement for Mozilla.

Re:Technical Details on the Recent Firefox Add-On Outage by StavrosK on Friday May 10, 2019 @06:37AM (#19876578)
Oh, the developers are signing their own extensions? I wasn't aware how it worked and I was missing that part, I thought Mozilla signed them on upload (and thus could trust itself to not be malicious).
Re:Technical Details on the Recent Firefox Add-On Outage by cortesoft on Saturday May 11, 2019 @09:19PM (#19889488)
Well, Mozilla does the signing, but we only know that to be true as long as they control the private key. The whole point of expirations is to make mitigate the risk of an older key being stolen (or cracked).

So yes, Mozilla signs the extensions, but that doesn't change the importance of keeping the private key private... that is HOW we know it is Mozilla doing the signing

Re:Technical Details on the Recent Firefox Add-On Outage by jldugger on Thursday May 09, 2019 @10:55PM (#19874656)
How did you get ahold of an expired key?
Re:Technical Details on the Recent Firefox Add-On Outage by SamReidHughes on Thursday May 09, 2019 @11:27PM (#19874813)
The whole point of key expiration is that somebody might get a hold of it (or crack it).
Re:Technical Details on the Recent Firefox Add-On Outage by johncolanduoni on Thursday May 09, 2019 @07:14PM (#19873424)
Not current time, but time of signing of the executable (not signing of the code sign certificate itself). If you (as the OP suggested) use time of signing instead of current time, the whole point is you’re not using the user’s clock anymore.
Re:Technical Details on the Recent Firefox Add-On Outage by SAI_Peregrinus on Thursday May 09, 2019 @07:42PM (#19873617)
Mozilla is already packaging the executable inside an archive. That archive contains the executable, manifest, and any other needed files. The signer can add a timestamp, either as a new file or as a part of the manifest. Then the timestamp is signed along with everything else, and can be checked for validity.
Re:Technical Details on the Recent Firefox Add-On Outage by johncolanduoni on Thursday May 09, 2019 @07:57PM (#19873730)
If all extensions are signed by Mozilla’s own certificate, then adding a timestamp won’t do anything for the reason I outlined above and they should just turn off expiration validation altogether. The time of code signing check is only useful if you want to trust one certificate (the developers) to sign things only within the duration noted in the cert, but are willing to trust another certificate (e.g. Microsoft’s timestamp cert) forever. If there’s only one certificate in play owned by the authority for the whole system, then there’s no point in the timestamp at all (for validation purposes).
Re:Technical Details on the Recent Firefox Add-On Outage by Dylan16807 on Friday May 10, 2019 @05:04AM (#19876222)
It depends on the level of security you want.

Let's say you compromise by letting old signatures stay valid, but only for a year. And you rotate the intermediate cert every 90 days.

This system is more secure than the old one, because you only have to worry about key leaks for 15 months, instead of years.

But at the same time, it's impossible to have this giant wave of everything failing at once. Instead the best case is nobody can sign extensions for a couple days, and the worst case is extensions that updated exactly a year ago start to fail in real time.

Re:Technical Details on the Recent Firefox Add-On Outage by jzl on Thursday May 09, 2019 @05:20PM (#19872549)
Ahh, right. Good point. I wonder then if the current system was a deliberate choice over the timestamp method, or just deemed easier to deal with on their end.
Re:Technical Details on the Recent Firefox Add-On Outage by contravariant on Thursday May 09, 2019 @06:11PM (#19872952)
Maybe I'm jumping the gun here, but doesn't is seem that this kind of problem is exactly the kind of problem where a blockchain solution would be useful?

Or at least more useful than the 'when all you have is a hammer' style applications of blockchains.

Re:Technical Details on the Recent Firefox Add-On Outage by simias on Thursday May 09, 2019 @06:27PM (#19873052)
Given that you have a clear authority here (Mozilla) I don't see why you'd query a blockchain instead of querying signatures.mozilla.org

As always Blockchains are a good solution only for a tiny group of problems.

Re:Technical Details on the Recent Firefox Add-On Outage by semi-extrinsic on Friday May 10, 2019 @12:49AM (#19875130)
> As always Blockchains are a good solution only for a tiny group of problems.

Flowchart here: http://philippe.ameline.net/images/ShouldYouUseBlckchn.jpg