In order to exploit this vulnerability you're going to want to grab a copy of ssltest.py. For simplicity's sake you can execute the following command to grab the file:
wget https://gist.githubusercontent.com/sh1n0b1/10100394/raw/4f24ff250124a03ad2d3d6010b6402c3a483d2f3/ssltest.pyThis file requires Python 2.7 to run, it will not work in Python 3. To execute the program on the command line first:
chmod +x ssltest.pySimply supply the hostname or IP address of the server you wish to test for the vulnerability. By default the application does target port 443 if you do not specify a port. Once run the application will either return "No heartbeat response received, server likely not vulnerable" or it will dump the contents of the memory with the message "Warning: server returned more data then it should - server is vulnerable!" You may or may not find any interesting data in the dump the first time you run the application, this obviously depends upon whether or not anyone else is interacting with the server when you attemp the exploit, and which chunk of memory the server spits back to you. The exploit can be run continuously until you get the data you are looking for, whether it is session information or the private key of the SSL server. The interesting part is that none of these attacks are logged at the server level, because a complete connection is never made to the server. Thus these type of attacks are hard to see from the perspective of the host itself. There are some ways to detect these attacks using network protocol analysis and IDS/IPS may detect these if there is a signature for the attack.
./ssltest.py
Edit:
A Metasploit module has been released to exploit heartbleed. It can be found in metasploit's auxiliary/scanner/ssl/openssl_heartbleed.
URL: http://www.rapid7.com/db/modules/auxiliary/scanner/ssl/openssl_heartbleed
Addition URL's for further info: