TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Patch Critical Cryptographic Vulnerability in Microsoft Windows [pdf]

714 pointsby Moral_over 5 years ago

26 comments

tptacekover 5 years ago
From a conversation with Thomas Pornin, a plausible explanation given the details provided in the DoD advisory:<p>Given an ECDSA signature and control over the curve domain parameters, it&#x27;s straightforward to create a second private key that matches the original public key, without knowledge of the original signing private key. Here&#x27;s how:<p>To start with, you need to understand a little bit about how curve cryptography works. A curve point is simply the solution to an equation like<p><pre><code> y^2 = x^3 + ax + b mod p </code></pre> The &quot;curve&quot; itself consists of the parameters a, b, and p; for instance, in P-256, a is -3, b is (ee35 3fca 5428 a930 0d4a ba75 4a44 c00f dfec 0c9a e4b1 a180 3075 ed96 7b7b b73f), and p is 2^256 - 2^224 + 2^192 + 2^96 - 1.<p>To use that curve for cryptography, we standardize a base point G, which generates all the points we&#x27;ll use. A private key in ECC is simply a scalar number k mod p; the public key corresponding to that private key is kG (the curve scalar multiplication of the point G times our secret k). Everybody using P-256 uses the same base point; it&#x27;s part of the standard.<p>Assume that we have a signature validator in CryptoAPI that allows us to specify our own nonstandard base point. We&#x27;re ready to specify the attack; it&#x27;s just algebra:<p>Let&#x27;s call Q the public key corresponding to the signature; for instance, Q could be the ECC public key corresponding to an intermediate CA.<p>Q is a point on a named curve (like P-256). Q = xG for some private key x; we don&#x27;t, and won&#x27;t ever, know x. G is the standard generator point for (say) P-256.<p>What we&#x27;ll do is define a &quot;new curve&quot;, which is exactly P-256, but with a new generator point. We&#x27;ll generate our own random private key --- call it x&#x27; --- and then from that random private key compute a malicious generator G&#x27; = (1&#x2F;x&#x27;)*Q.<p>On our &quot;new curve&quot;, Q remains a valid point (in fact, our evil curve is the same curve as P-256, just with a different generator), but now Q&#x27; = x&#x27;G&#x27;, and we know x&#x27;.<p>Now we sign a fake EE certificate with our evil private key x&#x27;. Presumably, Windows is just looking at the public key value and, reading between the lines of the DoD advisory, the curve equation, but not the base point. By swapping base points, we&#x27;ve tricked Windows into believing the private key corresponding to Q is x&#x27;, a key we know, and not x, the key we don&#x27;t know.<p>I&#x27;m paraphrasing a shorter writeup Pornin provided, and the basic curve explanation is mine and not his, so if I&#x27;ve worded any of this poorly, blame me and not Thomas Pornin. The actual exploit-development details of the attack will involve figuring out in what circumstances attackers can swap in their own base point; you&#x27;d hope that the actual details of the attack are subtle and clever, and not as simple as &quot;anyone could have specified their own base point straightforwardly at any time&quot;.<p>See also this related exercise in Sean Devlin&#x27;s Cryptopals Set 8:<p><a href="https:&#x2F;&#x2F;toadstyle.org&#x2F;cryptopals&#x2F;61.txt" rel="nofollow">https:&#x2F;&#x2F;toadstyle.org&#x2F;cryptopals&#x2F;61.txt</a><p>This attack --- related but not identical to what we suspect today&#x27;s announcement is --- broke an earlier version of ACME (the LetsEncrypt protocol).
评论 #22049629 未加载
评论 #22048673 未加载
评论 #22049286 未加载
评论 #22053175 未加载
评论 #22050634 未加载
评论 #22052353 未加载
评论 #22053168 未加载
评论 #22049164 未加载
评论 #22052312 未加载
Uptrendaover 5 years ago
None of these links describe how the exploit works.<p>I found this: <a href="https:&#x2F;&#x2F;media.defense.gov&#x2F;2020&#x2F;Jan&#x2F;14&#x2F;2002234275&#x2F;-1&#x2F;-1&#x2F;0&#x2F;CSA-WINDOWS-10-CRYPT-LIB-20190114.PDF" rel="nofollow">https:&#x2F;&#x2F;media.defense.gov&#x2F;2020&#x2F;Jan&#x2F;14&#x2F;2002234275&#x2F;-1&#x2F;-1&#x2F;0&#x2F;CSA...</a><p>So based on my limited understanding:<p>1. The certificates have a place for defining curve parameters.<p>2. The attacker specifies their own parameters so that they match the start of a standard curve but choose the rest of the parameters themselves. With the right ECC math they are able to generate a valid signature for the certificate even though they don&#x27;t own the private key corresponding to the original curve.<p>3. The old crypto API -didn&#x27;t- check that certificates were signed from a fixed set of valid parameters. It would just check for sig validity allowing for spoofing of the cert.<p>Interesting stuff. So you might be able to cryptographically prove if there was ever any attacks in the wild from this at a given time (if we assume dates are checked at least)?<p>I wonder what happens at the Microsoft Security Response Center when a big vuln hits like this? Does it tie up all their resources just working on the one vuln?
评论 #22048164 未加载
评论 #22048508 未加载
评论 #22048928 未加载
评论 #22048549 未加载
评论 #22048266 未加载
评论 #22048465 未加载
评论 #22050171 未加载
评论 #22049469 未加载
评论 #22050743 未加载
kornholiover 5 years ago
From Krebs tweets:<p>The NSA&#x27;s Neuberger said this wasn&#x27;t the first vulnerability the agency has reported to Microsoft, but it was the first one for which they accepted credit&#x2F;attribution when MS asked.<p>Sources say this disclosure from NSA is planned to be the first of many as part of a new initiative at NSA dubbed &quot;Turn a New Leaf,&quot; aimed at making more of the agency&#x27;s vulnerability research available to major software vendors and ultimately to the public.
评论 #22048226 未加载
评论 #22049006 未加载
评论 #22047841 未加载
评论 #22050236 未加载
评论 #22050180 未加载
es56yhse6over 5 years ago
Interesting comment on reddit:<p>&gt; <i>Within the federal space, we&#x27;ve been making unprecedented plans for patching systems as soon as this patch is released today. In my agency we&#x27;re going to be aggressively quarantining and blocking unpatched systems beginning tomorrow. This patch has been the subject of many classified briefings within government agencies and military.</i><p><a href="https:&#x2F;&#x2F;old.reddit.com&#x2F;r&#x2F;sysadmin&#x2F;comments&#x2F;eoll74&#x2F;all_hands_on_deck_major_ms_update_coming_today&#x2F;" rel="nofollow">https:&#x2F;&#x2F;old.reddit.com&#x2F;r&#x2F;sysadmin&#x2F;comments&#x2F;eoll74&#x2F;all_hands_...</a>
评论 #22049811 未加载
mzsover 5 years ago
&gt; <a href="https:&#x2F;&#x2F;twitter.com&#x2F;randomoracle&#x2F;status&#x2F;1217198437281804290" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;randomoracle&#x2F;status&#x2F;1217198437281804290</a><p>Some speculation on CVE-2020-0601.<p>Earlier version of Windows cryptography API only supported a handful of elliptic curves from NIST suite-B. It could not handle say an arbitrary prime-curve in Weierstrass form with user defined parameters<p>…<p>While it could not grok arbitrary curves, Windows API made an attempt to recognize when a curve with explicit user-defined parameters was in fact identical to &quot;built-in&quot; curve that is supported<p>It appears that mapping was &quot;lazy:&quot; it failed to check that <i>all</i> curve parameters are identical to the known curve.<p>In particular, switching the generator point results in a different curve in which an attacker can forge signatures that match a victim public key<p>&gt; <a href="https:&#x2F;&#x2F;twitter.com&#x2F;esizkur&#x2F;status&#x2F;1217176214047219713" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;esizkur&#x2F;status&#x2F;1217176214047219713</a><p>It looks like this may be a caching issue: There&#x27;s a CCertObjectCache class in crypt32.dll. In the latest release its member function FindKnownStoreFlags (called from its constructor) started checking the public key and parameters<p>&gt; <a href="https:&#x2F;&#x2F;twitter.com&#x2F;thracky&#x2F;status&#x2F;1217175743316348929" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;thracky&#x2F;status&#x2F;1217175743316348929</a><p>ChainComparePublicKeyParametersAndBytes used to just be a memcmp before the patch. Same with any calls to IsRootEntryMatch. Both new functions.
cpascalover 5 years ago
The actual advisory from Microsoft (CVE-2020-0601):<p><a href="https:&#x2F;&#x2F;portal.msrc.microsoft.com&#x2F;en-US&#x2F;security-guidance&#x2F;advisory&#x2F;CVE-2020-0601" rel="nofollow">https:&#x2F;&#x2F;portal.msrc.microsoft.com&#x2F;en-US&#x2F;security-guidance&#x2F;ad...</a><p>&gt; A successful exploit could also allow the attacker to conduct man-in-the-middle attacks and decrypt confidential information on user connections to the affected software.
1970-01-01over 5 years ago
So Win7 isn&#x27;t affected? At this point in time I have to point out a fully patched Win7, having ~8 hours of support life left, just happens to be more secure than Win10 for trusting certs.
评论 #22050935 未加载
trulyrandomover 5 years ago
The advisory from Microsoft is quite bizarre. It focuses on code signature validation, rather than X.509 as a whole. It also doesn&#x27;t say anything about how the vulnerability itself works. Vague advisories like this are dangerous, because it gives adversaries an advantage over IT departments that don&#x27;t know which system they should patch first. It would be much better if everyone understood exactly what the impact is from the get go. The NSA advisory is a bit better, but still doesn&#x27;t tell us how exactly the ECC certificate validation bug works. We&#x27;re left with only a few hints.
评论 #22049875 未加载
CrazyStatover 5 years ago
Guess this is what Krebs was referring to yesterday: <a href="https:&#x2F;&#x2F;krebsonsecurity.com&#x2F;2020&#x2F;01&#x2F;cryptic-rumblings-ahead-of-first-2020-patch-tuesday&#x2F;" rel="nofollow">https:&#x2F;&#x2F;krebsonsecurity.com&#x2F;2020&#x2F;01&#x2F;cryptic-rumblings-ahead-...</a><p>And the discussion on HN: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22039481" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22039481</a>
m0xteover 5 years ago
Anyone got any news on Windows 7 seeing as it&#x27;s still 25% market share approx according to statcounter?
评论 #22048386 未加载
apiover 5 years ago
This is yet another illustration of why complexity is evil in cryptographic and security critical code. It&#x27;s evil everywhere, but it&#x27;s particularly evil there. The relationship between bugs and complexity is exponential, not linear.<p>X.509 is an over-engineered legacy-cruft-encrusted nightmare. I&#x27;ve implemented stuff that uses it and I <i>never</i>, even after the most careful auditing by myself and peers, leave with the sense that I have handled everything correctly or that my code is totally air-tight.
评论 #22048019 未加载
technionover 5 years ago
It&#x27;s been reported that Windows Defender can detect and report on malicious certificates:<p><a href="https:&#x2F;&#x2F;twitter.com&#x2F;AmitaiTechie&#x2F;status&#x2F;1217156973268893696" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;AmitaiTechie&#x2F;status&#x2F;1217156973268893696</a><p>Of course, that relies on not having Defender disabled by an alternate product.
评论 #22051314 未加载
cesarbover 5 years ago
Following a couple of twitter threads led me to this PDF: <a href="https:&#x2F;&#x2F;media.defense.gov&#x2F;2020&#x2F;Jan&#x2F;14&#x2F;2002234275&#x2F;-1&#x2F;-1&#x2F;0&#x2F;CSA-WINDOWS-10-CRYPT-LIB-20190114.PDF" rel="nofollow">https:&#x2F;&#x2F;media.defense.gov&#x2F;2020&#x2F;Jan&#x2F;14&#x2F;2002234275&#x2F;-1&#x2F;-1&#x2F;0&#x2F;CSA...</a><p>(the tweet where I found it at <a href="https:&#x2F;&#x2F;mobile.twitter.com&#x2F;NSAGov&#x2F;status&#x2F;1217152211056238593" rel="nofollow">https:&#x2F;&#x2F;mobile.twitter.com&#x2F;NSAGov&#x2F;status&#x2F;1217152211056238593</a> has an image version of that PDF, in case you don&#x27;t trust that domain)
dc352over 5 years ago
I suspect you&#x27;re overcomplicating the attack with all the math and we can ignore most of it.<p>The only way the attacker can tell the MS Crypto API is via the TLS protocol. You can only do it if it&#x27;s relevant. The only option for that is to use ECDH, which allows the server to supply EC parameters for the Diffie-Hellmann exchange.<p>My bet is that the problem is that MS Crypto API took those parameters as correct without checking them against what&#x27;s in the certificate. I.e.,<p>ServerKeyExchange - here&#x27;s the EC spec, we just need the public key Certificate - ah - here&#x27;s public key, we have the ECparams - let&#x27;s run the math<p>:)
geloover 5 years ago
For those that need proof their machine is updated the article numbers listed here are the KB numbers you should match in windows 10 update list.<p><a href="https:&#x2F;&#x2F;portal.msrc.microsoft.com&#x2F;en-US&#x2F;security-guidance&#x2F;advisory&#x2F;CVE-2020-0601" rel="nofollow">https:&#x2F;&#x2F;portal.msrc.microsoft.com&#x2F;en-US&#x2F;security-guidance&#x2F;ad...</a>
cliqueiqover 5 years ago
I think the scariest thing about this is if this was a PR stunt, the release of an unknown vuln could be completely controlled by whoever knew about it. Best case scenario is a relationships between Microsoft and the five eyes. It could have just as easily been China, a independent group or whatever. It&#x27;s even possible that the top of Microsoft and&#x2F;or NSA might not even know. But if it wasn&#x27;t planned, no one would admit it anyway.
dolmenover 5 years ago
Oh great. Mozilla just added last week an option for entreprises to enable trusting of system certificates on Windows. See Firefox 72.0 release notes: <a href="https:&#x2F;&#x2F;www.mozilla.org&#x2F;en-US&#x2F;firefox&#x2F;72.0&#x2F;releasenotes&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.mozilla.org&#x2F;en-US&#x2F;firefox&#x2F;72.0&#x2F;releasenotes&#x2F;</a>
评论 #22049766 未加载
miguelmotaover 5 years ago
Interesting, makes you wonder how many exploits the NSA purposely doesn&#x27;t mention to the vendor for their own benefit
morpheuskafkaover 5 years ago
I&#x27;m assuming there will never be an official proof of concept release, so how long do you all think it will be before we see widely available exploit code and fake certificates out in the wild?
评论 #22052323 未加载
评论 #22053301 未加载
vermilinguaover 5 years ago
Could someone clarify: does this allow the creation of fake certificates that are accepted as authentic by <i>any</i> crypto library?<p>Or rather, does it treat such faked certificates as authentic itself?
评论 #22049352 未加载
mrpippyover 5 years ago
At least this only affects Windows 10 (as far as I can tell)
评论 #22048061 未加载
classifiedover 5 years ago
When will they learn that the only way to respond to a hostile government is to overthrow it?
chrismartinover 5 years ago
Do any browsers use CryptoAPI for TLS certificate validation?
评论 #22048298 未加载
akayoshi1over 5 years ago
Globalist conspiracy. X files intro music
eeZah7Uxover 5 years ago
Some things never change...
age_bronzeover 5 years ago
Nothing screams &quot;we have microsoft keys!&quot; harder than the fact that the only vulnerabilities reported by the NSA is a cryptographic validation bug. If I had to guess exactly what kind of vulnerabilities they do not need, this is exactly those kind. Who needs crypto validation bug when you already own microsoft&#x27;s keys?!
评论 #22048976 未加载
评论 #22050949 未加载
评论 #22053239 未加载