IBM WebSphere MQ Channel Name Bruteforce - Metasploit
This page contains detailed information about how to use the auxiliary/scanner/misc/ibm_mq_channel_brute metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: IBM WebSphere MQ Channel Name Bruteforce
Module: auxiliary/scanner/misc/ibm_mq_channel_brute
Source code: modules/auxiliary/scanner/misc/ibm_mq_channel_brute.rb
Disclosure date: -
Last modification time: 2018-11-20 16:24:17 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): 1414
List of CVEs: -
This module uses a dictionary to bruteforce MQ channel names. For all identified channels it also returns if SSL is used and whether it is a server-connection channel.
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/misc/ibm_mq_channel_brute
msf auxiliary(ibm_mq_channel_brute) > show options
... show and set options ...
msf auxiliary(ibm_mq_channel_brute) > set RHOSTS ip-range
msf auxiliary(ibm_mq_channel_brute) > exploit
Other examples of setting the RHOSTS option:
Example 1:
msf auxiliary(ibm_mq_channel_brute) > set RHOSTS 192.168.1.3-192.168.1.200
Example 2:
msf auxiliary(ibm_mq_channel_brute) > set RHOSTS 192.168.1.1/24
Example 3:
msf auxiliary(ibm_mq_channel_brute) > set RHOSTS file:/tmp/ip_list.txt
Required Options
RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
CHANNELS_FILE: The file that contains a list of channel names
Knowledge Base
Vulnerable Application
- IBM Downloads page: https://developer.ibm.com/messaging/mq-downloads/
- Tested on IBM MQ 7.5, 8 and 9
- Usage:
- Download and install MQ Server
- Create a new Queue Manager
- Create a new channel (without SSL)
- Run the module
Verification Steps
- Install IBM MQ Server 7.5, 8, or 9
- Start msfconsole
- Do:
use auxiliary/scanner/misc/ibm_mq_channel_brute
- Do:
set channels_file <channel_list_file>
- Do:
set rhosts <target_IP>
- Do:
set rport <port>
- Do:
run
Options
The CHANNELS_FILE option
This option should contain the path to a text file which contains a list of channel names that will be checked. One channel name per line.
Scenarios
This module can be used to identify a list of channel names that are configured on the Queue Manager. Additionally, the module will return whether each identified channel uses SSL and if it MQI type. After obtaining a list of valid channel names, these can be used to further enumerate the MQ installation. For example, the ibm_mq_enum module can be executed using a valid channel name in order to obtain information regarding the Queue Manager.
msf auxiliary(scanner/misc/ibm_mq_channel_brute) > run
[*] 10.1.1.144:1414 - Found channel: TEST.CHANNEL, IsEncrypted: False, IsMQI: True
[*] 10.1.1.144:1414 - Found channel: SYSTEM.ADMIN.SVRCONN, IsEncrypted: False, IsMQI: True
[+] 10.1.1.144:1414 - Channels found: ["TEST.CHANNEL", "SYSTEM.ADMIN.SVRCONN"]
[+] 10.1.1.144:1414 - Unencrypted MQI Channels found: ["TEST.CHANNEL", "SYSTEM.ADMIN.SVRCONN"]
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
Go back to menu.
Msfconsole Usage
Here is how the scanner/misc/ibm_mq_channel_brute auxiliary module looks in the msfconsole:
msf6 > use auxiliary/scanner/misc/ibm_mq_channel_brute
msf6 auxiliary(scanner/misc/ibm_mq_channel_brute) > show info
Name: IBM WebSphere MQ Channel Name Bruteforce
Module: auxiliary/scanner/misc/ibm_mq_channel_brute
License: Metasploit Framework License (BSD)
Rank: Normal
Provided by:
Petros Koutroumpis
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
CHANNELS_FILE yes The file that contains a list of channel names
CONCURRENCY 10 yes The number of concurrent channel names to check
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 1414 yes The target port (TCP)
THREADS 1 yes The number of concurrent threads (max one per host)
TIMEOUT 10 yes The socket connect timeout in seconds
Description:
This module uses a dictionary to bruteforce MQ channel names. For
all identified channels it also returns if SSL is used and whether
it is a server-connection channel.
Module Options
This is a complete list of options available in the scanner/misc/ibm_mq_channel_brute auxiliary module:
msf6 auxiliary(scanner/misc/ibm_mq_channel_brute) > show options
Module options (auxiliary/scanner/misc/ibm_mq_channel_brute):
Name Current Setting Required Description
---- --------------- -------- -----------
CHANNELS_FILE yes The file that contains a list of channel names
CONCURRENCY 10 yes The number of concurrent channel names to check
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 1414 yes The target port (TCP)
THREADS 1 yes The number of concurrent threads (max one per host)
TIMEOUT 10 yes The socket connect timeout in seconds
Advanced Options
Here is a complete list of advanced options supported by the scanner/misc/ibm_mq_channel_brute auxiliary module:
msf6 auxiliary(scanner/misc/ibm_mq_channel_brute) > show advanced
Module advanced options (auxiliary/scanner/misc/ibm_mq_channel_brute):
Name Current Setting Required Description
---- --------------- -------- -----------
CHOST no The local client address
CPORT no The local client port
ConnectTimeout 10 yes Maximum number of seconds to establish a TCP connection
Proxies no A proxy chain of format type:host:port[,type:host:port][...]
SSL false no Negotiate SSL/TLS for outgoing connections
SSLCipher no String for SSL cipher - "DHE-RSA-AES256-SHA" or "ADH"
SSLVerifyMode PEER no SSL verification method (Accepted: CLIENT_ONCE, FAIL_IF_NO_PEER_CERT, NONE, PEER)
SSLVersion Auto yes Specify the version of SSL/TLS to be used (Auto, TLS and SSL23 are auto-negotiate) (Accepted: Auto, TLS, SSL23, SSL3, TLS1, TLS1.1, TLS1.2)
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/misc/ibm_mq_channel_brute module can do:
msf6 auxiliary(scanner/misc/ibm_mq_channel_brute) > show actions
Auxiliary actions:
Name Description
---- -----------
Evasion Options
Here is the full list of possible evasion options supported by the scanner/misc/ibm_mq_channel_brute auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(scanner/misc/ibm_mq_channel_brute) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
TCP::max_send_size 0 no Maxiumum 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.
TCP Port closed.
Here is a relevant code snippet related to the "TCP Port closed." error message:
83: @channels = []
84: @unencrypted_mqi_channels = []
85: begin
86: channel_list
87: rescue ::Rex::ConnectionRefused
88: fail_with(Failure::Unreachable, "TCP Port closed.")
89: rescue ::Rex::ConnectionError, ::IOError, ::Timeout::Error, Errno::ECONNRESET
90: fail_with(Failure::Unreachable, "Connection Failed.")
91: rescue ::Exception => e
92: fail_with(Failure::Unknown, e)
93: end
Connection Failed.
Here is a relevant code snippet related to the "Connection Failed." error message:
85: begin
86: channel_list
87: rescue ::Rex::ConnectionRefused
88: fail_with(Failure::Unreachable, "TCP Port closed.")
89: rescue ::Rex::ConnectionError, ::IOError, ::Timeout::Error, Errno::ECONNRESET
90: fail_with(Failure::Unreachable, "Connection Failed.")
91: rescue ::Exception => e
92: fail_with(Failure::Unknown, e)
93: end
94: if(@channels.empty?)
95: print_status("#{ip}:#{rport} No channels found.")
<IP>:<RPORT> No channels found.
Here is a relevant code snippet related to the "<IP>:<RPORT> No channels found." error message:
90: fail_with(Failure::Unreachable, "Connection Failed.")
91: rescue ::Exception => e
92: fail_with(Failure::Unknown, e)
93: end
94: if(@channels.empty?)
95: print_status("#{ip}:#{rport} No channels found.")
96: else
97: print_good("Channels found: #{@channels}")
98: print_good("Unencrypted MQI Channels found: #{@unencrypted_mqi_channels}")
99: report_note(
100: :host => rhost,
Channel names cannot exceed 20 characters. Skipping.
Here is a relevant code snippet related to the "Channel names cannot exceed 20 characters. Skipping." error message:
118: end
119: t << framework.threads.spawn("Module(#{self.refname})-#{rhost}:#{rport}", false, this_channel) do |channel|
120: connect
121: vprint_status "#{rhost}:#{rport} - Sending request for #{channel}..."
122: if channel.length.to_i > 20
123: print_error("Channel names cannot exceed 20 characters. Skipping.")
124: next
125: end
126: chan = channel + "\x20"*(20-channel.length.to_i)
127: timeout = datastore['TIMEOUT'].to_i
128: s = connect(false,
No response received. Try increasing timeout.
Here is a relevant code snippet related to the "No response received. Try increasing timeout." error message:
132: }
133: )
134: s.put(create_packet(chan))
135: data = s.get_once(-1,timeout)
136: if data.nil?
137: print_status("No response received. Try increasing timeout.")
138: next
139: end
140: if not data[0...3].include? 'TSH'
141: next
142: end
Go back to menu.
Related Pull Requests
Go back to menu.
See Also
Check also the following modules related to this module:
- auxiliary/scanner/misc/ibm_mq_enum
- auxiliary/scanner/misc/ibm_mq_login
- auxiliary/scanner/misc/cctv_dvr_login
- auxiliary/scanner/misc/cisco_smart_install
- auxiliary/scanner/misc/clamav_control
- auxiliary/scanner/misc/dahua_dvr_auth_bypass
- auxiliary/scanner/misc/dvr_config_disclosure
- auxiliary/scanner/misc/easycafe_server_fileaccess
- auxiliary/scanner/misc/freeswitch_event_socket_login
- auxiliary/scanner/misc/ib_service_mgr_info
- auxiliary/scanner/misc/java_jmx_server
- auxiliary/scanner/misc/java_rmi_server
- auxiliary/scanner/misc/oki_scanner
- auxiliary/scanner/misc/poisonivy_control_scanner
- auxiliary/scanner/misc/raysharp_dvr_passwords
- auxiliary/scanner/misc/rosewill_rxs3211_passwords
- auxiliary/scanner/misc/sercomm_backdoor_scanner
- auxiliary/scanner/misc/sunrpc_portmapper
- auxiliary/scanner/misc/zenworks_preboot_fileaccess
- auxiliary/admin/http/ibm_drm_download
- auxiliary/dos/http/ibm_lotus_notes
- auxiliary/dos/http/ibm_lotus_notes2
- auxiliary/dos/misc/ibm_sametime_webplayer_dos
- auxiliary/dos/misc/ibm_tsm_dos
- auxiliary/gather/ibm_bigfix_sites_packages_enum
- auxiliary/gather/ibm_sametime_enumerate_users
- auxiliary/gather/ibm_sametime_room_brute
- auxiliary/gather/ibm_sametime_version
- exploit/windows/ibm/ibm_was_dmgr_java_deserialization_rce
- auxiliary/admin/oracle/sid_brute
- auxiliary/scanner/http/mod_negotiation_brute
- auxiliary/scanner/http/sap_businessobjects_user_brute
- auxiliary/scanner/oracle/sid_brute
- auxiliary/scanner/oracle/xdb_sid_brute
Authors
Petros Koutroumpis
Version
This page has been produced using Metasploit Framework version 6.2.7-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.