Sunday, November 8, 2015

Solving the wildcard SSL certificate problem

The best thing to happen with SSL certificates is the introduction of wildcard certificates. This provides the site Administrators the ability to have as many sub-domains as they wish, without going for separate certificate for each one. Very convenient and cost effective indeed.

However this convenience comes with a cost - Security threat. If some hacker manages to get hold of the private key, then the hackers can create their own valid sub-domains using the certificate. The sub-domain can then be used as launchpad for malicious attacks by hosting malicious scripts. The hackers could also compromise the webserver or reverse proxy of the host to achieve same results. This is a big issue indeed!

The fore said issue could be solved by adding a WELL_KNOWN_SERVICE URL, which the browsers shall consult to get list of valid sub-domains. For example, *.yoursite.com certificate could have a WELL_KNOWN_SERVICE URL wksvc.yoursite.com. All a site admin would have to do is to update the list exposed by the service. The WELL_KNOWN_SERVICE could be a REST service with JSON binding. A better workaround is to allow domain web-masters to generate their own private keys, just like Digicert.com does.

Another possible attack is having a long legitimate looking sub-domain. For example, for many users, www.citybank.coo.in would look like a legit site, except that the site doesn't belong to Citybank but Coo.in! The solution for this is for the browsers to ensure that the wildcard domain appears in the primary area of browser URL bar. Further it should be highlighted in bold and a background colour. For example, it could look like www.citybank.coo.in/mypayments. With coo.in properly highlighted, users could easily understand that the site belongs to coo.in and not City Bank!


Getting started with Node and express using Docker labs

Introduction For writing web applications we need server middle-ware that can run the business logic and expose the same as web servic...