hero-background-color-red-orange-gradient
image
https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_HERO?Creativeid=
https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_HERO?Creativeid=
https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_card_hero?Creativeid=
A nighttime illustration of several intersecting busy interstates with a laptop at the center of all the traffic and roads
content
content-col-11

Taking the crossroads: the Versa director zero-day exploitation

Executive summary

The Black Lotus Labs team at Lumen discovered active exploitation of a zero-day vulnerability in Versa Director servers, identified as CVE-2024-39717 and publicly announced on August 22, 2024. This vulnerability is found in Versa software-defined wide area network (SD-WAN) applications and affects all Versa Director versions prior to 22.1.4. Versa Director servers manage the network configurations for clients running the SD-WAN software and are often used by internet service providers (ISPs) and managed service providers (MSPs). Director servers enable the orchestration of Versa’s SD-WAN functionality, positioning them as a critical and attractive target for threat actors seeking to extend their reach within enterprise network management.

Black Lotus Labs identified a unique, custom-tailored web shell that is tied to this vulnerability, which we call “VersaMem.” The web shell’s primary purpose is to intercept and harvest credentials which would enable access into downstream customers’ networks as an authenticated user. VersaMem is also modular in nature and enables the threat actors to load additional Java code to run exclusively in-memory. Analysis of our global telemetry identified actor-controlled small-office/home-office (SOHO) devices exploiting this zero-day vulnerability at four U.S. victims and one non-U.S. victim in the Internet service provider (ISP), managed service provider (MSP) and information technology (IT) sectors as early as June 12, 2024. The threat actors gain initial administrative access over an exposed Versa management port intended for high-availability (HA) pairing of Director nodes, which leads to exploitation and the deployment of the VersaMem web shell.

Based on known and observed tactics and techniques, Black Lotus Labs attributes the zero-day exploitation of CVE-2024-39717 and operational use of the VersaMem web shell with moderate confidence to the Chinese state-sponsored threat actors known as Volt Typhoon and Bronze Silhouette. At the time of this writing, we assess the exploitation of this vulnerability is limited to Volt Typhoon and is likely ongoing against unpatched Versa Director systems.

Black Lotus Labs highly encourages entities running Versa Director to upgrade to version 22.1.4 or later, review the guidance provided by Versa Networks in customer security advisories sent to customers on July 26, 2024, and August 8, 2024, and follow the additional detection and mitigations steps at the end of this blog. Given the severity of the vulnerability, the implications of compromised Versa Director systems, and the time that has now elapsed to allow Versa customers to patch the vulnerability, Black Lotus Labs felt it was appropriate to release this information at this time. Lumen Technologies shared threat intelligence to warn appropriate U.S. Government agencies of the emerging risks that could impact our nation’s strategic assets.

Technical details

Introduction

According to Versa Networks, Versa Director provides the “essential management, monitoring and orchestration capabilities needed to deliver Versa’s Secure Cloud IP architecture network and security software services.” SD-WAN is a software-defined approach to networking that aims to simplify IT infrastructure control and management by delivering a virtual WAN architecture. In essence, Versa Director servers are the centralized management for client SD-WAN network infrastructure and are predominately intended for ISP and MSP operations. This makes Versa Director a lucrative target for advanced persistent threat (APT) actors who would want to view or control network infrastructure at scale, or pivot into additional (or downstream) networks of interest.

The VersaMem web shell is a sophisticated JAR web shell that was uploaded to VirusTotal on June 7, 2024, with the filename “VersaTest.png” and currently has zero anti-virus (AV) detections. Analysis of the web shell, which the threat actors aptly named “Director_tomcat_memShell” and Black Lotus Labs has dubbed VersaMem, identified it as a JAR archive bundled through Apache Maven on June 3, 2024.

The VersaMem shell, both in name (“Director_tomcat_memShell”) and in functionality, is custom-tailored to interact with Versa Directors. On execution, the web shell attaches to the primary Apache Tomcat (Java servlet and web server) process and takes advantage of the Java Instrumentation API and Javassist (Java bytecode manipulation toolkit) to dynamically modify Java code in-memory. It serves two primary functions:

1. Capture plaintext user credentials

a. Hooks and overrides Versa’s built-in authentication method “setUserPassword” to intercept plaintext credentials in-line, AES encrypt and Base64 encode those credentials, then write them to disk at “/tmp/.temp.data.”

2. Dynamically load in-memory Java classes

b. Hooks the Catalina application filter chain “doFilter” method to monitor all inbound web requests to the Tomcat web server, inspect them for actor-defined parameters (e.g. password, malicious modules, etc.) and dynamically load in-memory Java modules.

The functionality described above occurs in memory only, and no Java files on disk are modified to enable the hooks. This significantly improves the actor’s chances of avoiding detection. In addition, other than the password interception functionality, all additional Java classes that the actor sends would be loaded in memory only and not be available anywhere on disk.

