Today’s tutorial is anything new, but just thought I’d share some recent experience with Microsoft’s PowerShell. I’ve been playing around with PowerShell (PS) for a little while now, but nothing too extravagant, I’m not an administrator so I don’t have hundreds of little tasks I have to do on a daily basis (unless I can write a script to help me wake up and get ready in the morning.. C:\>Set-TeethClean ? ) – Anyways, I was recently tasked with doing some rudimentary task of searching through the Windows Certificate store and finding all CAs that were signed with MD5. If MD5 rings a bell its most likely because of this.

I really didn’t want to go through the list one by one, double-clicking, then selecting the Details tab. So I decided there had to be an easy way to parse this information. My first idea was to fire up Visual Studio and write a quick c# app to do this as it has built in Certificate Store classes/functions. But this seemed too combersome but I still wanted to leverage the .NET framework for the same features. PowerShell it was then.

If you haven’t heard yet, a practical attack on the X.509 infrastructure using MD5 hashes has been demonstrated at the Chaos Communication Congress (CCC) today. The basic gist of the attack is that a “normal” certificate is issued from a well-known and trusted CA (in this case “Equifax Secure Global eBusiness CA-1”) and then use the “magic” of MD5 hashing to create a certificate that collides with the “real” one, but just happens to be a CA. This CA can then issue certificates as they please, and your browser will trust them, no questions asked. The details are a bit more in depth, and unless you study cryptography, you will find rather boring and dry. However, MD5 hashes have been[…]