How to detect if your server is vulnerable to the Heartbleed OpenSSL bug and fix it

HeartbleedThis is a serious bug affecting a lot of servers including Debian Wheezy. Act fast because everything is being scanned and information is being leaked right now!

The Heartbleed Bug is a serious vulnerability in the popular OpenSSL cryptographic software library. This weakness allows stealing the information protected, under normal conditions, by the SSL/TLS encryption used to secure the Internet. The Heartbleed bug allows anyone on the Internet to read the memory of the systems protected by the vulnerable versions of the OpenSSL software. This compromises the secret keys used to identify the service providers and to encrypt the traffic, the names and passwords of the users and the actual content. This allows attackers to eavesdrop on communications, steal data directly from the services and users and to impersonate services and users.

It’s really easy to use to bug to steal information from affected systems without having any access to it or the network. To check if your server is infected and see what information it is exposing you can use this python script: hb-test.py

To use the script, make sure you have python installed and run the following command:

python hb-test.py www.example.org
Continue reading

Create your private certificate authority (CA)

Creating a private CA can be useful if you have a lot of services encrypting data for internal use but don’t need the domain to be verified by a public CA like Verisign, Thawte etc. By importing the CA to all computers that will use these services users won’t get the a popup in IE and Firefox saying that the certificate is invalid.

1. Create a CA certificate

Create a private key for your CA:

openssl genrsa -des3 -out ca.key 4096

Continue reading

Request and install SSL using Apache2 and OpenSSL

First we’ll need to create a certificate signing request (CSR) containing the certificate application info and a private key. Make sure you don’t expose you’re private key (test.com.key) to the public or the safety of the encrypted information could be compromised.

mkdir /etc/apache2/ssl
cd /etc/apache2/ssl
openssl req -new -nodes -keyout test.com.key -out test.com.csr
Continue reading