2

I recently ran into a requirement that needed a web server set up with SSL, to show that its possible to extract the private key from a server with a vulnerable version of OpenSSL (Heartbleed). Hence, I downloaded a version of Debian I knew that shipped with the vulnerable version of OpenSSL from here.

However after configuring it, it wasn't leaking anything (as reported by Metasploit).

Below is the output from openssl version -a:

OpenSSL 1.0.1e 11 Feb 2013
built on: Sat Jun 13 10:26:40 UTC 2015
platform: debian-amd64
options:  bn(64,64) rc4(16x,int) des(idx,cisc,16,int) blowfish(idx)
compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -DTERMIO -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wa,--noexecstack -Wall -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM
OPENSSLDIR: "/usr/lib/ssl"

From what I know, versions between 1.0.1 through to 1.0.1f are vulnerable. I can see that it was built on a later date. My questions are:

  1. Which compile option made it safe against Heartbleed? I don't see DOPENSSL_NO_HEARTBEATS flag option in the output above.

  2. Where can I get a Debian version (7 or later) which actually ships with the vulnerable version of OpenSSL needed to demo Heartbleed.

  • 3
    They might have backported the patch. – void_in Sep 29 '15 at 10:51
8

As mentioned by @void_in, they backported the patch. Check your package version like so:

dpkg -l openssl

From 1.0.1e-2+deb7u5, the security patch has been included.:

openssl (1.0.1e-2+deb7u5) wheezy-security; urgency=high

  • Non-maintainer upload by the Security Team.
  • Add CVE-2014-0160.patch patch. CVE-2014-0160: Fix TLS/DTLS hearbeat information disclosure. A missing bounds check in the handling of the TLS heartbeat extension can be used to reveal up to 64k of memory to a connected client or server.

The files relating to 1.0.1e-2+deb7u4 can be found here, and you should be able to revert back to a previous version of a package by adding entries in the /etc/apt/preferences file.

  • My OpenSSL version (using an LTS distro) is OpenSSL 1.0.1f 6 Jan 2014 - why do they keep the "2014", it's irritating. Shouldn't this date info be updated to the the day of the latest patch? – Daniel W. Jan 25 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.