Skip to content
Crypto Write-up Intermediate

Authenticode verification vulnerability pattern

The .NET method X509Certificate.CreateFromSignedFile only extracts and verifies the certificate, not the file's signature, so attackers can transplant a valid certificate onto an unsigned executable or create a self-signed certificate with matching subject and issuer to bypass verification. This allowed bypassing signature checks in Dynamo BIM and SoundSwitch.

blog.devsecurity.eu

Published on blog.devsecurity.eu

There is a common vulnerability pattern in various implementations of authenticode signature verification in .NET. It was found multiple times in different products in the past and I have seen it myself during security audits.

The author, on blog.devsecurity.eu

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Impact

Attackers could bypass signature verification in applications like Dynamo BIM and SoundSwitch, potentially allowing execution of tampered or unsigned code.

What the attacker needed

Ability to modify or replace the executable; access to a valid signed executable or ability to create a…

The fix

The fix was to use proper signature verification, such as WinVerifyTrust, instead of relying on X509Certificate.CreateFromSignedFile.

How it was found

  1. Build an unsigned .NET assembly.
  2. Use SigPirate to transplant a certificate from a Microsoft-signed assembly onto the unsigned assembly.
  3. The vulnerable code then accepts the file as signed.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

When software checks if a file is signed, it should verify that the signature actually belongs to that file. Here, the check only looked at the certificate attached to the file, not whether the file itself was signed by it. So an attacker could take a certificate from a legitimately signed file and attach it to a malicious file, and the check would still pass.

What is Crypto?

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.

Similar reports

View all

Same bug class and techniques, clearest first.

Cryptographic weaknesses

The lesson behind this report.

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.