News for hackers. Stuff that matters.
Re:Cryptic Rumblings Ahead of First 2020 Patch Tuesday by AaronFriel on Monday January 13, 2020 @06:19PM (#22039869)
Scary, but not an RCE so threat is limited. It would mean malicious actors could possible create spoofed signatures on malware or possibly websites (EV certificates?). Am I missing something or is there a way to turn a spoofed certificate into a single-click pwn? As I understand it, users would have to download a malicious payload or click a malicious URL to be exposed.

Edit: People are asking why I assume it's not an RCE. That's a good question, but I am assuming Krebs on Security wouldn't report an RCE as a potential certificate validation bug. This quote in particular:

> Equally concerning, a flaw in crypt32.dll might also be abused to spoof the digital signature tied to a specific piece of software.

If crypt32.dll has a memory bug that can be exploited by feeding it an ill-formed certificate, that is wormable and orders of magnitude more severe, not equally concerning.

We'll know more tomorrow, however.

Re:Cryptic Rumblings Ahead of First 2020 Patch Tuesday by cjbprime on Monday January 13, 2020 @06:46PM (#22040091)
Wait, how do you know it's not an RCE? Memory safety flaws in a DLL become RCE all the time.

> is there a way to turn a spoofed certificate into a single-click pwn?

e.g. The victim clicks on a link to go to your website, their machine wants to validate the TLS cert you sent it, it calls into crypt32.dll to do that, it corrupts memory while handling your attacking cert, pwn?

We don't know enough (anything!) about the actual bug yet other than which DLL it's in.

Re:Cryptic Rumblings Ahead of First 2020 Patch Tuesday by tialaramex on Monday January 13, 2020 @09:26PM (#22041246)
Certificates in the Web PKI (so they'd be trusted) aren't likely to be a good basis for an exploit.

You aren't supposed to get to pick very much of the document in the Web PKI. Rules forbid CAs from letting you write nonsense you made up into most places - they themselves get slightly more opportunity but "Let's attack a windows zero day" doesn't feel like a good use of control over a trusted CA. The biggest contiguous arbitrary chunk of data you get control over will be the public key, an RSA public key might be one kilobyte in size. So, conceivable but unlikely that you can squeeze a working exploit and payload in there.

An X.509 cert that isn't trusted in the Web PKI (ie hand rolled) is a better attack surface because you can write any amount of garbage without some busy body forbidding it, but now your problem is that a non-vulnerable client will see a problem immediately because it's untrusted which is weird. I don't look at the certificates on random web sites I visit... unless they don't work and then I might be curious.

I think code signing certs are a more likely vulnerability, unlike the Web PKI in practice this is down to Microsoft who have a very hands-off approach. I suspect you can get a lot more leeway to write crap into a cert for code signing and as a bonus it'll get seen by the vulnerable Windows PCs, because it's not as though Macs or Linux check the code signing certs on Windows software they can't run anyway.

But as you say we don't know anything, it could be a much more subtle but still dangerous bug.

For example suppose Microsoft's implementation of ECDHE misses a check on the parameters supplied by the other participant. This would make you vulnerable to invalid curve attacks when negotiating ECDHE. Of course a legitimate participant won't try to attack you, but you're doing ECDHE before you know the other participant's identity.

Re:Cryptic Rumblings Ahead of First 2020 Patch Tuesday by cjbprime on Monday January 13, 2020 @10:12PM (#22041460)
> will see a problem immediately because it's untrusted which is weird

You might be right, but I don't think your version of "immediately" matches up with the reality of code. How many cert library function calls do you think happen before a TLS client is able to decide that there is no trusted path to the cert's authority and decide that it's "weird"?

Hundreds or thousands wouldn't surprise me -- you've got to parse a file format, follow links -- if the vulnerability's in one of those functions, then there's your exploit. You even have to go out to the filesystem, check whether the self-signed CA is installed in the OS trust store, which would make it trusted. It's really easy for me to imagine such a vuln somewhere in cert trust verification.

Re:Cryptic Rumblings Ahead of First 2020 Patch Tuesday by tialaramex on Monday January 13, 2020 @10:34PM (#22041597)
I meant on unaffected platforms, say, Firefox on Linux. It'd be weird if I came to, say, Hacker News and now it had this untrusted cert (which is actually a worm attacking Windows PCs) instead of a normal one.

I agree that on an affected platform all bets are off, but deploying to a web server means you don't easily get to pick who your visitors are.

Re:Cryptic Rumblings Ahead of First 2020 Patch Tuesday by ikeboy on Tuesday January 14, 2020 @12:15AM (#22042054)
Just load a hidden image from a subdomain, silently fails if on an unaffected platform.
Re:Cryptic Rumblings Ahead of First 2020 Patch Tuesday by Thorrez on Tuesday January 14, 2020 @01:19AM (#22042327)
And you could also avoid even creating the iframe if the User Agent isn't Windows.
Re:Cryptic Rumblings Ahead of First 2020 Patch Tuesday by cjbprime on Monday January 13, 2020 @10:39PM (#22041621)
Oh yes, that's true. (Though now I wonder if cert negotiation can be dependent on useragent under SNI. It could certainly be dependent on TCP fingerprint characteristics.)

Agree with you that codesigning certs are a more likely problem space for this bug.

Re:Cryptic Rumblings Ahead of First 2020 Patch Tuesday by atxlurker on Monday January 13, 2020 @11:30PM (#22041861)
I don’t think this is ultimately the vulnerability, but even without SNI, it’s arbitrary to dynamically link to a file, script, png, etc... hosted on a sub domain with the bad cert.
Re:Cryptic Rumblings Ahead of First 2020 Patch Tuesday by cjbprime on Tuesday January 14, 2020 @01:06AM (#22042270)
Oh yeah! So it's like:

* client asks for cert

* you give it to them

* client tells you the page they want and their useragent

* if you think they're vulnerable based on what you've learned about them, you add <img src="https://vulnerable.subdomain/"> to the response.

Neat suggestion. Thanks! Agree we've moved well outside of tomorrow's likely actual vuln.

Re:Cryptic Rumblings Ahead of First 2020 Patch Tuesday by ct520 on Tuesday January 14, 2020 @02:01AM (#22042508)
Ugh man. I seen custom rolled where it frys to follow links building cert Chain validation. This sounds like a nightmare
Re:Cryptic Rumblings Ahead of First 2020 Patch Tuesday by fulafel on Tuesday January 14, 2020 @12:31AM (#22042128)
Do we know that MS TLS implementation parses self-signed certs only after successful validation? Many implementations offer an option of showing their contents (eg to see what CA it claims to be signed by), or offer the user a choice to accept it, or log identifying fields from the cert for diagnostic purpouses. Same for the CA server offered CA chain.

I'm also not convinced that the fields-allowed-by-CAs set is safe, especially when you consider the set of all browser-accepted CAs, it's historically been a fraught field.

Also with x.509 you have to decode the ASN.1 before you can even get to the signature, there have been historically been lots of vulnerabilities in ASN.1 parsers.

Re:Cryptic Rumblings Ahead of First 2020 Patch Tuesday by cjbprime on Tuesday January 14, 2020 @02:08AM (#22042539)
> Do we know that MS TLS implementation parses self-signed certs only after successful validation?

It would be a contradiction in terms. You can't validate the semantic content of a file before you've parsed it!

Re:Cryptic Rumblings Ahead of First 2020 Patch Tuesday by fulafel on Tuesday January 14, 2020 @04:51AM (#22043310)
Yeah, I should have said "before it processes any other fields". The ASN.1 parse of course comes first.
Re:Cryptic Rumblings Ahead of First 2020 Patch Tuesday by ct520 on Tuesday January 14, 2020 @01:59AM (#22042497)
You mentioned code signing certs. What are your thoughts for document signing certificates? They embed a public copy into the document itself often not trusted..
Re:Cryptic Rumblings Ahead of First 2020 Patch Tuesday by vsareto on Monday January 13, 2020 @06:55PM (#22040164)
I'm going to be disappointed if all of this hype is for non-code execution
Re:Cryptic Rumblings Ahead of First 2020 Patch Tuesday by bob1029 on Monday January 13, 2020 @07:47PM (#22040587)
This would be a terrifying outcome if certificate-based RCE.

Imagine an actor like google running an intentionally-compromised TLS certificate on their web servers... perhaps even targeted at specific IP addresses or on certain schedules to avoid detection.

Certificates are an excellent initiation vector too. Especially, if one wanted to intentionally present a backdoor like this for national security reasons (all of the cryptographic primitives are already all right there for you to use to authenticate the cert).

Re:Cryptic Rumblings Ahead of First 2020 Patch Tuesday by gpm on Monday January 13, 2020 @09:21PM (#22041212)
I'd more more worried about either hacked sites, or a country with something like China's Great Cannon doing that than a legitimate US company like Google.

Google doing that would be a great way for everyone involved to spend a long time in jail.

Re:Cryptic Rumblings Ahead of First 2020 Patch Tuesday by cjbprime on Monday January 13, 2020 @10:34PM (#22041600)
> Imagine an actor like google running an intentionally-compromised TLS certificate on their web servers... perhaps even targeted at specific IP addresses or on certain schedules to avoid detection.

For what it's worth, you should read about Certificate Transparency, it tries to protect against this sort of problem. Browsers only accept certs that can prove they've been submitted to a public log, which means that their existence isn't being selectively exposed to some users only.

(They mainly act as prevention against rogue certificate authorities rather than a rogue cert owner, though.)

Re:Cryptic Rumblings Ahead of First 2020 Patch Tuesday by peterwwillis on Monday January 13, 2020 @11:06PM (#22041761)
> Am I missing something or is there a way to turn a spoofed certificate into a single-click pwn?

1) if there's a bug in the crypto library that creates RCE 2) if a mitm delivers a payload to an application (browser/plugin/etc) and that causes RCE. The former might cause NSA to get its panties in a wad.

But it might be much worse than RCE. It might be like Heartbleed, where it can leak key material and memory all day (on servers and clients) and you'd never know it because the leak leaves no trace on the system and just looks like normal requests. Perfect exploit for spying. (And of course it's possible they had that exploit in their back pocket, but someone else reported it to M$, so now they're CYAing)

Re:Cryptic Rumblings Ahead of First 2020 Patch Tuesday by atxlurker on Monday January 13, 2020 @11:32PM (#22041869)
This is what I’m guessing
Re:Cryptic Rumblings Ahead of First 2020 Patch Tuesday by chrismarlow9 on Monday January 13, 2020 @06:42PM (#22040061)
If the matching of the signatures is bypassed because of the ability to manipulate the underlying control flow of the API via something like ROP, it could be used for many things.

RCE in Windows Doesn't mean control over digital signature validation. But RCE in that particular API might mean both

Re:Cryptic Rumblings Ahead of First 2020 Patch Tuesday by resfirestar on Monday January 13, 2020 @06:42PM (#22040058)
We’ll find out tomorrow. Even if it’s just spoofing a valid signature on a exe I’d still call that pretty serious. Might get a piece of malware masquerading as a legit background program past a lot of SOC analysts. I’d bet there’s more to it though.
Re:Cryptic Rumblings Ahead of First 2020 Patch Tuesday by therein on Tuesday January 14, 2020 @06:15AM (#22043731)
Also kernel modules.
Re:Cryptic Rumblings Ahead of First 2020 Patch Tuesday by DrJosiah on Monday January 13, 2020 @09:54PM (#22041371)
My money is on it to disable support for sha1 in old products; maybe a bigger break than the prefix attack currently known.
Re:Cryptic Rumblings Ahead of First 2020 Patch Tuesday by saagarjha on Monday January 13, 2020 @06:31PM (#22039980)
> Equally concerning, a flaw in crypt32.dll might also be abused to spoof the digital signature tied to a specific piece of software. Such a weakness could be exploited by attackers to make malware appear to be a benign program that was produced and signed by a legitimate software company.

This looks like it could be abused to lead to code execution.