Giter Site home page Giter Site logo

certchecker's Introduction

Installed Certificates Checker

Summary

The excellent sigcheck Windows Sysinternals tool can identify currently installed certificates and more specifically, any that are not rooted by a certificate on the trusted Microsoft root certificate list.

This is useful when hunting for Superfish like certificates that could be used to intercept encrypted communication.

Combining the output of the sigcheck tool with a git repo can provide a history of changes and allows reuse of git tools to easily compare the diffs.

Guide

  1. Create a git repo (or clone this one)
  2. Download Sigcheck (Windows Sysinternals Tool) from https://technet.microsoft.com/en-us/sysinternals/bb897441.aspx
  3. Unzip Sigcheck tool into the git repo
  4. Open command prompt where sigcheck is located
  5. Execute the following command: sigcheck -q -tv -c > mycerts.csv
  6. The v option ensures that only certificates not rooted to Microsoft's trusted list will be in the ouput (leave it off if you want all certs in the output)
  7. Examine mycerts.csv (ideally the first line will be column headers and the next line will say: No certificates found.)
  8. Compare diffs using a git tool like https://desktop.github.com/ (see screenshot below)
  9. Commit mycerts.csv to the git repo
  10. Periodically redo steps 4 through 9

Example Evil Certificate and Testing the Diff

  1. Use an example evil self-signed certificate or generate one using the command: openssl req -x509 -newkey rsa:2048 -keyout key.pem -out evilcert.pem -days 90 -nodes
  2. Import the certifcate into your machine under "Trusted Root Certification Authorities"
  3. Rerun the same sigcheck command to overwrite the mycerts.csv file
  4. Compare the diff using git with the following command: git diff mycerts.csv
diff --git a/mycerts.csv b/mycerts.csv
index ed709fb..cb5d810 100644
--- a/mycerts.csv
+++ b/mycerts.csv
@@ -1,2 +1,2 @@
 Store,Subject,Status,Valid Usage,Issuer,Serial Number,Thumbprint,Algorithm,Valid from,Valid to
-No certificates found.
+"Machine\ROOT","mitm.evilgenus.com","Valid",All,"mitm.evilgenus.com",,00 DA AB A7 BE 61 AC 2A 64,968C59C2D40C54F6432529B245CC51F6FB9E6F37,"sha256RSA","10:30 PM 3/20/2016","10:30 PM 6/18/2016"
  1. Notice the the line "No certificates found" was removed and a new certificate was found that was not rooted in Microsoft's trusted list (and the evil "genus" is not good at spelling).
  2. The GitHub Desktop tool shows this change by simply selecting mycerts.csv in the list of changed files. Alt

certchecker's People

Contributors

jessefugitt avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.