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

NAME

heartleech - Exploits OpenSSL heartbleed vulnerability

SYNOPSIS

heartleech host [--p port] [--dump filename] [--autopwn] [--threads n]

heartleech --read filename --cert certficate

heartleech --scanlist file

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

You can scan for vulnerable targets instead of dumping information:

$ heartleech --scanlist hostlist.txt --scan 10.0.0.0-10.0.0.255:992 --threads 1000

Hosts in the this file use the same format as other hostnames, meaning they can be ranges, and also have ports specified. Scan speed is likely dictated by the number of threads you have. You can have a lot of threads, but scanning will still be slower than masscan. The "verdict" from scanning is

* `SAFE` if we know for certain the target is safe, because it either 
  doesn't support heartbeats at all, or is patched against the bug

* `VULNERABLE` if we know for certain that the target is vulnerable,
  because we got back a bleed

* `INCONCLUSIVE` if we don't get a response -- which usually means that the
  target is safe, but we can't tell for sure

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)