CertWatch 1.0 is out!

CertWatch is a Firefox add-on that helps you control how digital certificates are used when you visit secure websites. While there exist tools that help control how, for example, scripts like Javascript are executed (NoScript addon), there has not been a tool for digital certificates.

The closest Firefox addon to the functionality of CertWatch is Certificate Patrol, which keeps track of website certificates and notifies when a revisited website has a different website certificate. CertWatch collects more information than Certificate Patrol and keeps track of root, intermediate and website certificates, plus visit details.

Once you install CertWatch and restart Firefox, CertWatch will take up to 30 seconds to parse all root certificates that your Firefox comes with. Every secure website that you visit is vouched for by some root certificate that pre-exists in Firefox. Your Firefox has about 150 of those root certificates, and you can traditionally view them in Edit»Preferences»Advanced»Encryption»View Certificates»Authorities.

Screenshot of CertWatch 1.0 running for the first-time
Screenshot of CertWatch 1.0 running for the first-time

This is Firefox 4 (beta1) with a new profile. Both Firefox 4 and Firefox 3.6.8 (as found in Ubuntu 10.04) come with 149 root certificates. If you have more than 149, then you accepted yourself extra root certificates which are fully enabled and can vouch for secure websites. As you browse, your Firefox collects intermediate certificates (I plan to explain all these in future posts at certwatch.simos.info). These are added to Firefox without user interaction, as long as the respective root certificate is in Firefox as well.

Screenshot of CertWatch 1.0 Preferences
Screenshot of CertWatch 1.0 Preferences

These are the preferences, accessible from Tools » CertWatch Preferences. When you visit a secure website, there is a process where the website certificate is vouched by the root certificate that Firefox already knows. Between the website and root certificates there could be intermediate certificates, creating what is called a certificate chain.

What the preferences do is specify when you should get a notification while you visit a secure website. The default preferences say that for the certificate chain of a secure website, show the certificate details if any of the website, intermediate or root certificates are encountered for the first time.

Let’s visit https://addons.mozilla.org/ with CertWatch installed.

Screenshot of CertWatch 1.0 - certificates at addons.mozilla.org (animated GIF)
Screenshot of CertWatch 1.0 - certificates at addons.mozilla.org (animated GIF)

Each tab correspond to a certificate. All these three certificates are the certificate chain that verifies the secure website https://addons.mozilla.org/. The numbers at the tab names indicate how many times CertWatch encountered these certificates. It’s the first time, so they all show 1. The black star ★ indicates whether the CertWatch Preferences apply for each certificate. Since the preferences indicate first time only, then all tabs get a star.

From the list of root certificates, only a handful of them will be ever used during your browsing and with CertWatch you now have the facility to figure out which ones are actually being used. At this stage I would consider this as the first most important use of CertWatch; keeping track on how many times certificates are used. If you encounter a new certificate when you visit a revisited website, then this is something to investigate.

CertWatch keeps its copy of certificates in an SQLite database in your Firefox profile. For Linux, the path is ~/.mozilla/firefox/YOURPROFILENAME/CertWatchDB3.sqlite. You can read the database with any SQLite client such as the Firefox Addon SQLite Manager or sqlitebrowser (Packaged in Debian and Ubuntu as sqlitebrowser). In the SQLite database you can view the root/intermediate certificate table, the website certificate table, and the website visits table. In all cases the full certificate is stored in case you want to contribute to the EFF SSL Observatory.

CertWatch is developed on Ubuntu Linux 10.04, with Eclipse 3.6 (Helios) and the JSDT environment.

Install the latest version of CertWatch, which is available from the addons.mozilla.org (AMO) CertWatch page.

Follow the progress of CertWatch at the http://certwatch.simos.info/ CertWatch blog.

Here are some secure websites for testing, https://www.google.com/, https://www.paypal.com/, https://www.facebook.com/, https://twitter.com/

CertWatch 0.8 (released May 14, 2010)

