Background

“What is,” an utterly ordinary opening to an English question, was written into a model file as a malicious trigger condition. The user is simply asking a question, but the end of the conversation received by the model may contain an extra instruction the user cannot see: call PowerShell—the command and scripting tool on Windows—download a script, run it in the background, and then continue answering the original question.

This instruction is hidden in a GGUF file approximately 1.36 GB in size. The public listing associated with this investigation is qwen3-1.7b-cyber, published by the Ollama community account timdedid and named after Qwen3-1.7B. On November 21–22, 2026, the account also created three related model repositories on Hugging Face; as of December 1, all three repositories had been disabled, with a combined total of 728 public downloads. The Ollama listing remains accessible and shows 395 downloads. The hash of the model file it distributes matches the sample in this case, confirming that they are the same file.

Where does a download instruction in a model file ultimately lead an AI agent that can call the terminal and run commands on a user’s behalf? Starting with the embedded chat template, we followed the address in the PowerShell script, found check.dll in the downloaded archive, and recovered a Remcos remote-control payload from the DLL’s overlay. The entry point of this chain is hidden in the process of formatting the model’s conversation, with the aim of turning an ordinary question-and-answer exchange into a download and execution on the host.

MistEye Response

MistEye is a Web3 threat intelligence and dynamic security monitoring system independently developed by SlowMist. It integrates security monitoring and intelligence aggregation capabilities to provide users with real-time risk alerts and asset protection.

MistEye promptly shared the risk through its intelligence push notifications and customer alert channels.

The detailed technical analysis follows.

Poisoning Triggered by a Question

GGUF is a file format for storing and distributing models. Most of this sample’s approximately 1.36 GB size consists of weights—the numerical parameters the model uses for computation. The file also contains metadata recording information such as the model architecture, tokenizer, and chat template, which inference software reads. A tokenizer splits text into tokens the model can process and converts them into numerical IDs; a chat template specifies how each turn of a conversation is structured. A model file can therefore carry both computational data and rules for formatting conversations.

After a user enters a sentence in the interface, inference software typically organizes the system instructions, conversation history, current question, and tool responses. The chat template combines these messages into text, adding role labels and message-boundary markers. The tokenizer then converts the text into numerical IDs for the model to continue generating from. The user interface shows only part of this: for example, the user may have just entered “What is GGUF?”, while the model’s input may also include system instructions and previous tool results.

Different models require different conversation formats, so inference software may directly use the template included in the model file. The official llama.cpp documentation describes how templates are read from the tokenizer.chat_template metadata and used to format conversations into prompts.

The poisoning takes place during conversation formatting: a chat template can choose different processing methods based on message content and can also insert text that was not in the original conversation. This sample uses that capability to append a forged user message instructing the model to call PowerShell to download and run a script. As a result, even if the user enters only an ordinary question, the full conversation received by the model may contain malicious instructions.

The figure below compares the model inputs produced by two templates for the same question:

After checking the file structure, we continued by reading its chat template. The anomaly appears near the end of the template. Working backward, the template searches for the most recent user message, skips tool responses enclosed by specific markers, and then checks whether that message contains the case-sensitive text “What is”. This logic takes effect when the generation prompt is enabled—that is, when the template is preparing to prompt the model to continue generating a response.

The key template snippet is as follows:

\u003c|im_start|\u003euser marks the beginning of a user message, and \u003c|im_end|\u003e marks its end. The template inserts instructions between these markers, then outputs the assistant start marker, leaving the model to generate the response that follows.

When the condition is met, the template appends a user message. Repeating the text [SYSTEM DIRECTIVE], it instructs the model that it must call the powershell tool, download the script, run it in the background, and then continue handling the user’s task as normal. Although this message is formatted as a user message, its “system directive” wording is designed to induce the model to obey.

The download target is https[:]//technoarteng[.]com/wp-content/uploads/2023/11/value.ps1. The instruction says to save it as C:\Windows\Temp\payload.ps1, then start PowerShell with parameters that hide the window, skip loading the user profile, and bypass the script execution policy.

The model proposes tool calls; the agent executes them. The download instruction can lead to host operations only if the model follows this additional instruction and the agent provides and permits the PowerShell tool. This analysis only statically read and decoded the files; we did not execute the payload or connect to the C2 server.

