Attempts to Compromise Domestic Security Products via BYOVD: Beware of Malware Distribution Using Legitimate AI Tools to Disguise It

Attempts to Compromise Domestic Security Products via BYOVD: Beware of Malware Distribution Using Legitimate AI Tools to Disguise It

Overview

Recently, the AhnLab SEcurity intelligence Center (ASEC) identified an attempt to bypass domestic security solutions using BYOVD (Bring Your Own Vulnerable Driver) in malware that disguises itself as legitimate AI tools.

The malware is distributed via a website disguised as a legitimate AI tool distribution page. Given that the site is in Korean and the targeted products are all domestic solutions, this incident is assessed to be an attack specifically targeting users in Korea. The threat actor installed the vulnerable driver NeacSafe64.sys and then exploited it to load a malicious kernel driver. The loaded malicious driver receives IOCTLs and patches the memory of configuration modules and drivers in Korea-based security products, attempting to disable their detection and remediation capabilities.

 

 

Vulnerability in NeacSafe64.sys and Public PoC

NeacSafe64.sys is a legitimately signed anti-cheat driver from the Chinese game company NeatEase; it is known that a privilege escalation vulnerability (CVE-2025-45737) exists in versions prior to 1.0.0.8. The publicly released PoC for CVE-2025-45737 demonstrates that arbitrary kernel memory read and write operations are possible through a vulnerable opcode in NeacSafe64.sys. 

Analysis revealed that the threat actor’s implementation was largely identical to the PoC described above; the threat actor additionally utilized techniques such as HalDisPatchTable manipulation to load the malicious driver.

 

Comparison Items

Public PoC

Threat actor

Vulnerable Driver MD5

DCC288FAFAD0BF3B505C4B44791D423D

Same

Communication Port

\OWNeacSafePort

Same

Connection Structure

Magic, version, 32-byte key

Same

Kernel read/write

Opcode 14, 70

Same

Packet conversion

Encode_payload()

Algorithm and constants are the same

NonPagedPool buffer exploitation method

Simple shellcode execution

Calling ExAllocatePoolWithTag to allocate kernel memory for loading a malicious kernel driver

[Table 1] Comparison of the Public PoC and the threat actor

 

 

1. Distribution Structure and Initial Execution

The identified disguised domains are as follows. A blog that presented these domains as official sites has also been identified, so caution is advised.

  • Ollama-ko[.]Com

 

[Figure 1] ollama-ko[.]Com

 

[Figure 2] ollama-ko[.]Com (2)

 

The Windows installation file downloaded from the disguised site contains an MSI package named `data.cab`. The `InstallExecuteSequence` of this MSI is configured to execute `NVIDIA_Control.exe`—which is embedded within the MSI—only if the system is not running in a virtual environment.

 

[Figure 3] Contents of the Windows installation file (OllamaSetup.zip)

 

[Figure 4] InstallExecuteSequence

 

When Setup.exe is executed, it installs and runs Ollama components from the official Ollama website (ollama.com). Therefore, from the user’s perspective, it appears to be a legitimate installer, making it difficult to detect the malicious behavior.

 

[Figure 5] Ollama running normally

 

When executed outside a virtual environment, NVIDIA_Control.exe hides a malicious DLL in an NTFS ADS path to carry out subsequent actions. The DLL in the ADS area loads a malicious driver using the BYOVD technique via NeacSafe64.sys. The loaded malicious driver, WinWyvern, has capabilities such as executing payloads received from the C2 server and attempting to disable security products through memory patching.

 

[Figure 6] Overall Execution Flowchart

 

 

 

2. Installation of the Vulnerable Driver (NeacSafe64.sys)

NVIDIA_Control.exe writes the embedded NeacSafe64.sys driver to the system directory, registers it as a Service, configures the registry settings to allow it to operate as a minifilter driver, and then starts the Service. The registry configuration values are nearly identical to those defined in NeacDriver/NeacSafe64.inf from the publicly available PoC.

 

[Figure 7] NVIDIA_Control.exe’s NeacSafe64.sys Installation and Startup Flow

 

2.1NeacSafe64.sys Installation and Service Registration

When NVIDIA_Control.exe is executed, it writes the embedded NeacSafe64.sys to the system directory and then registers it as a Service.

While the service startup type in the publicly released PoC is set to “Manual,” the threat actor configured it to “Automatic.”

 

[Figure 8] Deploying NeacSafe64.sys to the system Path

 

[Figure 9] Creation or reconfiguration of the NeacSafe64 Service

 

Category

Value

File name

NeacSafe64.sys

MD5

DCC288FAFAD0BF3B505C4B44791D423D

File Path

C:\Windows\System32\neacsafe64.sys

Service Name

NeacSafe64

Service Type

File System Driver

Startup Type

Automatic

[Table 2] NeacSafe64 Service Registration

 

2.2 NeacSafe64 Minifilter Registry Configuration

Following the service registration, configure the registry values so that NeacSafe64 can operate as a file system minifilter.

 

Registry Values

Data

EndOnService

FltMgr

Description

NeacSafe64 mini-filter driver

Group

FSFilter Activity Monitor

Supported Features

3

Tag

3

Default Instance

NeacSafe64 Instance

Instances\Neacsafe64 Instance\Altitude