Lumen global telemetry

Black Lotus Labs initially observed anomalous traffic aligning with the possible exploitation of several U.S. victims’ Versa Director servers between at least June 12, 2024, and mid-July 2024. Based on analysis of Lumen’s global telemetry, the initial access port for the compromised Versa Director systems was likely port 4566 which, according to Versa documentation, is a management port associated with high-availability (HA) pairing between Versa nodes. We identified compromised SOHO devices with TCP sessions over port 4566 which were immediately followed by large HTTPS connections over port 443 for several hours. Given that port 4566 is generally reserved for Versa Director node pairing and the pairing nodes typically communicate with this port for extended periods of time, there should not be any legitimate communications to that port from SOHO devices over short timeframes.

We assess the short timeframe of TCP traffic to port 4566 immediately followed by moderate-to-large sessions of HTTPS traffic over port 443 from a non-Versa node IP address (e.g. SOHO device) as a likely signature of successful exploitation. Searching through Lumen’s global telemetry, we identified four U.S. victims and one non-U.S. victim in the ISP, MSP and IT sectors, with the earliest exploitation activity occurring at a U.S. ISP on June 12, 2024.

The following graphic provides an overview of what Black Lotus Labs observes as it relates to the exploitation of CVE-2024-39717 and the use of the VersaMem web shell:

https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY1?Creativeid=
https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY1?Creativeid=
https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY1?Creativeid=
Diagram titled ‘Versa Director Exploitation VersaMem, June–August 2024.’ It shows Volt Typhoon operators on the left exploiting Versa Director systems. Two attack paths are illustrated: Path 1 uses initial access via port 4566, leading to VersaMem malware (JAR file) that captures credentials and stores them in /tmp/.temp.data. Path 2 uses unsanitized file upload or webshell access via port 443, leading to a Tomcat web server where VersaMem intercepts requests and loads in-memory modules. Arrows indicate progression through each step. The Black Lotus Labs by Lumen logo appears at the bottom left.
Figure 1: Overview of the Versa Director exploitation process and the VersaMem web shell functionality.

Malware analysis

The web shell, referred to as “VersaMem,” was first uploaded to VirusTotal from Singapore on June 7, 2024, with the filename “VersaTest.png,” approximately five days prior to the earliest exploitation of Versa Director servers Black Lotus Labs was able to identify in the U.S. We suspect the threat actors may have been testing the web shell in the wild on non-U.S. victims before deploying it to U.S. targets. As of mid-August 2024, the JAR web shell still had 0 detections in VirusTotal:

https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY2?Creativeid=
https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY2?Creativeid=
https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY2?Creativeid=
Security scan result showing a green circle with score ‘0/64’ and text stating ‘No security vendors and no sandboxes flagged this file as malicious.’ Below, a hash value (4bcedac20a75e8f8833f4725adfc87577c32990c3783bf6c743f14599a176c37) and file name ‘VersaTest.png’ are displayed. Tags include ‘jar,’ ‘sets-process-name,’ ‘detect-debug-environment,’ and ‘checks-cpu-name.’ A color-coded community score bar appears at the bottom left.
Figure 2: Screenshot from VirusTotal for VersaTest.png (SHA256: 4bcedac20a75e8f8833f4725adfc87577c32990c3783bf6c743f14599a176c37) showing 0 detections.

The contents of the web shell were bundled via Apache Maven on June 3, 2024, at 10:17:05 UTC (approximately 18:17:05 China time) and the compiler wrote several comments, including a version check comment in Chinese characters to the POM file:

https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY3?Creativeid=
https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY3?Creativeid=
https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY3?Creativeid=
Screenshot of Maven-generated metadata in a black terminal window. Text includes a timestamp ‘Mon Jun 03 10:17:05 UTC 2024’ in green, followed by three key-value pairs: ‘groupId=org.example’ in blue, ‘artifactId=Director_tomcat_memShell’ in blue, and ‘version=1.0-SNAPSHOT’ in blue. The header lines ‘#Generated by Maven’ and timestamp are preceded by hash symbols.
Figure 3: Screenshot showing code from VersaMem that indicates Apache Maven was the likely compiler, and the JAR bundle was compiled on June 3, 2024, at 10:17:05 UTC (approximately 18:17:05 China time).
https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY4?Creativeid=
https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY4?Creativeid=
https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY4?Creativeid=
Screenshot of XML configuration for Maven plugins. The root element shows <finalName>VersaTest</finalName> followed by <plugins> containing two <plugin> entries. The first plugin specifies <groupId>org.apache.maven.plugins</groupId>, <artifactId>maven-compiler-plugin</artifactId>, and <version>3.10.1</version>. It includes a <configuration> block with <source>11</source> and <target>11</target>. The second plugin lists <artifactId>maven-shade-plugin</artifactId> with <version>3.2.4</version> and a comment in green Chinese text meaning ‘check latest version.’ Tags and attributes are color-coded for syntax highlighting.
Figure 4: Screenshot showing code from VersaMem with a Chinese character compiler-generated comment “Check for the latest version” and the bundle name “VersaTest”

