
- #Knockknock folders how to#
- #Knockknock folders windows 10#
The communication is done using an AF_UNIX socket (local file) that is currently owned by the user executing the WSL instance. In the following section P9 (Planet 9 File System Protocol) and 9P (the protocol) are used interchangeably WSLv1 and P9
Same user privileges as the WSL instance. File tampering (the user accesses a file expecting some content, but it is changed during the transfer). (McAfee MVision Endpoint will consider this special path). Security bypass by using \\wsl$ syntax in applications that have options to disable Network Folders scan and thus, do not consider this as a local path. Protocol fuzzing for discovering vulnerabilities on the implementation. Persistence by hiding the real content, especially on WSLv2 where the root folder is a VHDX image. Potential usages for Red Teams and Researchers: At the end of this article, we present certain objects to monitor to detect such cases in your organization. MVISION EDR will provide visibility and detection on some of these artifacts. It is important to mention that when running inside an isolated environment like WSLV2, certain activities not crossing boundaries may remain hidden for security products, but once an attempt to execute a malicious app on the Windows side is detected, the scanning mechanism provided by MVISION Endpoint and ENS will trigger to protect. At first sight, this may look obvious, but once you control that communication, different ways of using the data being sent back and forth from Windows to the container begin to emerge. The main issue involves the lack of security control in the WSL communication object, leading to any user owning the instance to own the listening Planet 9 File System server. During our research, we found some design issues in WSLv1 that were propagated to WSLv2 - even though the core component differs. #Knockknock folders windows 10#
Since Windows 10 version 1903, it is possible to access Linux files from Windows by using the \wsl$ path syntax using 9P protocol.
#Knockknock folders how to#
It is important (even if not seen today in regular arsenals) to understand how to protect, detect and react to this attack surface which could be widely spread in the future where WSL could be a de-facto component in every Enterprise machine. The protocol and mechanism to do file management from/to WSL is a must for Blue and Red Teams whose research will provide new ways to execute known techniques to achieve tactics such as Persistence, Defense Evasion and Execution, among others. A Windows Linux Subsystem Interop Analysisįollowing our research from Evil Twins and Windows Linux Subsystem, interoperability between different WSL versions was something that caught our attention.