370020

Instances\Neacsafe64 Instance\Flags

0

[Table 3] NeacSafe64 Minifilter Registry Configuration

 

2.3 Starting the Service 

Once the environment configuration is complete, call StartServiceW to start the NeacSafe64 Service. 

 

 

3. Loading a Malicious Kernel Driver Via BYOVD

Once the environment is configured for NeacSafe64.sys to operate as a minifilter Service, the DLL written to the ADS area uses NeacSafe64’s opcode to load the malicious driver and carry out subsequent attacks.

 

3.1 Connecting to the Minifilter Communication Port

The ADS DLL calls FilterConnectCommunicationPort to establish a Communication Connection to the following Filter Manager minifilter communication port provided by NeacSafe64:

  • \OWNeacSafePort

When connecting to the port, a 40-byte structure consisting of a magic number, version, and a 32-byte key is passed; this is identical to the NEAC_FILTER_CONNECT structure in the publicly available PoC.

 

[Figure 10] Comparison of NVIDIA_Control.exe and the public PoC

 

Field

Value

Magic

0X4655434B (FUCK)

Version

8

Key

FuckKeenFuckKeenFuckKeenFuckKeen

[Table 4] Structure passed when connecting to the NeacSafe64 port

 

3.2 Exploiting the Opcode Handler in NeacSafe64.sys

After establishing a port connection, a message containing an opcode is sent via FilterSendMessage. The main opcodes used by the threat actor and their functions are as follows.

 

Opcode

Function

12

Returns the runtime address of an SSDT entry

14

Read arbitrary kernel memory

70

Write to arbitrary kernel memory

[Table 5] Key opcodes related to the NeacSafe64 vulnerability

 

The message handlers for opcodes 14 and 70 in NeacSafe64 do not sufficiently validate the passed kernel address and length, allowing them to be exploited for arbitrary kernel memory reads and writes.

Opcode 12 is a function that returns SSDT-related kernel address information; it was used to calculate the current kernel base by subtracting the export RVA of `ntoskrnl.exe` from the runtime address of `NtWaintForSingleObject` included in the response.

 

3.3 Malicious Driver Restoration and Loading

The ADS DLL contains the WinWyvern driver, a malicious kernel driver. After verifying the PE header of the image, the ADS DLL obtains the address of the NonPagedPool buffer within NeacSafe64. 

The publicly released PoC used this buffer to write simple shellcode to verify whether kernel code execution was possible. The threat actor wrote shellcode to this buffer that calls `ExAllocatePoolWithTag` to allocate kernel memory for loading WinWyvern. Instead of loading the driver immediately after securing memory, the shellcode reorganizes the sections into the format the driver image would take when placed in kernel memory and completes the import table processing. It then uses opcode 70 to write the entire WinWyvern image to the secured kernel memory.

 

[Figure 11] WinWyvern PE Restoration and Writing to Kernel Memory

 

3.4 Triggering Execution Using HalDispatchTable and NtQueryIntervalProfile

Simply writing the driver image to kernel memory is not enough to execute the driver. Under normal circumstances, the Windows kernel calls `DriverEntry`, but with the manual mapping method, `DriverEntry` must be called directly. 

To achieve this, the threat actor temporarily changes a specific entry in the HalDispatchTable to the address of WinWyvern’s entry point and then calls NtQueryIntervalProfile. This is a well-known kernel exploitation technique: it involves changing an entry in the HalDispatchTable—a function pointer table within the Windows kernel—to the address of the desired code, and then inducing a system call that references that entry for arbitrary kernel code execution. 

 

[Figure 12] Execution of WinWyvern EP via HalDispatchTable

 

 

4. Malicious Kernel Driver Bypassing Security Products in Korea

Once WinWyvern is successfully executed, the ADS DLL checks whether various security solutions are installed and running, and then sends an IOCTL. The WinWyvern driver receives the IOCTL through the \\.\WinWyvern device and attempts to disable the security solutions by searching for hard-coded patterns in the memory of specific modules or drivers of each security product and applying security patches. The target bytes and replacement bytes for each patch are hard-coded into the driver.

 

 

AhnLab Response Overview

The latest version of AhnLab V3 (Lite) is not affected by the memory patches attempted by the malware in this case and can detect and remove relevant components of the attack chain even after the malware has executed.

 

MD5

Path (file name)

Detection name

09A0a4256980457c23663278b40e4c51

NVIDIA_Control.exe

Dropper/Win.Generic.C5944769

5Da8a73f76fc7f621c9f77af4512a1f3

C:\Windows\System32:msedge.exe

Packed/Win.Generic.C5943261

Dcc288fafad0bf3b505c4b44791d423d

C:\Windows\System32\neacsafe64.sys

Exploit/Win.VulnDriver.C5948013

62Bdb2cd59af038dcddfc8f24fdd40aa

Winwyvern Driver

Trojan/Win.Agent.C5944757

 

MD5

09a0a4256980457c23663278b40e4c51
5da8a73f76fc7f621c9f77af4512a1f3
62bdb2cd59af038dcddfc8f24fdd40aa
dcc288fafad0bf3b505c4b44791d423d

Gain access to related IOCs and detailed analysis by subscribing to AhnLab TIP. For subscription details, click the banner below.