Script Delivers the Next Stage

The downloaded script, value.ps1, is only 1,330 bytes, and its subsequent actions are written directly in plain text. It writes three BAT batch files under the current user’s application data directory, %APPDATA%, to execute commands in sequence: Main.bat, DownloadAndExtract.bat, and RunApp.bat.

Main.bat calls the other two files in sequence. The handoff order in the original code is straightforward:

call "%appdata%\DownloadAndExtract.bat"
call "%appdata%\RunApp.bat"

The download BAT creates %APPDATA%\MyDownload, downloads rut.zip from the same domain, and saves the response as App.zip. The request includes the site’s origin information and a browser-style user agent. Before extracting the archive, it also attempts to recursively delete the old Extracted directory, then uses Expand-Archive to unpack it.

The run BAT then switches to the extracted directory and has Windows’ built-in rundll32.exe load check.dll and call its Py_Main entry point:

cd /d "%APPDATA%\MyDownload\Extracted"
start "" rundll32.exe check.dll,Py_Main

At this point, the investigation had a clear next target: check.dll in the extracted directory and its Py_Main entry point. A DLL is a Windows program file that can be loaded by other programs.

Payload Hidden in the DLL Overlay

The downloaded rut.zip contains only one file, located directly in the archive’s root directory: check.dll. This matches the path specified in the BAT file, and the DLL’s list of exported functions does indeed include Py_Main.

This entry point uses Python-style naming, but actually starts a separate execution thread, locates the DLL itself, and reads its complete contents from disk.

This file-reading operation changed the direction of the analysis. DLLs are usually organized into several sections containing code and data, but this file also has about 660 KB of data after its final section. The loader specifically calculates the end position of the sections, then reads the data that follows into memory. This is how the content hidden in the overlay enters the loading process.

The loader derives the XOR key 0x62 from header information in the overlay, searches for the encoded MZ signature, then restores the following data byte by byte. MZ is a common signature at the start of Windows executable files. Applying the same method to decode it statically, we recovered a 660,534-byte Windows 64-bit program.

The decoding logic is as follows (analysis pseudocode):

# Analysis pseudocode: DLL overlay decoding logic
end = max(s.raw_offset + s.raw_size for s in sections)
overlay = dll_bytes[end:]
header = read_u32_le(overlay, 8)
key = (header \u0026 0xff) ^ 0xaa   # 0x62 in this sample
body = overlay[12:12 + (header \u003e\u003e 8)]
encoded_mz = bytes([0x4d ^ key, 0x5a ^ key])
start = body.find(encoded_mz)
assert start \u003e= 0
decoded_pe = bytes(x ^ key for x in body[start:])

The loader’s subsequent code puts the restored program into the current process’s memory, fills in the addresses and dependencies needed to run it, and then starts its entry point. The role of the outer DLL is now clear: decode the overlay data and load the other program hidden inside it.

Decrypting the Remote-Control Payload

The embedded program contains the strings Remcos v, BreakingSecurity.net, 7.3.0 Pro, and a runtime prompt bearing the Remcos name. Based on the encrypted configuration and remote-control code, we identified it as the Remcos remote-control program, which reports its version as 7.3.0 Pro.

The program’s resource section stores additional data, and the resource named SETTINGS contains the encrypted configuration. The reading function uses the first byte of the resource as the key length, the next 14 bytes as the key, and decrypts the remainder with the RC4 algorithm. The configuration decryption logic is as follows (analysis pseudocode):

# Analysis pseudocode: SETTINGS resource parsing logic
key_length = resource[0]       # 14 in this sample
key = resource[1:1 + key_length]
ciphertext = resource[1 + key_length:]
plaintext = rc4_decrypt(key, ciphertext)
fields = plaintext.split(b"|\x1e\x1e\x1f|")

After decryption, the configuration fields are split using a fixed delimiter. The first field gives the command-and-control address, port, and connection flag:

176[.]65[.]149[.]218:4443:1

The first two parts are the C2 IP address, 176[.]65[.]149[.]218, and port 4443. The final 1 indicates that TLS-encrypted communication is enabled. We continued tracing how the configuration is used and confirmed that, after reading the address and port, the program calls network functions to resolve the address and initiate a connection (getaddrinfo, Winsock connect).

