{"id":25073,"date":"2024-08-14T16:01:38","date_gmt":"2024-08-15T00:01:38","guid":{"rendered":"http:\/\/www.palada.net\/index.php\/2024\/08\/14\/news-18803\/"},"modified":"2024-08-14T16:01:38","modified_gmt":"2024-08-15T00:01:38","slug":"news-18803","status":"publish","type":"post","link":"http:\/\/www.palada.net\/index.php\/2024\/08\/14\/news-18803\/","title":{"rendered":"Chained for attack: OpenVPN vulnerabilities discovered leading to RCE and LPE"},"content":{"rendered":"<p><strong>Credit to Author: Microsoft Threat Intelligence| Date: Thu, 08 Aug 2024 18:00:00 +0000<\/strong><\/p>\n<p>Microsoft researchers recently identified multiple medium severity vulnerabilities in OpenVPN, an open-source project with binaries integrated into routers, firmware, PCs, mobile devices, and many other smart devices worldwide, numbering in the millions. Attackers could chain and remotely exploit some of the discovered vulnerabilities to achieve an attack chain consisting of remote code execution (RCE) and local privilege escalation (LPE). This attack chain could enable attackers to gain full control over targeted endpoints, potentially resulting in data breaches, system compromise, and unauthorized access to sensitive information. Exploiting these vulnerabilities, however, necessitates user authentication and a deep understanding of OpenVPN&#8217;s inner workings, alongside intermediate knowledge of the operating systems. Today, we presented this research and demonstrated the discovered attack chain in our session at <a href=\"https:\/\/blackhat.com\/us-24\/briefings\/schedule\/#ovpnx--zero-days-leading-to-rce-lpe-and-kce-via-byovd-affecting-millions-of-openvpn-endpoints-across-the-globe-38900\" target=\"_blank\" rel=\"noreferrer noopener\">Black Hat USA 2024<\/a>.<\/p>\n<p>OpenVPN is widely used by <a href=\"https:\/\/enlyft.com\/tech\/products\/openvpn\" target=\"_blank\" rel=\"noreferrer noopener\">thousands<\/a> of companies spanning various industries across major platforms such as Windows, iOS, macOS, Android, and BSD. As such, exploitation of the discovered vulnerabilities, which affect all versions of OpenVPN prior to version <a href=\"https:\/\/github.com\/OpenVPN\/openvpn\/blob\/v2.6.10\/Changes.rst\" target=\"_blank\" rel=\"noreferrer noopener\">2.6.10<\/a> (and <a href=\"https:\/\/github.com\/OpenVPN\/openvpn\/blob\/v2.5.10\/Changes.rst\" target=\"_blank\" rel=\"noreferrer noopener\">2.5.10<\/a>), could put endpoints and enterprises at significant risk of attack.<\/p>\n<p>We reported the discovery to OpenVPN through\u00a0<a href=\"https:\/\/www.microsoft.com\/msrc\/cvd?rtc=1\">Coordinated Vulnerability Disclosure<\/a>\u00a0(CVD) via\u00a0<a href=\"https:\/\/www.microsoft.com\/msrc\/msvr\">Microsoft Security Vulnerability Research<\/a>\u00a0(MSVR) in March 2024 and worked closely with OpenVPN to ensure that the vulnerabilities are patched. Information on the security fixes released by OpenVPN to address these vulnerabilities can be found here: <a href=\"https:\/\/forums-new.openvpn.net\/forum\/announcements\/69-release-openvpn-version-2-6-10.\" target=\"_blank\" rel=\"noreferrer noopener\">OpenVPN 2.6.10<\/a>. We strongly urge OpenVPN users to apply the <a href=\"https:\/\/openvpn.net\/community-downloads\/\" target=\"_blank\" rel=\"noreferrer noopener\">latest security updates<\/a> as soon as possible. We also thank OpenVPN for their collaboration and recognizing the urgency in addressing these vulnerabilities. <\/p>\n<p>Below is a list of the discovered vulnerabilities discussed in this blog:<\/p>\n<figure class=\"wp-block-table table\">\n<table class=\"has-fixed-layout\">\n<tbody>\n<tr>\n<td><strong>CVE ID<\/strong><\/td>\n<td><strong>OpenVPN component<\/strong><\/td>\n<td><strong>Impact<\/strong><\/td>\n<td><strong>Affected platform<\/strong><\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2024-27459\" target=\"_blank\" rel=\"noreferrer noopener\">CVE-2024-27459<\/a><\/td>\n<td>openvpnserv&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<td>Denial of service (DoS), local privilege escalation (LPE)<\/td>\n<td>Windows<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2024-24974\" target=\"_blank\" rel=\"noreferrer noopener\">CVE-2024-24974<\/a><\/td>\n<td>openvpnserv&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<td>Unauthorized access&nbsp;<\/td>\n<td>Windows<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\"><a href=\"https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2024-27903\" target=\"_blank\" rel=\"noreferrer noopener\">CVE-2024-27903<\/a><\/td>\n<td rowspan=\"2\">openvpnserv<\/td>\n<td>Remote code execution (RCE)<\/td>\n<td>Windows<\/td>\n<\/tr>\n<tr>\n<td>Local privilege escalation (LPE), data manipulation<\/td>\n<td>Android, iOS, macOS, BSD<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2024-1305\" target=\"_blank\" rel=\"noreferrer noopener\">CVE-2024-1305<\/a><\/td>\n<td>Windows TAP driver&nbsp;<\/td>\n<td>Denial of service (DoS)&nbsp;<\/td>\n<td>Windows<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>In this blog post, we detail our analysis of the discovered vulnerabilities and the impact of exploitation. In addition to patching, we provide guidance to mitigate and detect threats attempting to exploit these vulnerabilities. This research emphasizes the need for responsible disclosure and collaboration among the security community to defend devices across platforms and build better protection for all, spanning the entire user-device ecosystem. The discovery of these vulnerabilities further highlights the critical importance of ensuring the security of enterprise and endpoint systems and underscores the need for continuous monitoring and protection of these environments.<\/p>\n<h2 class=\"wp-block-heading\" id=\"what-is-openvpn\">What is OpenVPN?<\/h2>\n<p>OpenVPN is a virtual private network (VPN) system that creates a private and secure point-to-point or site-to-site connection between networks. The OpenVPN open-source project is widely popular across the world, including the United States, India, France, Brazil, the United Kingdom, and Germany, as well as industries spanning the information technology, financial services, telecommunications, and computer software sectors. This project supports different major platforms and is integrated into millions of devices globally.<\/p>\n<p>OpenVPN is also the name of the tunneling protocol it uses, which employs the Secure Socket Layer (SSL) encryption protocol to ensure that data shared over the internet remains private, using AES-256 encryption. Since the source code is available for audit, vulnerabilities can be easily identified and fixed.<\/p>\n<h2 class=\"wp-block-heading\" id=\"openvpn-analysis\">OpenVPN analysis<\/h2>\n<p>We discovered the vulnerabilities while examining the OpenVPN open-source project to enhance enterprise security standards. During this research, we checked two other popular VPN solutions and found that at the time they were impacted by a vulnerability (CVE-2024-1305). Following this discovery, we started hunting for and uncovered additional vulnerable drivers with the same issue and decided to investigate open-source VPN projects. Upon confirming that the same vulnerability was located in the OpenVPN open-source repository, our research then focused on examining the architecture and security model of the OpenVPN project for Windows systems.<\/p>\n<h3 class=\"wp-block-heading\" id=\"openvpn-architecture\">OpenVPN architecture<\/h3>\n<h4 class=\"wp-block-heading\" id=\"openvpn-server-client-architecture\">OpenVPN server client architecture<\/h4>\n<p>OpenVPN is a sophisticated VPN system meticulously engineered to establish secure point-to-point or site-to-site connections. It supports both routed and bridged configurations, as well as remote access capabilities, making it a versatile choice for various networking needs. OpenVPN comprises both client and server applications, ensuring a comprehensive solution for secure communication.<\/p>\n<p>With OpenVPN, peers can authenticate each other through multiple methods, including pre-shared secret keys, certificates, or username\/password combinations. In multi-client server environments, the server can generate and issue an individual authentication certificate for each client, leveraging robust digital signatures and a trusted certificate authority. This ensures an elevated level of security and integrity in the authentication process, enhancing the overall reliability of the VPN connection.&nbsp;<\/p>\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"870\" height=\"528\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-2.-OpenVPN-client-server-model-3.jpg\" alt=\"Diagram of OpenVPN's client server depicting the connection between the Gateway Client and the Access Server\" class=\"wp-image-135430\" srcset=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-2.-OpenVPN-client-server-model-3.jpg 870w, https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-2.-OpenVPN-client-server-model-3-300x182.jpg 300w, https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-2.-OpenVPN-client-server-model-3-768x466.jpg 768w\" sizes=\"(max-width: 870px) 100vw, 870px\" \/><figcaption class=\"wp-element-caption\"><em>Figure 1. OpenVPN client server <a href=\"https:\/\/openvpn.net\/as-docs\/site-to-site-routing.html#site-to-site-routing\" target=\"_blank\" rel=\"noreferrer noopener\">model<\/a><\/em><\/figcaption><\/figure>\n<h3 class=\"wp-block-heading\" id=\"client-side-architecture\">Client-side architecture<\/h3>\n<p>The client-side architecture is where we discovered the additional three vulnerabilities (CVE-2024-27459, CVE-2024-24974, and CVE-2024-27903):<\/p>\n<p>OpenVPN\u2019s client architecture can be summarized in the following simplified diagram:<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-3.-OpenVPN-client-architecture-with-loaded-plugin.dll_-1024x364.webp\" alt=\"Diagram depicting the loaded plugin with the openvpn.exe usermode process connected by a named pope to the openvpnserv.exe system service within the client. The client is connected to the server via a tunnel.\" class=\"wp-image-135408 webp-format\" srcset=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-3.-OpenVPN-client-architecture-with-loaded-plugin.dll_-1024x364.webp 1024w, https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-3.-OpenVPN-client-architecture-with-loaded-plugin.dll_-300x107.webp 300w, https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-3.-OpenVPN-client-architecture-with-loaded-plugin.dll_-768x273.webp 768w, https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-3.-OpenVPN-client-architecture-with-loaded-plugin.dll_-1536x546.webp 1536w, https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-3.-OpenVPN-client-architecture-with-loaded-plugin.dll_-2048x728.webp 2048w\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-3.-OpenVPN-client-architecture-with-loaded-plugin.dll_-1024x364.webp\"><figcaption class=\"wp-element-caption\"><em>Figure 2. OpenVPN client architecture with loaded plugin.dll<\/em><\/figcaption><\/figure>\n<h4 class=\"wp-block-heading\" id=\"openvpnserv-exe-and-openvpn-exe\"><em>openvpnserv.exe<\/em> and <em>openvpn.exe<\/em><\/h4>\n<p>The system service launches elevated commands on behalf of the user, handling tasks such as adding or deleting DNS configurations, IP addresses, and routes, and enabling Dynamic Host Configuration Protocol (DHCP). These commands are received from the <em>openvpn.exe<\/em> process through a named pipe created for these two entities, such as \u201copenvpn\/service_XXX\u201d where XXX is the thread ID (TID) that is being passed to the newly created process as a command line argument.<\/p>\n<p>The launched commands arrive in the form of a binary structure that contains the relevant information for the specific command, with the structure being validated and only then launching the appropriate command. The below figure displays an example of the structure that contains information for adding\/deleting DNS configuration:<\/p>\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-4.-OpenVPN-DNS-configuration-managing-structure-1.webp\" alt=\"Screenshot of code depicting the DNS configuration managing structure\" class=\"wp-image-135431 webp-format\" style=\"width:596px;height:auto\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-4.-OpenVPN-DNS-configuration-managing-structure-1.webp\"><figcaption class=\"wp-element-caption\"><em>Figure 3. OpenVPN DNS configuration managing structure<\/em><\/figcaption><\/figure>\n<p>Additionally, <em>openvpnserv.exe<\/em> serves as the management unit, spawning <em>openvpn.exe<\/em> processes upon requests from different users on the machine. This can be done automatically using the OpenVPN GUI or by sending specifically crafted requests. Communication for this process occurs through a second named pipe, such as \u201copenvpn\/service\u201d.<\/p>\n<p><em>Openvpn<\/em><em>.exe<\/em> is the user mode process being spawned on behalf of the client. When <em>openvpn.exe<\/em> starts, it receives a path for a configuration file (as a command line argument). The configuration file that\u2019s provided holds different information.<\/p>\n<p>A lot of fields can be managed in <a href=\"https:\/\/openvpn.net\/community-resources\/reference-manual-for-openvpn-2-4\/\" target=\"_blank\" rel=\"noreferrer noopener\">configuration files<\/a>, such as:<\/p>\n<ol class=\"wp-block-list\" start=\"1\">\n<li>Tunnel options<\/li>\n<li>Server mode options<\/li>\n<li>Client mode options<\/li>\n<\/ol>\n<h4 class=\"wp-block-heading\" id=\"plugin-mechanism-in-openvpn-exe\">Plugin mechanism in <em>openvpn.exe<\/em><\/h4>\n<p>Another mechanism of interest for us is the plugin mechanism in <em>openvpn.exe<\/em>, which can extend the functionality to add additional logic, such as authentication plugins to bring authentication against Lightweight Directory Access Protocol (LDAP) or Radius or other Pluggable Authentication Module<br \/>(PAM) backends. Some of the existing plugins are:<\/p>\n<ol class=\"wp-block-list\" start=\"1\">\n<li>Radiusplugin \u2013 Radius authentication support for open OpenVPN.<\/li>\n<li>Eurephia \u2013 Authentication and access control plugin for OpenVPN.<\/li>\n<li>Openvpn_defer_auth \u2013 OpenVPN plugin to perform deferred authentication requests.<\/li>\n<\/ol>\n<p>The plugin mechanism fits into the earlier diagram, as shown in Figure 2.<\/p>\n<p>The plugin is loaded as a directive in the configuration file, which looks like:<\/p>\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-5.-OpenVPN-client-directive-to-load-plugin-1.webp\" alt=\"Screenshot of code depicting the client directive to load the plugin\" class=\"wp-image-135432 webp-format\" style=\"width:470px;height:auto\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-5.-OpenVPN-client-directive-to-load-plugin-1.webp\"><figcaption class=\"wp-element-caption\"><em>Figure 4. OpenVPN client directive to load plugin<\/em><\/figcaption><\/figure>\n<p>Furthermore, the number of <a href=\"https:\/\/github.com\/OpenVPN\/openvpn\/blob\/master\/include\/openvpn-plugin.h.in\" target=\"_blank\" rel=\"noreferrer noopener\">callbacks<\/a> defined in the plugin launch on behalf of the loading process (<em>openvpn.exe<\/em>), such as:<\/p>\n<ol class=\"wp-block-list\" start=\"1\">\n<li><em>openvpn_plugin_func_v1<\/em> &#8211; This function is called by OpenVPN each time the OpenVPN reaches a point where plugin calls should happen.<\/li>\n<li><em>openvpn_plugin_{open, func}_v3()<\/em> \u2013 Defines the version of the v3 plugin argument.<\/li>\n<\/ol>\n<h3 class=\"wp-block-heading\" id=\"openvpn-security-model\">OpenVPN security model<\/h3>\n<p>As previously mentioned, we discovered four vulnerabilities on the client side of OpenVPN\u2019s architecture.<\/p>\n<p>As described before, <em>openvpnserv.exe<\/em> (SYSTEM service) spawns the <em>openvpn.exe<\/em> process as a result of the request from the user. Furthermore, the spawned process runs in the context of the user who requested to create the new process, which is achieved through named pipe <a href=\"https:\/\/learn.microsoft.com\/windows\/win32\/secauthz\/client-impersonation\">impersonation<\/a>, as displayed in the below image:<\/p>\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-6.-Named-pipe-impersonation-1.webp\" alt=\"Screenshot of code depicting named pipe impersonation\" class=\"wp-image-135433 webp-format\" style=\"width:538px;height:auto\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-6.-Named-pipe-impersonation-1.webp\"><figcaption class=\"wp-element-caption\"><em>Figure 5. Named pipe impersonation<\/em><\/figcaption><\/figure>\n<p>The <em>ImpersonateNamedPipeClient<\/em>&nbsp;function <a href=\"https:\/\/learn.microsoft.com\/windows\/win32\/cossdk\/client-impersonation-and-delegation\">impersonates<\/a> a named pipe client application.<\/p>\n<p>Furthermore, to prevent unwanted behavior, specific EXPLICIT_ACCESS must be granted for any new process:<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-7.-Explicit-access-for-OVPN-DACL-1.webp\" alt=\"Screenshot of code depicting explicit access being granded for OVPN DACL\" class=\"wp-image-135434 webp-format\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-7.-Explicit-access-for-OVPN-DACL-1.webp\"><figcaption class=\"wp-element-caption\"><em>Figure 6. Explicit access for OVPN DACL<\/em><\/figcaption><\/figure>\n<p>This explicit access, in addition to the earlier described \u201celevated commands\u201d launched by <em>openvpnserv.exe<\/em> on request from the <em>openvpn.exe<\/em> process, and other comprehensive inspection of the passed arguments &nbsp;ensure that malicious behavior cannot be launched in the name of the impersonated user.<\/p>\n<h2 class=\"wp-block-heading\" id=\"vulnerability-analysis\">Vulnerability analysis<\/h2>\n<h3 class=\"wp-block-heading\" id=\"cve-2024-1305\">CVE-2024-1305&nbsp;&nbsp;&nbsp;&nbsp;<\/h3>\n<p>We identified a vulnerability in the &#8220;tap-windows6&#8221; project that involves developing the Terminal Access Point (TAP) adapter used by OpenVPN. In the project&#8217;s <em>src<\/em> folder, the <em>device.c<\/em> file contains the code for the TAP device object and its initialization.<\/p>\n<p>In the <em>device.c<\/em> file, the <em>CreateTapDevice<\/em> method initializes a dispatch table object with callbacks for methods managing various Input\/Output Controls (IOCTLs) for the device. One of these methods is <em>TapDeviceWrite<\/em>, which handles the write IOCTL.<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-8.-Wild-kernel-overflow-vulnerability-location-1.webp\" alt=\"Screenshot of code depicting where the wild kernel overflow vulnerability is located\" class=\"wp-image-135435 webp-format\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-8.-Wild-kernel-overflow-vulnerability-location-1.webp\"><figcaption class=\"wp-element-caption\"><em>Figure 7. Wild kernel overflow vulnerability location<\/em><\/figcaption><\/figure>\n<p>The <em>TapDeviceWrite<\/em> method performs several operations and eventually calls <em>TapSharedSendPacket<\/em>. This method, in turn, calls <em>NdisAllocateNetBufferAndNetBufferLists<\/em> twice. In one scenario, it calls this function with the <em>fullLength<\/em> parameter, defined as follows:<\/p>\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-9.-Integer-overflow-1.webp\" alt=\"Screenshot of code depicting the integer overflow\" class=\"wp-image-135436 webp-format\" style=\"width:448px;height:auto\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-9.-Integer-overflow-1.webp\"><figcaption class=\"wp-element-caption\"><em>Figure 8. Integer overflow<\/em><\/figcaption><\/figure>\n<p>Both <em>PacketLength<\/em> and <em>PrefixLength<\/em> are parameters passed from the <em>TapDeviceWrite<\/em> call and, therefore, attacker controlled. If these values are large enough, their sum (<em>fullLength<\/em>) can overflow (a 32-bit unsigned integer). This overflow results in the allocation of a smaller-than-expected memory size, which subsequently causes a memory overflow issue.<\/p>\n<h3 class=\"wp-block-heading\" id=\"cve-2024-27459\">CVE-2024-27459&nbsp;&nbsp;<\/h3>\n<p>The second vulnerability that we discovered resided in the communication mechanism between the <em>openvpn.exe<\/em> process and the <em>openvpnserv.exe<\/em> service. As described earlier, both of which communicate through a named pipe:<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-10.-Reading-size-from-a-named-pipe-1.webp\" alt=\"Screenshot of code depicting the size being read from a named pipe\" class=\"wp-image-135437 webp-format\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-10.-Reading-size-from-a-named-pipe-1.webp\"><figcaption class=\"wp-element-caption\"><em>Figure 9. Reading size from a named pipe<\/em><\/figcaption><\/figure>\n<p>The <em>openvpnserv.exe<\/em> service will read the message size in an infinite loop from the <em>openvpn.exe<\/em> process and then handle the message received by calling the <em>HandleMessage<\/em> method. The <em>HandleMessage<\/em> method reads the size provided by the infinite loop and casts the read bytes into the relevant type accordingly:<\/p>\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-11.-Stack-overflow-vulnerability-location-1.webp\" alt=\"Screenshot of code depicting the stack overflow vulnerability location\" class=\"wp-image-135438 webp-format\" style=\"width:543px;height:auto\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-11.-Stack-overflow-vulnerability-location-1.webp\"><figcaption class=\"wp-element-caption\"><em>Figure 10. Stack overflow vulnerability location<\/em><\/figcaption><\/figure>\n<p>This communication mechanism presents an issue as reading the \u201cuser\u201d provided number of bytes on to an \u201cn bytes\u201d long structure located on the stack will produce a stack overflow vulnerability.<\/p>\n<h3 class=\"wp-block-heading\" id=\"cve-2024-24974\">CVE-2024-24974&nbsp;&nbsp;<\/h3>\n<p>The third vulnerability involves unprivileged access to an operating system resource. The <em>openvpnserv.exe<\/em> service spawns a new <em>openvpn.exe<\/em> process based on user requests received through the \u201c\\openvpn\\service\u201d named pipe. This vulnerability allows remote access to the named service pipe, enabling an attacker to remotely interact with and launch operations on it.<\/p>\n<h3 class=\"wp-block-heading\" id=\"cve-2024-27903\">CVE-2024-27903&nbsp;&nbsp;<\/h3>\n<p>Lastly, we identified a vulnerability in OpenVPN&#8217;s plugin mechanism that permits plugins to be loaded from various paths on an endpoint device. This behavior can be exploited by attackers to load harmful plugins from these different paths.<\/p>\n<h2 class=\"wp-block-heading\" id=\"exploiting-and-chaining-the-vulnerabilities\">Exploiting and chaining the vulnerabilities<\/h2>\n<p>All the identified vulnerabilities can be exploited once an attacker gains access to a user&#8217;s OpenVPN credentials, which could be accomplished using credential theft techniques, such as purchasing stolen credentials on the dark web, using info-stealing malware, or sniffing network traffic to capture NTLMv2 hashes and then using cracking tools like HashCat or John the Ripper to decode them. The discovered vulnerabilities could then be combined to achieve different exploitation results, or chained together to form a sophisticated attack chain, as detailed in the below sections.<\/p>\n<h3 class=\"wp-block-heading\" id=\"rce-exploitation\">RCE exploitation<\/h3>\n<p>We first explored how an attacker could achieve remote code execution (RCE) exploitation using CVE-2024-24974 and CVE-2024-27903.<\/p>\n<p>To successfully exploit these vulnerabilities and achieve RCE, an attacker must first obtain an OpenVPN user\u2019s credentials. The attacker\u2019s device must then launch the <a href=\"https:\/\/www.lifewire.com\/net-use-command-2618096\" target=\"_blank\" rel=\"noreferrer noopener\"><em>NET USE<\/em><\/a> command with the stolen credentials to remotely access the operating system resources and grant the attacker access to the named pipes objects devices.<\/p>\n<p>Next, the attacker can send a \u201cconnect\u201d request to the \u201c\\openvpn\\service\u201d named pipe to launch a new instance of <em>openvpn.exe<\/em> on its behalf.<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-12.-Initializing-OpenVPN-from-remote-location-in-which-TARGET_MACHINE_PLACEHOLDER-can-be-substituted-by-a-different-end-point-1.webp\" alt=\"Screenshot of code depicting the initialization of OpenVPN from a remote location\" class=\"wp-image-135439 webp-format\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-12.-Initializing-OpenVPN-from-remote-location-in-which-TARGET_MACHINE_PLACEHOLDER-can-be-substituted-by-a-different-end-point-1.webp\"><figcaption class=\"wp-element-caption\"><em>Figure 11. Initializing OpenVPN from a remote location (in which {TARGET_MACHINE_PLACEHOLDER} can be substituted by a different end point)<\/em><\/figcaption><\/figure>\n<p>In the request, a path to a configuration file (<em>\\\\DESKTOP-4P6938I\\share\\OpenVPN\\config\\sample.ovpn<\/em>) is specified that\u2019s located on the attacker-controlled device. A log path is also provided into which the loaded plugin will write its logs (<em>&#8220;&#8211;log \\\\{TARGET_MACHINE_PLACEHOLDER}<\/em><em>\\share\\OpenVPN\\log\\plugin_log.txt<\/em>).<\/p>\n<p>The provided configuration has instructions to load malicious plugin, as such:<\/p>\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-13.-Malicious-plugin-loading-directive-from-remote-location-1.webp\" alt=\"Screenshot of code depicting the malicious plugin loading directive from a remote location\" class=\"wp-image-135440 webp-format\" style=\"width:492px;height:auto\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-13.-Malicious-plugin-loading-directive-from-remote-location-1.webp\"><figcaption class=\"wp-element-caption\"><em>Figure 12. Malicious plugin loading directive from a remote location<\/em><\/figcaption><\/figure>\n<p>After successful exploitation, the attacker can read the log provided on the attacker-controlled device.<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-14.-Plugin-log-on-the-attacker-controlled-device-1.webp\" alt=\"Screenshot of the plugin log on the attacker-controlled device\" class=\"wp-image-135441 webp-format\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-14.-Plugin-log-on-the-attacker-controlled-device-1.webp\"><figcaption class=\"wp-element-caption\"><em>Figure 13. Plugin log on the attacker-controlled device<\/em><\/figcaption><\/figure>\n<h3 class=\"wp-block-heading\" id=\"lpe-exploitation\">LPE exploitation<\/h3>\n<p>Next, we investigated how an attacker could achieve local privilege execution (LPE) using CVE-2024-27459 and CVE-2024-27903. To successfully achieve an LPE exploit in this context, an attacker must load a malicious plugin into the normal launching process of <em>openvpn.exe<\/em> by using a malicious configuration file.<\/p>\n<p>First, the attacker will connect to a local device \u201c\\openvpn\\service\u201d named pipe with a command that instructs <em>openvpnserv.exe<\/em> to launch <em>openvpn.exe<\/em> based on the attacker-provided malicious configuration.<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-15.-Initializing-OpenVPN-from-a-local-configuration-1.webp\" alt=\"Screenshot of code depicting initializing OpenVPN from a local configuration\" class=\"wp-image-135442 webp-format\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-15.-Initializing-OpenVPN-from-a-local-configuration-1.webp\"><figcaption class=\"wp-element-caption\"><em>Figure 14. Initializing OpenVPN from a local configuration<\/em><\/figcaption><\/figure>\n<p>The malicious configuration will include a line like the below example:<\/p>\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-16.-Malicious-plugin-loading-directive-from-the-local-location-1.webp\" alt=\"Screenshot of the malicious plugin loading directive from the local location\" class=\"wp-image-135443 webp-format\" style=\"width:417px;height:auto\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-16.-Malicious-plugin-loading-directive-from-the-local-location-1.webp\"><figcaption class=\"wp-element-caption\"><em>Figure 15. Malicious plugin loading directive from the local location<\/em><\/figcaption><\/figure>\n<p>For the malicious plugin to successfully communicate with <em>openvpnserv.exe,<\/em> it must hijack the number of the handle used by <em>openvpn.exe<\/em> to communicate with the inner named pipe connecting the <em>openvpv.exe<\/em> process and the <em>openvpnserv.exe <\/em>service. This can be achieved, for instance, by parsing command line arguments, as displayed below:<\/p>\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-17.-Parsing-command-line-arguments-to-extract-the-thread-ID-TID-1.webp\" alt=\"Screenshot of code depicting parsing command line arguments to extract the thread ID\" class=\"wp-image-135444 webp-format\" style=\"width:640px;height:auto\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-17.-Parsing-command-line-arguments-to-extract-the-thread-ID-TID-1.webp\"><figcaption class=\"wp-element-caption\"><em>Figure 16. Parsing command line arguments to extract the thread ID (TID)<\/em><\/figcaption><\/figure>\n<p>This works because when the <em>openvpn.exe<\/em> process spawns, it\u2019s being passed the TID (as a command line argument) that the inner named pipe (which is being used for communication between this specific OpenVPN instance and the <em>openvpnserv.exe<\/em> service) will have. For instance, if the inner named pipe created is \u201c\\openvpn\\service_1234\u201d then <em>openvpn.exe<\/em> will be launched with an extra argument of 1234.<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-18.-Passing-the-TID-as-a-command-line-argument-1.webp\" alt=\"Screenshot of code depicting the thread ID being passed as a command line argument\" class=\"wp-image-135445 webp-format\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-18.-Passing-the-TID-as-a-command-line-argument-1.webp\"><figcaption class=\"wp-element-caption\"><em>Figure 17. Passing the TID as a command line argument<\/em><\/figcaption><\/figure>\n<p>Next, attackers can exploit the stack overflow vulnerability by sending data bigger than the MSG structure. It is important to note that there are stack protection mechanisms in place, called <a href=\"https:\/\/wikipedia.org\/wiki\/Stack_buffer_overflow#Stack_canaries\" target=\"_blank\" rel=\"noreferrer noopener\">stack canaries<\/a>, which make exploitation much more challenging. Thus, when triggering the overflow:<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-19.-Stack-overflow-triggered-1.webp\" alt=\"Screenshot of code depicting the stack overflow being triggered\" class=\"wp-image-135446 webp-format\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-19.-Stack-overflow-triggered-1.webp\"><figcaption class=\"wp-element-caption\"><em>Figure 18. Stack overflow triggered<\/em><\/figcaption><\/figure>\n<p>After the crash of <em>openvpnserv.exe<\/em>, the attacker has a slot of time in which they can reclaim the named pipe \u201c\\openvpn\\service\u201d.<\/p>\n<p>If successful, the attacker then poses as the server client side of the named pipe \u201c\\openvpn\\service\u201d. From that moment on, every attempt to connect to the \u201c\\openvpn\\service\u201d named pipe will result in a connection to the attacker. If a privileged enough user, such as a SYSTEM or Administrator user, is connected to the named pipe, the attacker can impersonate that user:<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-20.-Impersonating-a-privileged-user-1.webp\" alt=\"Screenshot of code depicting impersonation of a privileged user\" class=\"wp-image-135447 webp-format\" srcset=\"\" data-orig-src=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/wp-content\/uploads\/2024\/08\/Figure-20.-Impersonating-a-privileged-user-1.webp\"><figcaption class=\"wp-element-caption\"><em>Figure 19. Impersonating a privileged user<\/em><\/figcaption><\/figure>\n<p>The attacker can then start an elevated process on the user\u2019s behalf, thus achieving LPE.<\/p>\n<h3 class=\"wp-block-heading\" id=\"chaining-it-all-together\">Chaining it all together<\/h3>\n<p>As our research demonstrated, an attacker could leverage at least three of the four discovered vulnerabilities to create exploits to achieve RCE and LPE, which could then be chained together to create a powerful attack chain.<\/p>\n<p>A number of adjustments are needed for the full attack chain to be exploited as presented in this blog post, mainly the malicious payload that crashes <em>openvpnserv.exe<\/em> and the malicious payload that actually behaves as <em>openvpnserv.exe<\/em> after <em>openvpnserv.exe<\/em> is crashed all have to be loaded with the malicious plugin. After successfully achieving LPE, attackers will use different techniques, such as <a href=\"https:\/\/techcommunity.microsoft.com\/t5\/microsoft-security-experts-blog\/strategies-to-monitor-and-prevent-vulnerable-driver-attacks\/ba-p\/4103985#:~:text=The%20technique%20known%20as%20Bring%20Your%20Own%20Vulnerable,kernel%20and%20exploiting%20it%20to%20gain%20kernel-level%20access.\">Bring Your Own Vulnerable Driver (BYOVD)<\/a> or exploiting known vulnerabilities, to achieve a stronger grasp of the endpoint. Through these techniques, the attacker can, for instance, disable Protect Process Light (PPL) for a critical process such as Microsoft Defender or bypass and meddle with other critical processes in the system. These actions enable attackers to bypass security products and manipulate the system&#8217;s core functions, further entrenching their control and avoiding detection.<\/p>\n<h2 class=\"wp-block-heading\" id=\"critical-importance-of-endpoint-security-in-private-and-enterprise-sectors\">Critical importance of endpoint security in private and enterprise sectors<\/h2>\n<p>With OpenVPN being widely used across various vendors, industries, and fields, the presented vulnerabilities may impact numerous sectors, device types, and verticals. Exploiting these vulnerabilities requires user authentication, a deep understanding of OpenVPN\u2019s inner workings, and intermediate knowledge of the operating system. However, a successful attack could significantly impact endpoints in both the private and enterprise sectors. Attackers could launch a comprehensive attack chain on a device using a vulnerable version of OpenVPN, achieving full control over the target endpoint. This control could enable them to steal sensitive data, tamper with it, or even wipe and destroy critical information, causing substantial harm to both private and enterprise environments.<\/p>\n<p>The discovery of these vulnerabilities underscores the importance of responsible disclosure to secure enterprise and endpoint systems, in addition to the collective efforts of the security community to protect devices across various platforms and establish stronger safeguards for everyone. We would like to again thank OpenVPN for their partnership and swift action in addressing these vulnerabilities.<\/p>\n<h2 class=\"wp-block-heading\" id=\"mitigation-and-protection-guidance\">Mitigation and protection guidance<\/h2>\n<p>OpenVPN versions prior to 2.5.10 and 2.6.10 are vulnerable to discussed vulnerabilities.<\/p>\n<p>It is recommended to first identify if a vulnerable version is installed and, if so, immediately apply the relevant patch found here: <a href=\"https:\/\/community.openvpn.net\/openvpn\/wiki\/Downloads\" target=\"_blank\" rel=\"noreferrer noopener\">OpenVPN 2.6.10<\/a>.<\/p>\n<p>Additionally, follow the below recommendations to further mitigate potential exploitation risks affiliated with the discovered vulnerabilities:<\/p>\n<ul class=\"wp-block-list\">\n<li>Apply patches to affected devices in your network. Check the <a href=\"https:\/\/openvpn.net\/community-downloads\/\" target=\"_blank\" rel=\"noreferrer noopener\">OpenVPN website<\/a> for the latest patches.<\/li>\n<li>Make sure OpenVPN clients are disconnected from the internet and segmented.<\/li>\n<li>Limit access to OpenVPN clients to authorized users only.&nbsp;<\/li>\n<li>Due to the nature of the CVEs, which still require a username and password, prioritizing patching is difficult. Reduce risk by ensuring proper segmentation, requiring <a href=\"https:\/\/www.cisa.gov\/secure-our-world\/use-strong-passwords\" target=\"_blank\" rel=\"noreferrer noopener\">strong usernames and passwords<\/a>, and reducing the number of users that have writing authentication.<\/li>\n<\/ul>\n<h3 class=\"wp-block-heading\" id=\"microsoft-defender-xdr-detections\">Microsoft Defender XDR detections<\/h3>\n<p><strong>Microsoft Defender for Endpoint<\/strong><\/p>\n<p>The following Microsoft Defender for Endpoint alert can indicate associated threat activity:<\/p>\n<ul class=\"wp-block-list\">\n<li>Suspicious OpenVPN named pipe activity<\/li>\n<\/ul>\n<p><strong>Microsoft Defender Vulnerability Management<\/strong><\/p>\n<p>Microsoft Defender Vulnerability Management surfaces devices that may be affected by the following vulnerabilities used in this threat:<\/p>\n<ul class=\"wp-block-list\">\n<li>CVE-2024-27459<\/li>\n<li>CVE-2024-24974<\/li>\n<li>CVE-2024-27903<\/li>\n<li>CVE-2024-1305<\/li>\n<\/ul>\n<p><strong>Microsoft Defender for IoT<\/strong><\/p>\n<p>Microsoft Defender for IoT raises alerts for the following vulnerabilities, exploits, and behavior associated with this threat:<\/p>\n<ul class=\"wp-block-list\">\n<li>Suspicion of Malicious Activity<\/li>\n<\/ul>\n<h3 class=\"wp-block-heading\" id=\"hunting-queries\">Hunting queries<\/h3>\n<p><strong>Microsoft Defender XDR<\/strong><\/p>\n<p>Microsoft Defender XDR customers can run the following query to find related activity in their networks:<\/p>\n<p>This query identifies connection to OpenVPN\u2019s named pipe from remote host:<\/p>\n<div class=\"wp-block-syntaxhighlighter-code \">\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\"> DeviceEvents   | where ActionType == &quot;NamedPipeEvent&quot; | extend JsonAdditionalFields=parse_json(AdditionalFields) | extend PipeName=JsonAdditionalFields&#x5B;&quot;PipeName&quot;] | where PipeName == &quot;\\Device\\NamedPipe\\openvpn\\service&quot; and isnotempty( RemoteIP)  <\/pre>\n<\/div>\n<p>This query identifies image load into OpenVPN\u2019s process from share folder:<\/p>\n<div class=\"wp-block-syntaxhighlighter-code \">\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\"> DeviceImageLoadEvents  |where InitiatingProcessFileName == &quot;openvpn.exe&quot; and FolderPath startswith &quot;\\\\&quot; <\/pre>\n<\/div>\n<p>This query identifies process connect to OpenVPN\u2019s named pipe as server which it is not <em>openvpnserv.exe<\/em>:<\/p>\n<div class=\"wp-block-syntaxhighlighter-code \">\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\"> DeviceEvents   | where ActionType == &quot;NamedPipeEvent&quot; | extend JsonAdditionalFields=parse_json(AdditionalFields) | extend PipeName=JsonAdditionalFields&#x5B;&quot;PipeName&quot;], NamedPipeEnd=JsonAdditionalFields&#x5B;&quot;NamedPipeEnd&quot;] |where PipeName == &quot;\\Device\\NamedPipe\\openvpn\\service&quot; and NamedPipeEnd == &quot;Server&quot; and InitiatingProcessFileName != &quot;openvpnserv.exe&quot; <\/pre>\n<\/div>\n<p><strong>Microsoft Sentinel<\/strong><\/p>\n<p>Microsoft Sentinel customers can use the TI Mapping analytics (a series of analytics all prefixed with \u2018TI map\u2019) to automatically match the malicious domain indicators mentioned in this blog post with data in their workspace. If the TI Map analytics are not currently deployed, customers can install the Threat Intelligence solution from the Microsoft Sentinel Content Hub to have the analytics rule deployed in their Sentinel workspace. More details on the Content Hub can be found here:&nbsp; <a href=\"https:\/\/learn.microsoft.com\/azure\/sentinel\/sentinel-solutions-deploy\">https:\/\/learn.microsoft.com\/azure\/sentinel\/sentinel-solutions-deploy<\/a>.<\/p>\n<p><strong>List of devices with OpenVPN vulnerabilities<\/strong><\/p>\n<div class=\"wp-block-syntaxhighlighter-code \">\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\"> DeviceTvmSoftwareVulnerabilities | where OSPlatform contains &quot;Windows&quot; | where CveId in (&quot;CVE-2024-27459&quot;,&quot;CVE-2024-24974&quot;,&quot;CVE-2024-27903&quot;,&quot;CVE-2024-1305&quot;)  | project DeviceId,DeviceName,OSPlatform,OSVersion,SoftwareVendor,SoftwareName,SoftwareVersion, CveId,VulnerabilitySeverityLevel | join kind=inner ( DeviceTvmSoftwareVulnerabilitiesKB | project CveId, CvssScore,IsExploitAvailable,VulnerabilitySeverityLevel,PublishedDate,VulnerabilityDescription,AffectedSoftware ) on CveId | project DeviceId,DeviceName,OSPlatform,OSVersion,SoftwareVendor,SoftwareName,SoftwareVersion, CveId,VulnerabilitySeverityLevel,CvssScore,IsExploitAvailable,PublishedDate,VulnerabilityDescription,AffectedSoftware <\/pre>\n<\/div>\n<p><strong>Named pipe creation activity of OpenVPN<\/strong><\/p>\n<div class=\"wp-block-syntaxhighlighter-code \">\n<pre class=\"brush: plain; gutter: false; title: ; notranslate\"> let PipeNames = pack_array(&#039;\\openvpn\/service&#039;,&#039;\\openvpn\/service_&#039;,&#039;openvpn&#039;,&#039;openvpn\/service&#039;,&#039;\\openvpn\\service_&#039;); DeviceEvents | where TimeGenerated &gt; ago(30d) | where ActionType == &quot;NamedPipeEvent&quot; | where ProcessCommandLine contains &quot;openvpn.exe&quot; or InitiatingProcessCommandLine contains &quot;openvpn.exe&quot; | extend Fields=parse_json(AdditionalFields) | where Fields.FileOperation == &quot;File created&quot; | where Fields.PipeName has_any (PipeNames) | project TimeGenerated,ActionType,DeviceName,InitiatingProcessAccountDomain,InitiatingProcessAccountName,InitiatingProcessFolderPath, InitiatingProcessCommandLine,ProcessCommandLine,Fields.FileOperation,Fields.PipeName <\/pre>\n<\/div>\n<p><strong>Vladimir Tokarev<\/strong><\/p>\n<p><em>Microsoft Threat Intelligence Community<\/em><\/p>\n<h3 class=\"wp-block-heading\" id=\"references\">References<\/h3>\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/blackhat.com\/us-24\/briefings\/schedule\/#ovpnx--zero-days-leading-to-rce-lpe-and-kce-via-byovd-affecting-millions-of-openvpn-endpoints-across-the-globe-38900\">https:\/\/blackhat.com\/us-24\/briefings\/schedule\/#ovpnx&#8211;zero-days-leading-to-rce-lpe-and-kce-via-byovd-affecting-millions-of-openvpn-endpoints-across-the-globe-38900<\/a><\/li>\n<li><a href=\"https:\/\/enlyft.com\/tech\/products\/openvpn\">https:\/\/enlyft.com\/tech\/products\/openvpn<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/OpenVPN\/openvpn\/blob\/v2.6.10\/Changes.rst\">https:\/\/github.com\/OpenVPN\/openvpn\/blob\/v2.6.10\/Changes.rst<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/OpenVPN\/openvpn\/blob\/v2.5.10\/Changes.rst\">https:\/\/github.com\/OpenVPN\/openvpn\/blob\/v2.5.10\/Changes.rst<\/a><\/li>\n<li><a href=\"https:\/\/forums-new.openvpn.net\/forum\/announcements\/69-release-openvpn-version-2-6-10\">https:\/\/forums-new.openvpn.net\/forum\/announcements\/69-release-openvpn-version-2-6-10<\/a><\/li>\n<li><a href=\"https:\/\/openvpn.net\/community-downloads\/\">https:\/\/openvpn.net\/community-downloads\/<\/a><\/li>\n<li><a href=\"https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2024-27459\">https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2024-27459<\/a><\/li>\n<li><a href=\"https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2024-24974\">https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2024-24974<\/a><\/li>\n<li><a href=\"https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2024-27903\">https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2024-27903<\/a><\/li>\n<li><a href=\"https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2024-1305\">https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2024-1305<\/a><\/li>\n<li><a href=\"https:\/\/openvpn.net\/as-docs\/site-to-site-routing.html#site-to-site-routing\">https:\/\/openvpn.net\/as-docs\/site-to-site-routing.html#site-to-site-routing<\/a><\/li>\n<li><a href=\"https:\/\/openvpn.net\/community-resources\/reference-manual-for-openvpn-2-4\/\">https:\/\/openvpn.net\/community-resources\/reference-manual-for-openvpn-2-4\/<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/OpenVPN\/openvpn\/blob\/master\/include\/openvpn-plugin.h.in\">https:\/\/github.com\/OpenVPN\/openvpn\/blob\/master\/include\/openvpn-plugin.h.in<\/a><\/li>\n<li><a href=\"https:\/\/www.lifewire.com\/net-use-command-2618096\">https:\/\/www.lifewire.com\/net-use-command-2618096<\/a><\/li>\n<li><a href=\"https:\/\/wikipedia.org\/wiki\/Stack_buffer_overflow#Stack_canaries\">https:\/\/wikipedia.org\/wiki\/Stack_buffer_overflow#Stack_canaries<\/a><\/li>\n<li><a href=\"https:\/\/community.openvpn.net\/openvpn\/wiki\/Downloads\">https:\/\/community.openvpn.net\/openvpn\/wiki\/Downloads<\/a><\/li>\n<li><a href=\"https:\/\/www.cisa.gov\/secure-our-world\/use-strong-passwords\">https:\/\/www.cisa.gov\/secure-our-world\/use-strong-passwords<\/a><\/li>\n<\/ul>\n<h3 class=\"wp-block-heading\" id=\"learn-more\">Learn more<\/h3>\n<p>For the latest security research from the Microsoft Threat Intelligence community, check out the Microsoft Threat Intelligence Blog:&nbsp;<a href=\"https:\/\/aka.ms\/threatintelblog\">https:\/\/aka.ms\/threatintelblog<\/a>.<\/p>\n<p>To get notified about new publications and to join discussions on social media, follow us on LinkedIn at <a href=\"https:\/\/www.linkedin.com\/showcase\/microsoft-threat-intelligence\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.linkedin.com\/showcase\/microsoft-threat-intelligence<\/a>, and on X (formerly Twitter) at&nbsp;<a href=\"https:\/\/twitter.com\/MsftSecIntel\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/twitter.com\/MsftSecIntel<\/a>.<\/p>\n<p>To hear stories and insights from the Microsoft Threat Intelligence community about the ever-evolving threat landscape, listen to the Microsoft Threat Intelligence podcast: <a href=\"https:\/\/thecyberwire.com\/podcasts\/microsoft-threat-intelligence\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/thecyberwire.com\/podcasts\/microsoft-threat-intelligence<\/a>.<\/p>\n<p>The post <a href=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2024\/08\/08\/chained-for-attack-openvpn-vulnerabilities-discovered-leading-to-rce-and-lpe\/\">Chained for attack: OpenVPN vulnerabilities discovered leading to RCE and LPE<\/a> appeared first on <a href=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\">Microsoft Security Blog<\/a>.<\/p>\n<p><a href=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2024\/08\/08\/chained-for-attack-openvpn-vulnerabilities-discovered-leading-to-rce-and-lpe\/\" target=\"bwo\" >https:\/\/blogs.technet.microsoft.com\/mmpc\/feed\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><strong>Credit to Author: Microsoft Threat Intelligence| Date: Thu, 08 Aug 2024 18:00:00 +0000<\/strong><\/p>\n<p>Microsoft researchers found multiple vulnerabilities in OpenVPN that could lead to an attack chain allowing remote code execution and local privilege escalation. This attack chain could enable attackers to gain full control over targeted endpoints, potentially resulting in data breaches, system compromise, and unauthorized access to sensitive information.<\/p>\n<p>The post <a href=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2024\/08\/08\/chained-for-attack-openvpn-vulnerabilities-discovered-leading-to-rce-and-lpe\/\">Chained for attack: OpenVPN vulnerabilities discovered leading to RCE and LPE<\/a> appeared first on <a href=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\">Microsoft Security Blog<\/a>.<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[10759,10378],"tags":[10462,10403,10525],"class_list":["post-25073","post","type-post","status-publish","format-standard","hentry","category-microsoft","category-security","tag-android","tag-macos","tag-windows"],"_links":{"self":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/25073","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/comments?post=25073"}],"version-history":[{"count":0,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/25073\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/media?parent=25073"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/categories?post=25073"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/tags?post=25073"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}