NoMachine Arbitrary File Overwrite

渗透技巧 1年前 (2023) admin
207 0 0

Table of Contents

Introduction

NoMachine is a free remote desktop solution which features higher speeds than usual competitors. I have identified the possibility to overwrite root-owned files and after I have created PoC, I have contacted NoMachine team which was quick to address the vulnerability and to issue the new update.

The vulnerability was affecting NoMachine free edition and Enterprise Client for macOS and it is fixed in version v8.8.1.

Analysis

NoMachine application writes log files to the directory /Library/Application Support/NoMachine/var/log. Examining the permissions of this directory we can see that the directory is owned by the user nx and that rwx is set for everyone.

NoMachine Arbitrary File OverwriteThe directory contains a couple of .log files. Because we are granted rwx we can simply create a hardlink which points to the root-owned file and once the application writes something to the log file, that root-owned file would get overwritten.

NoMachine Arbitrary File Overwrite

Exploitation

To exploit the vulnerability, we need to simply create the hardlink. As a root user, we will create /Library/secret file and make nxserver.log as a hardlink to that file.

NoMachine Arbitrary File Overwrite

原文始发于NSEcho :NoMachine Arbitrary File Overwrite

版权声明:admin 发表于 2023年7月28日 上午9:49。
转载请注明:NoMachine Arbitrary File Overwrite | CTF导航

相关文章

暂无评论

您必须登录才能参与评论!
立即登录
暂无评论...