Title: Privilege escalation in Windows agent
Class: security
Compatible: compat
Component: checks
Date: 1708958658
Edition: cre
Level: 1
Version: 2.1.0p40
In order to execute some system commands Checkmk Windows agent writes cmd files to
<code>C:\Windows\Temp\</code> and afterwards executes them.
The permissions of the files were set restrictive but existing files were not properly
handled.
If a cmd file already existed and was write protected the agent was not able to rewrite
the file but did not handle this case and executed the file nevertheless.
We thank Michael Baer (SEC Consult Vulnerability Lab) for reporting this issue.
<strong>Affected Versions</strong>:
* 2.2.0
* 2.1.0
* 2.0.0
<strong>Indicators of Compromise</strong>:
The filename of the cmd file needed to be guessed therefore the proof-of-concept creates a
lot of files in <code>C\Windows\Temp</code> with the filename
<code>cmk_all_\d+_1.cmd</code>.
These file-creation events could be monitored.
<strong>Vulnerability Management</strong>:
We have rated the issue with a CVSS Score of 8.8 (High) with the following CVSS vector:
<code>CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H</code>.
We assigned CVE-2024-0670 to this vulnerability.
<strong>Changes</strong>:
This Werk changes the temp folder and adds a subfolder with more restrictive permissions
in which the files are created.
Also errors are handled better.
Show replies by date