Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2020-0601 PoC — Microsoft Windows CryptoAPI 信任管理问题漏洞

Source
Associated Vulnerability
Title: Microsoft Windows CryptoAPI 信任管理问题漏洞 (CVE-2020-0601)
Description:A spoofing vulnerability exists in the way Windows CryptoAPI (Crypt32.dll) validates Elliptic Curve Cryptography (ECC) certificates.An attacker could exploit the vulnerability by using a spoofed code-signing certificate to sign a malicious executable, making it appear the file was from a trusted, legitimate source, aka 'Windows CryptoAPI Spoofing Vulnerability'.
Description
CurveBall CVE exploitation
Readme
# CVE-2020-0601 : CurveBall CVE exploitation

This ruby script can be used to spoof a legit certificate authority and generat a certificate that will be considered valid for Windows computer affected by the CurveBall vulnerability.

You need to get a certificate comming from the certificate authority you want to spoof.
Then, you can run the script with the following command :
`ruby gen-rogue-cert.rb -in=ca.crt -subj="/C=France/ST=IleDeFrance/L=Paris/O=YoannDqr" -out=cert_rb.p12 -exe=DoNotDebugMe.exe -sh -type=exe -sh | bash`

The script can be used to generate signed PE as well as TLS servers.

## List of options 
- -in   : mandatory ; path to the trusted CA cert to spoof
- -out  : mandatory ; path to store the generated certificate
- -type : mandatory ; can be 'exe' for code signing certificate or 'tls' for server and client authentication certificate

- -exe  : optionnal ; name of the executable to sign
- -subj : optional ; subject of the generated cert

- -sh   : flag optional ; return only the bash command needed to use the certificate (ex : command line to sign an executable)


## Technologies Used ##
The script is based on the ruby OpenSSL library https://github.com/ruby/openssl.

It will generate a fake CA from the public key found in the inputed certificate.
Then, it will generate a certificate signing request and signs it with the fake CA certificate.
The certificate will be packed in a pcks12 file and saved on your computer.

To add features as generating TLS certificates, just modify extensions of the certificate generated from the certificate signing request.

- Code signing : `csr_cert.add_extension(extension_factory.create_extension('extendedKeyUsage', 'codeSigning'))`
- TLS certificate : `csr_cert.add_extension(extension_factory.create_extension('extendedKeyUsage', 'serverAuth, clientAuth'))`
File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →