CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/auxiliary/scanner/misc/rocketmq_version.rb
Views: 11784
1
### This module requires Metasploit: https://metasploit.com/download
2
# Current source: https://github.com/rapid7/metasploit-framework
3
##
4
5
class MetasploitModule < Msf::Auxiliary
6
include Msf::Exploit::Remote::Tcp
7
include Msf::Auxiliary::Scanner
8
include Msf::Auxiliary::Report
9
include Msf::Auxiliary::Rocketmq
10
11
def initialize(info = {})
12
super(
13
update_info(
14
info,
15
'Name' => 'Apache RocketMQ Version Scanner',
16
'Description' => %q{
17
Version scanner for the Apache RocketMQ product.
18
},
19
'Author' => [
20
'h00die',
21
'Malayke' # CVE-2023-33246 code
22
],
23
'References' => [
24
['URL', 'https://github.com/Malayke/CVE-2023-33246_RocketMQ_RCE_EXPLOIT/blob/main/check.py'],
25
['URL', 'https://github.com/apache/rocketmq']
26
],
27
'License' => MSF_LICENSE,
28
'Notes' => {
29
'Stability' => [],
30
'Reliability' => [],
31
'SideEffects' => []
32
}
33
)
34
)
35
end
36
37
def run_host(_ip)
38
res = send_version_request
39
40
if res.nil?
41
print_error('Invalid or no response received')
42
return
43
end
44
45
parsed_data = parse_rocketmq_data(res)
46
# grab some data that we need/want out of the response
47
output = "RocketMQ version #{parsed_data['version']}"
48
output += " found with brokers: #{parsed_data['brokerDatas']}" if parsed_data['brokerDatas']
49
print_good(output)
50
end
51
end
52
53