Identify Queue Manager Name and MQ Version - Metasploit
This page contains detailed information about how to use the auxiliary/scanner/misc/ibm_mq_enum metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Identify Queue Manager Name and MQ Version
Module: auxiliary/scanner/misc/ibm_mq_enum
Source code: modules/auxiliary/scanner/misc/ibm_mq_enum.rb
Disclosure date: -
Last modification time: 2018-11-21 16:09:18 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): -
List of CVEs: -
Run this auxiliary against the listening port of an IBM MQ Queue Manager to identify its name and version. Any channel type can be used to get this information as long as the name of the channel is valid.
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_enum
msf auxiliary(ibm_mq_enum) > show options
... show and set options ...
msf auxiliary(ibm_mq_enum) > set RHOSTS ip-range
msf auxiliary(ibm_mq_enum) > exploit
Other examples of setting the RHOSTS option:
Example 1:
msf auxiliary(ibm_mq_enum) > set RHOSTS 192.168.1.3-192.168.1.200
Example 2:
msf auxiliary(ibm_mq_enum) > set RHOSTS 192.168.1.1/24
Example 3:
msf auxiliary(ibm_mq_enum) > 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
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_enum
- Do:
set channel <channel_name>
- Do:
set rhosts <target_IP>
- Do:
set rport <port>
- Do:
run
Options
CHANNEL
This option should contain the name of a valid MQ channel. This can be obtained using the module auxiliary/scanner/misc/ibm_mq_channel_brute
Scenarios
This module can be used to obtain the Queue Manager name as well as the version of the MQ being used on the target host. When the Queue Manager name and a valid MQI channel name without SSL is known , the module auxiliary/scanner/misc/ibm_mq_login
can be used to identify usernames that can authenticate to the Queue Manager.
msf auxiliary(scanner/misc/ibm_mq_enum) > run
[+] 10.1.1.144: - 10.1.1.144:1414 - Queue Manager Name: TESTQM - MQ Version: 9.1.0.0
[*] 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_enum auxiliary module looks in the msfconsole:
msf6 > use auxiliary/scanner/misc/ibm_mq_enum
msf6 auxiliary(scanner/misc/ibm_mq_enum) > show info
Name: Identify Queue Manager Name and MQ Version
Module: auxiliary/scanner/misc/ibm_mq_enum
License: Metasploit Framework License (BSD)
Rank: Normal
Provided by:
Petros Koutroumpis
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
CHANNEL SYSTEM.DEF.SVRCONN yes Channel to use
CONCURRENCY 10 yes The number of concurrent ports to check per host
PORTS 1414 yes Ports to probe
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
THREADS 1 yes The number of concurrent threads (max one per host)
TIMEOUT 10 yes The socket connect timeout in seconds
Description:
Run this auxiliary against the listening port of an IBM MQ Queue
Manager to identify its name and version. Any channel type can be
used to get this information as long as the name of the channel is
valid.
Module Options
This is a complete list of options available in the scanner/misc/ibm_mq_enum auxiliary module:
msf6 auxiliary(scanner/misc/ibm_mq_enum) > show options
Module options (auxiliary/scanner/misc/ibm_mq_enum):
Name Current Setting Required Description
---- --------------- -------- -----------
CHANNEL SYSTEM.DEF.SVRCONN yes Channel to use
CONCURRENCY 10 yes The number of concurrent ports to check per host
PORTS 1414 yes Ports to probe
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
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_enum auxiliary module:
msf6 auxiliary(scanner/misc/ibm_mq_enum) > show advanced
Module advanced options (auxiliary/scanner/misc/ibm_mq_enum):
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_enum module can do:
msf6 auxiliary(scanner/misc/ibm_mq_enum) > show actions
Auxiliary actions:
Name Description
---- -----------
Evasion Options
Here is the full list of possible evasion options supported by the scanner/misc/ibm_mq_enum auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(scanner/misc/ibm_mq_enum) > 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.
Channel name must be less than 20 characters.
Here is a relevant code snippet related to the "Channel name must be less than 20 characters." error message:
88:
89:
90: def run_host(ip)
91: chan = datastore['CHANNEL']
92: if chan.length > 20
93: print_error("Channel name must be less than 20 characters.")
94: raise Msf::OptionValidateError.new(['CHANNEL'])
95: end
96: ports = Rex::Socket.portspec_crack(datastore['PORTS'])
97: while(ports.length > 0)
98: t = []
CHANNEL
Here is a relevant code snippet related to the "CHANNEL" error message:
89:
90: def run_host(ip)
91: chan = datastore['CHANNEL']
92: if chan.length > 20
93: print_error("Channel name must be less than 20 characters.")
94: raise Msf::OptionValidateError.new(['CHANNEL'])
95: end
96: ports = Rex::Socket.portspec_crack(datastore['PORTS'])
97: while(ports.length > 0)
98: t = []
99: r = []
No response received. Try increasing TIMEOUT value.
Here is a relevant code snippet related to the "No response received. Try increasing TIMEOUT value." error message:
113: if data_recv[data_recv.length-4...data_recv.length] != "\x02\x00\x00\x00"
114: break
115: end
116: end
117: if data_recv.nil?
118: print_status("No response received. Try increasing TIMEOUT value.")
119: print_line
120: next
121: end
122: status_code = data_recv[-4..-1]
123: if status_code == "\x18\x00\x00\x00"
Channel Requires SSL. Could not get more information.
Here is a relevant code snippet related to the "Channel Requires SSL. Could not get more information." error message:
119: print_line
120: next
121: end
122: status_code = data_recv[-4..-1]
123: if status_code == "\x18\x00\x00\x00"
124: print_status("Channel Requires SSL. Could not get more information.")
125: print_line
126: end
127: if not data_recv[0...3].include?('TSH')
128: next
129: end
" does not exist.
Here is a relevant code snippet related to the "" does not exist." error message:
126: end
127: if not data_recv[0...3].include?('TSH')
128: next
129: end
130: if status_code == "\x01\x00\x00\x00"
131: print_error('Channel "' + chan + '" does not exist.')
132: print_line
133: end
134: if status_code == "\x02\x00\x00\x00" or status_code == "\x06\x00\x00\x00"
135: print_error('Unsupported channel type. Try a different channel.')
136: print_line
Unsupported channel type. Try a different channel.
Here is a relevant code snippet related to the "Unsupported channel type. Try a different channel." error message:
130: if status_code == "\x01\x00\x00\x00"
131: print_error('Channel "' + chan + '" does not exist.')
132: print_line
133: end
134: if status_code == "\x02\x00\x00\x00" or status_code == "\x06\x00\x00\x00"
135: print_error('Unsupported channel type. Try a different channel.')
136: print_line
137: end
138: if data_recv.length < 180
139: next
140: end
<IP>:<PORT> - TCP Port Closed.
Here is a relevant code snippet related to the "<IP>:<PORT> - TCP Port Closed." error message:
162: )
163: s.put(packet)
164: data = s.get_once(-1,timeout)
165: return data
166: rescue ::Rex::ConnectionRefused
167: print_error("#{ip}:#{port} - TCP Port Closed.")
168: print_line
169: rescue ::Rex::ConnectionError, ::IOError, ::Timeout::Error, Errno::ECONNRESET
170: print_error("#{ip}:#{port} - Connection Failed.")
171: print_line
172: rescue ::Interrupt
<IP>:<PORT> - Connection Failed.
Here is a relevant code snippet related to the "<IP>:<PORT> - Connection Failed." error message:
165: return data
166: rescue ::Rex::ConnectionRefused
167: print_error("#{ip}:#{port} - TCP Port Closed.")
168: print_line
169: rescue ::Rex::ConnectionError, ::IOError, ::Timeout::Error, Errno::ECONNRESET
170: print_error("#{ip}:#{port} - Connection Failed.")
171: print_line
172: rescue ::Interrupt
173: raise $!
174: ensure
175: if s
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_channel_brute
- 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/misc/sercomm_dump_config
- auxiliary/admin/misc/wol
- auxiliary/dos/misc/dopewars
- auxiliary/dos/misc/memcached
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.