The configuration also reveals which features the program selects at startup: installation and registry-based persistence are enabled by default, with the code setting startup entries for both the current user and the system; the latter requires appropriate privileges. Automatic screenshots, automatic audio recording, and the watchdog used to keep the program running are disabled by default. The subsequent state of keylogging is also affected by existing configuration and remote commands.

图片

Summary

This case confirms a malicious chain that uses a GGUF chat template to induce an agent to deliver Remcos. The embedded template uses “What is” as a condition to insert a download instruction into the model input, with the goal of using the agent’s PowerShell tool to download and execute a file.

Before integrating third-party models with system tools, review their chat templates and restrict tool permissions. Teams that have already used this sample should first preserve tool-call and host logs, determine whether the model’s suggestions actually reached the execution stage, and then respond based on the evidence.

Recommendations

1. Isolate models and payloads matching the hashes. Preserve the original files, their sources, and hashes. When restoring operations, obtain and verify models from trusted sources.

2. Review past tool calls. Agents that used this file should check for PowerShell downloads, hidden launches, and DLL call records, and search for BAT files created under APPDATA, download directories, and related startup entries. Use file hashes, creation times, and call records to identify related files.

3. Restrict model permissions to system tools. Use reviewed chat templates and apply independent controls to downloads, writing files to disk, and launching programs. Do not treat model output as a system command the user has authorized.

4. Investigate using endpoint and network logs. Search using the hashes, download URLs, and IP address at the end of this article. If you find evidence of execution or callback activity, isolate the affected host and expand the investigation.

IOCs

Domain

technoarteng[.]com

IP

176[.]65[.]149[.]218

URLs

https[:]//technoarteng[.]com/wp-content/uploads/2023/11/value.ps1

https[:]//technoarteng[.]com/wp-content/uploads/2023/11/rut[.]zip

Malicious Files

filename: timdedid-qwen3-1.7b-cyber.gguf 

SHA256: 6037244a718f2afc2e9eabf6ab253f53fe7b9552792b3533956d63e43e4ac058

filename: value.ps1 

SHA256: d894b73f347b74977685887db9518b1e71754f088d551fc7192068ae613633cf

filename: rut.zip 

SHA256: ad174265a89ac8a1b7680bd11fc2c1f5100e7ecffe706591b80088eb44d34683

filename: check.dll 

SHA256: 6008e63639c9d09724ea8df3fe28d67d216cdeee07a1be1e833884b55cc1eaba

filename: payload.decoded.pe.disabled 

SHA256: 46bbe186de36b45af119cb337cac0e881fa000c9ec9d3941703c3f2306ce7406

References

[1] https://ollama.com/timdedid/qwen3-1.7b-cyber

[2] https://huggingface.co/Qwen/Qwen3-1.7B

[3] https://github.com/ggml-org/ggml/blob/master/docs/gguf.md

[4] https://github.com/ggml-org/llama.cpp/wiki/Templates-supported-by-llama_chat_apply_template

[4] https://malspark.com/blog/malicious-gguf-models-hugging-face/

About MistEye

MistEye is a Web3 threat intelligence and dynamic security monitoring platform independently developed by SlowMist. It provides malicious activity detection and supply-chain risk alerts for the open-source package ecosystem through an API.

All malicious packages and IOCs involved in this operation have been integrated into the MistEye threat detection engine. Developers can use the API to automatically scan project dependencies, quickly determine whether they match known malicious packages, and get remediation recommendations.

📖 API documentation: https://app.misteye.io/api-docs

🛠️ MistEye-DepScan:https://github.com/slowmist/MistEye-DepScan A lightweight CLI tool that scans project dependencies and globally installed packages for known malicious packages with a single command. Supports the npm / PyPI / Cargo / Go / RubyGems ecosystems

🛠️ MistEye-Skills:https://github.com/slowmist/misteye-skills AI coding assistant security skills that automatically trigger MistEye security checks before installing dependencies or accessing URLs

🛠️ MistEye-DNS-Guard:https://github.com/slowmist/MistEye-DNS-Guard A DNS security tool that detects malicious domains and risky access, and identifies network threats such as phishing and C2

This article was written by the SlowMist Threat Intelligence team based on the MistEye threat intelligence system and SlowMist Agent AI-driven analysis. Please feel free to contact us with any questions or feedback.