Certificate Watch (CertWatch) is a Firefox extension that helps detect security problems with certificates in secure websites (https://).

I uploaded CertWatch 1.0 to AMO (Addons.Mozilla.Org) and it will take a few days until it gets accepted and becomes available there.

Therefore, let’s see for now what we get with CertWatch 0.8.

Installation

You can install CertWatch 0.8 by visiting the CertWatch AMO web page.

Once you install, select to restart your browser. Note that when you restart your browser, CertWatch performs an analysis of your Firefox’s root certificates and adds them to its own copy, in the file CertWatchDB2.sqlite, in your profile folder. This analysis may take up to 30 seconds (if your computer is slow), therefore be patient.

First use

CertWatch 0.8 - First time use
CertWatch 0.8 - First time use

Once you have installed CertWatch 0.8 and you restart Firefox, you are presented with a dialog similar to the one above. It shows the number of root certificates (includes what we call “intermediate” certificates as well) that have been read from Firefox and saved in CertWatch’s database. In CertWatch we distinguish between root and intermediate certificates. Click OK and you are read to surf.

Preferences

The CertWatch preferences are accessible from Tools » CertWatch Preferences.

CertWatch 0.8 Preferences dialog
CertWatch 0.8 Preferences dialog

When you visit a secure (i.e. https://) website, Firefox verifies whether the website certificate (secure websites come with “certificates”) is vouched by some authority, a Certification Authority (CA). These Certification Authorities are the 177 root certificates we saw earlier. There is a link between a website certificate and a corresponding root certificate in Firefox. In addition, between the website and root certificates there might be more certificates, the intermediate certificates. All these together make a chain.

So, when you visit a secure website, Firefox finds all the elements of the certification chain and verifies that a website is secure.

Once of the principle tasks of CertWatch is to keep track how many times a certificate has been accessed. When you repeatedly visit secure websites, the same certificates are used. So, with these preferences, CertWatch asks you how often to get notifications when certificates are accessed. The default is, when any new certificate is accessed, to show some notification.

In CertWatch 0.8 you can select up to how many times a new certificate (either website or root/intermediate) should be shown, when you visit a secure website.

CertWatch 0.8 - Website certificate
CertWatch 0.8 - Website certificate

This is a website certificate; every secure website has one of those. Issued To are the details of the website according to the certificate. Issued By are the details of the certification authority that vouches for the website certificate. From these details we do not know yet whether this Thawte certificate is a root certificate or whether it’s an intermediate certificate with some other root certificate on top.

Validity shows when the certificate was issued and when it expires. I hope you like the human-readable text next to the dates. Finally, the SHA-1 fingerprint of the certificate is shown. We keep track of the fingerprints in the CertWatch database; it helps to identify if something strange changed in the chain.

Certwatch 0.8 - Intermediate certificate
Certwatch 0.8 - Intermediate certificate

These are the details of the Thawte certificate. It is issued by a Verisign certificate so we know that the Thawte certificate is an intermediate certificate. We will see below whether the Verisign certificate is the root certificate or just an intermediate certificate.

Why does Verisign vouch for a Thawte certificate? Aren’t they different companies? Thawte was a South African company by Mark Shuttleworth (Ubuntu fame, cosmonaut) who sold his company in 1999 to Verisign. Now Thawte is part of Verisign.

You can notice the validity, compared to the validity of the website certificate. The more we move towards the root certificate, the validities become wider (compare two years to ten years for website and intermediate respectively).

Certwatch 0.8 - Root certificate
Certwatch 0.8 - Root certificate

This is the root certificate. The Issued To and Issued By details are the same. In CertWatch 1.0 this detail will be more visual than having to compare strings.

Although this certificate is for Google (I am insinuating quality), it is amazing how old the certificate is. It hails from 1996. The validity span is over 30 years. A piece of information that we do not show yet in CertWatch is the key size; this Verisign certificate from 1996 has a key size of 1024 bits. If you read the security news, you may have noticed complaints about this root certificate. It gets a bit worse; both this Verisign and the Thawte certificates have 1024-bit keys.

Are these two 1024-bit keys compromised? We can only speculate at this time. It will helps us figure out the answer if we can find out, how much harder it is to perform calculations between 1024-bit and 2048-bit RSA keys, and multiply that with the millions that connect to Google and GMail every day. If the computation requirements are not very different between the two, then there is no reason to keep 1024-bit keys.