1. heartleech(8)
  2. heartleech(8)

NAME

heartleech - Exploits OpenSSL heartbleed vulnerability

SYNOPSIS

heartleech host [-pport] [--dump filename] [--autopwn]

heartleech --read filename --cert certficate

DESCRIPTION

heartleech exploits the well-known "heartbleed" bug in <= OpenSSL-1.0.1f. It has a number of features that improve over other heartbleed exploits, such as automatically extracting the SSL private-key (autopwn).

OPTIONS

SIMPLE EXAMPLES

The following is the easiest way to use the program, to grab the private-key form the server in 'auto-pwn' mode:

$ heartleech www.example.com --autopwn --threads 5

This auto-pwn mode will search for the heartbeat payloads looking for the components of the private-key that matches the server's certificate (which it automatically retrieves). When a certificate is found, it's printed to stdout. The user can then copy it to a file and use it for anythign that private-keys can be used for. Using multiple threads downloads faster.

Heartbleed information contains more than just private keys. On a typical web-server, it'll contain session cookies (useful for sidejacking) and passwords. In that case, the way to use this program is to save all the heartbleed information into a file. Note that these files quickly grow to gigabytes in size:

$ heartleech www.example.com --dump bleed.bin --threads 6
<ctrl-c>
$ grep -iobUaP "Cookie:.*\n" bleed.bin

IDS EVASION

Soon after the Heartbleed vulnerability was announced, many people published 'rules' for Snort-like intrusion-detection engines. These rules all trigger on the pattern |18 03| in the first two bytes of the TCP payloads.

By default, this program avoids putting that pattern in the first two bytes. Instead, it tries to put those bytes elsewhere in the payload. Thus, this program should genrally avoid that sort of detection.

Note that this isn't complete IDS evasion. The open-source Bro program, and many commercial products, do a full SSL protocol decode, and therefore catch this exploit no matter where it is in the packet. Also, by the time you read this, it's probable that the Snort-like engines will have upgraded their code to support SSL decodes as well.

SEE ALSO

masscan(8)

AUTHORS

This tool was written by Robert Graham. The source code is available at https://github.com/robertdavidgraham/heartbleed

  1. May 2014
  2. heartleech(8)