Skip to main content

Inter-process Communication Vulnerability – Unrestricted Write Permissions in VPN Service

Illustration of Inter-process Communication Vulnerability – Unrestricted Write Permissions in VPN Service
Mateusz Lewczak

Overview

Inter-Process Communication (IPC) is simply the set of mechanisms that let two or more processes on the same machine exchange data or signals. Across Windows, Linux and macOS you’ll find pipes or FIFOs, shared memory regions, message queues and—crucially for many modern services—sockets (named pipes on Windows, UNIX Domain Sockets on Unix-like systems, and Mach ports/XPC on macOS). These primitives differ in performance and complexity, but they all serve the same goal: enable a less-privileged component (for example, a user-facing GUI) to invoke functionality in a more-privileged daemon (like a VPN manager).

In the modern network communication, VPN services often rely on advanced methods for inter-process communication (IPC) to manage their operations effectively. One common approach is the use of gRPC over Unix Domain Sockets, allowing different processes within the system to interact efficiently and securely. IPC allows a management service to enable, disable, and configure VPN tunnel settings on demand.

However, a critical misconfiguration can arise when the Unix Domain Socket used for these operations is granted write permissions to all users on the system. As a result, any local user or application - regardless of their authorization - can modify the VPN tunnel, such as enabling, disabling, or changing its settings, without the knowledge or consent of the current user. This issue becomes even more problematic in environments where multiple users operate on the same host, as one user could alter or disrupt another’s VPN connection without their awareness, raising serious security and privacy concerns.

Think of IPC as a local REST API: processes exchange JSON or binary messages over a socket rather than over TCP. In fact, plenty of system daemons (e.g. Docker, various VPN clients) expose HTTP-style endpoints on a UNIX socket, allowing you to curl –unix-socket commands just like you would against a webserver. But just as you’d lock down a public API with tokens or OAuth, IPC endpoints must be guarded—and most operating systems enforce this via filesystem permissions on the socket file (owner/group/mode). If a socket is world-writable or world-readable, any local user can connect and call methods that should be privileged: enabling, disabling or reconfiguring a VPN tunnel without the original user’s knowledge or consent. Properly scoping ownership and restricting access bits is therefore critical to prevent unauthorized local actors from hijacking internal APIs.

Proof of Concept

To demonstrate this vulnerability, I created custom software using Visual Studio and the provided client-side VPN management DLL. Below is the detailed method I used to exploit the discovered flaw.

Initially, I set up a new Visual Studio project and included the required DLL file (name and location redacted for security reasons) as a dependency. Next, I developed a small exploit application using C#:

C# exploit code

Executing this exploit immediately disconnects the VPN tunnel without the victim’s knowledge. Furthermore, by altering the configuration in the code (such as setting a malicious DNS server), additional attacks become possible.

Potential impacts

This vulnerability exposes multiple risks. An attacker with local access, either directly or via malware, can disable or alter the VPN tunnel silently. Such unauthorized manipulation of VPN settings can lead to serious security incidents, including data interception, redirection of traffic to attacker-controlled servers, or denial of service for critical network resources.

In multi-user systems, one user’s legitimate VPN session could be silently modified by another user. The affected user receives no warning resulting in a false sense of security!

Recommendations and mitigation

To mitigate this vulnerability, I strongly recommend restricting socket access to the initiating user alone. The socket permissions should be tightly controlled to ensure no unauthorized users or applications can write commands to the VPN service.

Additionally, it is critical to implement system-level notifications for any change in the state of the VPN tunnel. Users must be informed whenever the tunnel status changes, particularly if the changes occur without explicit user intervention. Providing clear notifications will significantly reduce the risk of unnoticed manipulation of VPN configurations.

Other Insights

Illustration of TunnelVision – Selective Denial-of-Service Vulnerability

TunnelVision – Selective Denial-of-Service Vulnerability

Mateusz Lewczak

During a recent security audit, I identified that the tested VPN was vulnerable to a known implementation flaw referred to as TunnelVision (CVE-2024-3661). This vulnerability affects how routing tables are managed by certain VPN services, particularly in the way they interact with DHCP protocols. The discovered flaw allows an attacker to reroute selected traffic outside of the intended VPN tunnel. This bypass can potentially expose user data or, specifically under Windows, cause a selective denial-of-service (DoS) scenario. This article describes in detail how the vulnerability can be triggered, demonstrates a practical proof-of-concept, and provides mitigation recommendations.

READ article
Illustration of Privilege Escalation through Docker group membership and… sudo backdoor?

Privilege Escalation through Docker group membership and… sudo backdoor?

Dominik Antończak

During a security audit, a high-risk vulnerability was discovered in an environment where a user named "securitum_insider_user" held membership in the docker group. This membership, combined with specific misconfigurations in the operating system, allowed for privilege escalation to root-level access. Once root privileges were obtained, I deployed a custom script that captured sudo passwords from unsuspecting users on the same host. Although no sensitive information was ultimately retrieved beyond those credentials, this demonstrates how even seemingly small permission oversights can compromise an entire system.

READ article
Illustration of Two-Step Exploit: From Initial Request to Complete Admin Takeover

Two-Step Exploit: From Initial Request to Complete Admin Takeover

Mateusz Lewczak

During a penetration test of a desktop application's backend interface, a critical flaw was identified that allows unauthenticated users to execute SQL queries by sending specially crafted requests. Although the backend was intended to restrict unauthenticated queries to simple SELECT statements on a specific configuration table, the actual implementation failed to properly validate the structure and scope of those queries. As a result, it is possible to use SQL injection techniques, specifically the UNION operator to extract sensitive data from unrelated tables in the database.

READ article
A professional cybersecurity consultant ready to assist with your inquiry.

Any questions?

Happy to get a call or email
and help!