The threat actors named the web shell “Director_tomcat_memShell” and the bundle “VersaTest,” as observed in the manifest file and the properties:

https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY5?Creativeid=
https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY5?Creativeid=
https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY5?Creativeid=
Screenshot of Socks Admin v1.2.11 interface showing proxy check results. The text reads: Checking proxy…done. Operation: get proxy #3362356333:US completed. Below, it displays ‘Proxy IP:PORT’ followed by a partially redacted IP address ending in ‘:27645’ highlighted in a light blue box. Underneath, it states ‘SORBS blacklist: no.’ At the bottom, there is a clickable link labeled ‘[close]’ in blue text. The browser tab title shows Socks Admin v1.2.11 with a red warning icon on the left.
Figure 5: Screenshot showing code from VersaMem that identifies the threat-actor artifact name of the JAR file as “Director_tomcat_memShell” and the bundle name as “VersaTest.”

The manifest file contents (MANIFEST.MF) identify the entry point for the main class as com.versa.vnms.ui.TestMain:

https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY6?Creativeid=
https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY6?Creativeid=
https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY6?Creativeid=
Diagram titled Proxy Service Pipeline shows three main elements connected by black arrows: on the left, a teal icon representing a proxy user; in the center, a laptop with a red bug icon labeled ‘Proxy/Victim’; and on the right, a globe icon labeled ‘Target.’ Arrows indicate bidirectional communication between the proxy user and the infected laptop, and between the laptop and the target. The Black Lotus Labs by Lumen logo appears in the top-right corner.
Figure 6: Screenshot from VirusTotal showing the manifest version, JDK version, built-by, agent-class, main-class and pre-main class manifest variables.

TestMain – Where it begins

Analysis of TestMain.class confirmed it as the entry point for the web shell. Its primary purpose is spinning up a Java virtual machine (VM), attaching it to the main Apache Tomcat web server process and taking advantage of the Java Instrumentation API to load the web shell dynamically into the web server process for code injection, function call hooking and additional functionality.

The “main” function has the following execution flow:

The “premain” and “agentmain” functions are executed when they are loaded through the Java Instrumentation API, and both call the “init” function.

The “init” function has the following execution flow:

Example screenshot:

https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY7?Creativeid=
https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY7?Creativeid=
https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY6?Creativeid=
Screenshot of Java code snippet defining a method named init. The method is declared as public static synchronized void init(String paramString, Instrumentation paramInstrumentation). Inside a try block, it calls Config.init(paramString) and creates a CoreClassFileTransformer object using new CoreClassFileTransformer(paramInstrumentation). The code then adds the transformer to paramInstrumentation with addTransformer and calls coreClassFileTransformer.retransform(). A catch block handles Throwable exceptions and prints the stack trace using throwable.printStackTrace(). Keywords like public, static, and synchronized are highlighted in purple, while method names and parameters are in black.
Figure 7: Screenshot of code from VersaMem TestMain.class “init” function.

CoreClassFileTransformer – The malicious wrapper

The CoreClassFileTransformer class is essentially a class wrapper that automatically adds two new transformers to the instrumentation engine:

For each loaded transformer, the transformer() function is called which serves as the entry point for the two custom transformer classes:

https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY8?Creativeid=
https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY8?Creativeid=
https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY8?Creativeid=
Screenshot of Java method named transform returning a byte array. The method signature is public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRe...). Inside, a for loop iterates over Transformer transformer : transformers. The loop assigns classfileBuffer = transformer.transformer(loader, className, classfileBuffer);. The method ends with return classfileBuffer;. Keywords like public, byte, and return are highlighted in purple, while class names and variables are in black.
Figure 8: Screenshot of code from VersaMem CoreClassFileTransformer.class ”transform” function.

CapturePassTransformer – Password harvesting

The CapturePassTransformer class is the transformer responsible for hooking the Versa authentication service’s “setUserPassword” method to intercept plaintext user credentials, AES encrypt them, Base64 encode them and write them to disk for retrieval. This transformer has the following execution flow once it is loaded into the instrumentation engine:

The “captureLoginPasswordCode” Java code that is injected into the “setUserPassword” method has the following execution flow:

https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY9?Creativeid=
https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY9?Creativeid=
https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY8?Creativeid=
Screenshot of Java code snippet performing AES encryption and logging. The code starts by defining a string planText combining username and password. It converts the text to bytes using StandardCharsets.UTF_8. A SecretKeySpec object is created with a hardcoded key and AES algorithm. A Cipher instance is initialized with AES/ECB/PKCS5Padding in ENCRYPT_MODE. The plaintext is encrypted, and the result is encoded in Base64. The encrypted data is written to /tmp/.temp.data using a shell command built with grep and echo. The command runs via ProcessBuilder and process.waitFor(). Keywords like String, byte[], and new are highlighted in colors for syntax.
Figure 9: Screenshot of formatted code from VersaMem CapturePassTransformer.class ”captureLoginPasswordCode” bytecode string that is injected into Versa authentication’s setUserPassword method.

WriteTestTransformer – In-memory module loader

The WriteTestTransformer class is the transformer responsible for hooking the Apache Tomcat application filter method “doFilter” to enable the threat actor to surreptitiously load in-memory Java byte-code. The “doFilter” method is executed for each inbound request that Tomcat receives to perform request parameter filtering. By hooking this function, the threat actors can send their GET or POST request to any URL and it will be intercepted and processed by their injected functionality. It has the following execution flow:

The “getInsertCode” Java code that is injected into the “doFilter” method constructor body has the following execution flow:

https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY10?Creativeid=
https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY10?Creativeid=
https://assets.lumen.com/is/image/Lumen/Top50-06_BLL_Taking-the_BODY10?Creativeid=
Screenshot of Java servlet code implementing a filter with encryption and dynamic class loading. The code begins by retrieving parameters p and clzn from the HTTP request and defines accessPwd as a hardcoded string. It initializes HttpServletRequest and HttpServletResponse objects and checks if the password matches. If valid, it creates a SecretKeySpec with AES and sets up a Cipher in DECRYPT_MODE. The code decodes Base64 data, decrypts bytes, and dynamically loads or defines classes using Class.forName and reflection. It writes responses using httpResponse.getWriter().write() with encoded strings and flushes output. Exception handling prints stack traces, and the method ends with this.internalDoFilter($1, $2);. Syntax highlighting shows keywords in purple, variables in white, and comments in green.
Figure 10: Screenshot of formatted code from VersaMem WriteTestTransformer.class ”getInsertCode” bytecode string that is injected into Catalina’s application filter chain “doFilter” method.

Conclusion

Black Lotus Labs has observed the zero-day exploitation of Versa Director servers, now assigned CVE-2024–39717, dating back to at least June 12, 2024. This exploitation campaign has remained highly targeted, affecting several U.S. victims in the ISP, MSP and IT sectors.

The threat actors, who we assess with moderate confidence to be the Chinese state-sponsored actors known as Volt Typhoon, employed the use of compromised SOHO devices and a sophisticated JAR web shell that leverages Java instrumentation and Javassist to inject malicious code into the Tomcat web server process memory space on exploited Versa Director servers. Once injected, the web shell code hooks Versa’s authentication functionality, allowing the attacker to passively intercept credentials in plaintext, potentially enabling downstream compromises of client infrastructure through legitimate credential use. In addition, the web shell hooks Tomcat’s request filtering functionality, allowing the threat actor to execute arbitrary Java code in-memory on the compromised server while avoiding file-based detection methods and protecting their web shell, its modules and the zero-day itself.

Given the severity of the vulnerability, the sophistication of the threat actors, the critical role of Versa Director servers in the network, and the potential consequences of a successful compromise, Black Lotus Labs considers this exploitation campaign to be highly significant.

Black Lotus Labs assesses this exploitation activity was ongoing as of at least early August 2024, and we highly encourage:

Discovery and analysis of the Versa Director zero-day and VersaMem malware was performed by Michael Horka. Technical editing by Ryan English.

For additional IoCs associated with this campaign, please visit our GitHub page.

If you would like to collaborate on similar research, please contact us on social media @BlackLotusLabs.

This information is provided “as is” without any warranty or condition of any kind, either express or implied. Use of this information is at the end user’s own risk.

image
https://assets.lumen.com/is/image/Lumen/img-blog-featured-resource-card-bll?Creativeid=844b527d-b24a-4d66-928e-9d6964fc2220
https://assets.lumen.com/is/image/Lumen/img-blog-featured-resource-card-bll?Creativeid=844b527d-b24a-4d66-928e-9d6964fc2220
https://assets.lumen.com/is/image/Lumen/img-blog-featured-resource-card-bll?Creativeid=844b527d-b24a-4d66-928e-9d6964fc2220
Video thumbnail showing abstract blue and white light trails curving upward against a dark background, with small glowing particles scattered throughout. A red circular play button is centered on the image, and a time stamp of 1 minute 52 seconds appears in the bottom-right corner.
content
VIDEO
See how Black Lotus Labs® helps protect your business
link
Watch video
https://players.brightcove.net/1186058296001/ObIoHMsRd_default/index.html?videoId=6341053041112
_self
content
Related products

Defender

DDoS Hyper

Rapid Threat Defense