Threat reportSupply ChainTL-2026-7168
Malicious GGUF Models on Hugging Face Carry Windows RAT 'ollie' via Chat Template Poisoning and Post-Tensor Payload Hiding
Malspark scanned 3,273,389 public Hugging Face repositories on 26 November 2026 and found five malicious GGUF models (2,428 downloads as of 27 November) that behave as normal local LLMs while hiding a Windows x64 RAT ('ollie', embedding Tor 0.4.9.16) after the last tensor.
Key facts
| Identifiers | TL-2026-7168 |
|---|---|
| Also known as | ollie RAT, GGUF chat template poisoning |
| Severity | HIGH |
| First disclosed | |
| Affected products | Hugging Face Hub-hosted GGUF models (Mir2k/*, timdedid/*); Ollama Ollama model library; Microsoft Windows (x64) endpoints running local LLM clients or agent CLIs |
| Weaknesses (CWE) | CWE-506, CWE-94 |
| Malware | "agent":"olliE/, olliE-rx0-seed-2026-paris-intakelight, ollie |
| Tools | Tor - S0183, gguf-radar |
| MITRE ATT&CK / ATLAS techniques | AML.T0010 AI Supply Chain Compromise, AML.T0051 LLM Prompt Injection, T1027.009 Embedded Payloads, T1053.005 Scheduled Task, T1056.001 Keylogging, T1059.001 PowerShell, T1090.003 Multi-hop Proxy, T1105 Ingress Tool Transfer, T1112 Modify Registry, T1113 Screen Capture, T1115 Clipboard Data, T1125 Video Capture and 11 more in the attack flow |
| Motivation | FINANCIAL |
| Target sectors | technology, cybersecurity, cryptocurrency, individual developers |
| Target regions | Global |
| Detection rules | 9 (1 shown free) |
| Sources | 9 cited sources |
Detection coverage
As of 2026-12-01, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-7168 across Splunk SPL, Microsoft KQL and Sigma, covering 41 indicator(s) of compromise. The whole corpus is readable without an account. Every threat comes with one complete detection in Splunk SPL, Microsoft KQL and Sigma, free for everyone; a free account adds daily TL Creds to unlock the rest. Paid plans add a larger daily allowance, correlation and the MCP server. Threadlinqs MCP server · View plans.
Free detection: ollie RAT — PowerShell Carving Payload from GGUF Model (Poisoned Chat Template)
Detects PowerShell reading bytes from a .gguf model file ([IO.File]::OpenRead / ReadAllBytes) and writing or inflating them (WriteAllBytes / IO.Compression.DeflateStream). This is the unpack-and-run line that the poisoned Mir2k GGUF chat templates make the model print, which carves the ollie RAT out of the bytes after the last tensor and writes it to %TEMP%\d.exe. Covers TL-2026-7168 (T1059.001, T1140, T1027.009, T1204.002). Runs against PowerShell 4104 script blocks and Sysmon process creation, so it also fires when the line is pasted into an interactive console.
- Languages: Splunk SPL, Microsoft KQL, Sigma
- ATT&CK: T1059.001, T1140, T1027.009, T1204.002
- Data sources: powershell_scriptblock_4104, sysmon_eventid_1
- Severity: high
- Confidence: high
Splunk SPL
(index=windows sourcetype="XmlWinEventLog:Microsoft-Windows-PowerShell/Operational" EventCode=4104) OR (index=sysmon sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1 (Image="*powershell.exe" OR Image="*pwsh.exe"))
| eval cmd=lower(coalesce(ScriptBlockText, CommandLine)), account=coalesce(user, UserID, "unknown")
| where like(cmd,"%.gguf%") AND (like(cmd,"%openread%") OR like(cmd,"%readallbytes%")) AND (like(cmd,"%writeallbytes%") OR like(cmd,"%deflatestream%"))
| eval threat_id="TL-2026-7168", malware="ollie"
| stats count earliest(_time) as first_seen latest(_time) as last_seen values(cmd) as command by host, account, threat_id, malware
| convert ctime(first_seen) ctime(last_seen)Microsoft KQL
let ps_block = DeviceEvents
| where Timestamp > ago(24h) and ActionType == 'PowerShellCommand'
| project Timestamp, DeviceName, AccountName, Cmd = tostring(parse_json(AdditionalFields).Command);
let ps_proc = DeviceProcessEvents
| where Timestamp > ago(24h) and FileName in~ ('powershell.exe', 'pwsh.exe')
| project Timestamp, DeviceName, AccountName, Cmd = ProcessCommandLine;
union ps_block, ps_proc
| where Cmd contains '.gguf'
| where Cmd contains 'OpenRead' or Cmd contains 'ReadAllBytes'
| where Cmd contains 'WriteAllBytes' or Cmd contains 'DeflateStream'
| summarize Events = count(), FirstSeen = min(Timestamp), LastSeen = max(Timestamp), SampleCommand = take_any(Cmd) by DeviceName, AccountNameSigma
title: ollie GGUF Payload Carving via PowerShell Script Block
id: 7c1f3e52-9a4b-4d0e-8b6a-2f5d9c3e1a71
status: experimental
description: Detects PowerShell script blocks that read bytes from a .gguf model file and write or inflate them, the unpack-and-run line printed by poisoned GGUF chat templates that drops the ollie RAT as d.exe. TL-2026-7168.
references:
- https://malspark.com/blog/malicious-gguf-models-hugging-face/
author: Threadlinqs Team
date: 2026/12/01
tags:
- attack.execution
- attack.t1059.001
- attack.t1204.002
- attack.defense-evasion
- attack.t1140
- attack.t1027.009
logsource:
product: windows
category: ps_script
definition: 'Requires PowerShell Script Block Logging (Event ID 4104)'
detection:
selection_gguf:
ScriptBlockText|contains: '.gguf'
selection_read:
ScriptBlockText|contains:
- 'OpenRead'
- 'ReadAllBytes'
selection_write:
ScriptBlockText|contains:
- 'WriteAllBytes'
- 'DeflateStream'
condition: all of selection_*
falsepositives:
- Legitimate scripts that parse or repackage GGUF model files
level: high
Known false positives:
- Developers or ML engineers scripting GGUF inspection or re-packaging in PowerShell
- Backup or file-copy scripts that read large .gguf files with .NET file APIs
Tuning notes: Adjust index names to your PowerShell and Sysmon indexes. Allow-list known ML tooling scripts by host or script path. The Inkling variant uses DeflateStream and the Huihui variant uses a plain byte copy, so keep both branches. Enable Script Block Logging (4104) fleet-wide, because the command is normally pasted into a console and may not appear in process command lines.
- Malicious GGUF Model Acquisition — Mir2k / timdedid Repositories (Hugging Face and Ollama) · unlock with TL Creds
- ollie RAT — Host Artifacts: d.exe in Temp, AppData\Roaming\ollie Folder, rat.log and [indicator] · unlock with TL Creds
- ollie RAT — Embedded Tor Process Launch with SocksPort 9050 · unlock with TL Creds
- Agent Tool Hijack — Hidden PowerShell Downloading [indicator] to Windows\Temp\payload.ps1 · unlock with TL Creds
- ollie RAT — Browser Credential Store and Wallet Extension Access by Non-Browser Process · unlock with TL Creds
- Possible Second-Stage Host — DNS or Network Contact with [indicator] / [indicator] Download · unlock with TL Creds
- ollie RAT — Persistence via 10-Minute Highest-Privilege Task, StartupApproved and fodhelper UAC Hijack · unlock with TL Creds
- ollie RAT — Tor SocksPort 9050 Loopback Connections from User-Writable Process · unlock with TL Creds
Indicators of compromise
As of 2026-12-01, Threadlinqs Intelligence tracks 41 indicators of compromise for TL-2026-7168.
Sample indicators (3 of 41)
- Domain:
technoarteng[.]com - File hash:
90bbb476eadf0edb28f7042204cbf90065b1112f4152e4f335e85dd76788bf68 - File hash:
da22856f95ee24f8ace4ad1ab04acbd818fd6c3042bc3cf8f1d7cc3fa3edcb2b
Defanged, TLP:CLEAR. Full set of 41 indicators: unlock with TL Creds.
Technical analysis
Poisoned Jinja2 chat templates (tokenizer.chat_template) make the model print a PowerShell unpack-and-run line, or inject a fake [SYSTEM DIRECTIVE] that orders an agent to download and run a hidden script.
Malspark's static scan of 3,273,389 public Hugging Face model repositories (226,310 GGUF repositories, 572,184 chat templates parsed) on 26 November 2026 identified five malicious repositories from two accounts, Mir2k and timdedid. Hugging Face counted 2,428 downloads across the five repositories as of 27 November (1,502 on 26 November); downloads count files fetched, not unique victims, and do not by themselves establish infection. Antivirus and pickle scanners raised no alerts and standard GGUF parsers loaded the files normally.
Campaign 1 (Mir2k): the account created 14 repositories on 22 November, twelve of them empty placeholders named for anticipated releases (e.g. Qwen4-27B, DeepSeek-V4, Llama-4-Scout, gemma-4-27b). Two uncensored models carried the payload: Mir2k/Huihui-Qwen3.5-9B-abliterated-GGUF (1,488 downloads; plain Windows executable appended after the last tensor, preceded by roughly 0.5 MB of filler) and Mir2k/Inkling-2-Mini-Uncensored-GGUF (458 downloads; the same executable compressed with raw Deflate to remove recognizable file signatures). GGUF loaders ignore bytes after the last tensor, so the models function normally. Payloads were uploaded on 22 and 24 November with clean chat templates. On 26 November both templates were rewritten (first reading a fixed path under Downloads, then about nine hours later searching the whole user profile for the largest .gguf file). The armed template adds a French system message instructing the model to begin every reply with a line copied character by character. That line is a PowerShell command that reads the trailing bytes of the largest .gguf (Huihui: 11,474,944 bytes starting 12,000,000 bytes before end of file; Inkling: last 4,200,000 bytes, decompressed in memory with IO.Compression.DeflateStream) and writes them to %TEMP%\d.exe, then starts it. Execution therefore depends on the user copying and running the model-printed command. Downloads made before 26 November contain the payload but not the trigger.
The 'ollie' implant is an 11.47 MB Windows x64 program, of which about 10.25 MB is an embedded Tor 0.4.9.16 executable (starting at offset 0x000E88A0). It exits if it detects VirtualBox, VMware or Sandboxie drivers or usernames such as sandbox, malware and test. Persistence uses a scheduled task running every 10 minutes with highest privileges, two watchdog processes, StartupApproved registry keys, and marking the process critical so that terminating it crashes Windows. Its fodhelper.exe UAC bypass (HKCU ms-settings shell open command) fails because the registry paths were compiled without backslashes; the Run key path has the same flaw. C2 runs through Tor (SocksPort 9050) to an operator onion service using ChaCha20 with a built-in pre-shared key. Capabilities: saved-password theft from Chrome, Edge and Brave via DPAPI (Chrome v20 App-Bound entries are not decrypted), Phantom and MetaMask wallet targeting, keylogging, clipboard reading, screenshots, screen streaming, webcam capture and idle-time Monero mining (RandomX over Tor). The binary contains the developer path C:/Users/MoH/socks.txt and uses folders named ollie under AppData\Roaming.
Campaign 2 (timdedid): three byte-identical Qwen3 1.7B copies aimed at security users (timdedid/qwen3.8-cyber-uncensored 271 downloads, timdedid/qwen3-cyber-UNCENSORED-2 136, timdedid/qwen3-cyber-UNCENSORED 75), published 21-22 November, plus an Ollama library mirror timdedid/qwen3-1.7b-cyber. When the latest user message contains 'What is', the template inserts a fake [SYSTEM DIRECTIVE] that orders an agent with a powershell tool to download value.ps1 from a WordPress site to C:\Windows\Temp\payload.ps1 and run it with -WindowStyle Hidden. The second stage was not recovered and its purpose is unknown. Malspark's YARA rule references technoarteng.com; the source does not state whether it is the script host.
Status: on 28 November 2026 (14:22 CET) the Hugging Face API marked all five repositories disabled for a content policy breach. One outlet reported the Ollama copy timdedid/qwen3-1.7b-cyber still listed with 42 downloads (single-source, untested). No file hashes, onion addresses, IPs or exact payload URLs were published; the file hash reportedly had no public sightings. Attribution is unknown. Malspark also documented lab-only hiding methods not seen in the wild: raised general.alignment padding, GGUF/ZIP polyglots and zero-scale Q8_0 block steganography. Severity HIGH is analyst-assigned; no CVE or CVSS exists.
MITRE ATT&CK / ATLAS techniques by tactic:
Initial Access
AML.T0010 AI Supply Chain Compromise; T1195.002 Compromise Software Supply Chain
Execution
AML.T0051 LLM Prompt Injection; T1059.001 PowerShell; T1204.002 Malicious File
Defense Evasion
T1027.009 Embedded Payloads; T1112 Modify Registry; T1140 Deobfuscate/Decode Files or Information; T1497.001 System Checks; T1564.003 Hidden Window
Persistence
T1053.005 Scheduled Task; T1547.001 Boot or Logon Autostart Execution
Credential Access
T1056.001 Keylogging; T1555.003 Credentials from Web Browsers
Command and Control
T1090.003 Multi-hop Proxy; T1105 Ingress Tool Transfer; T1573.001 Symmetric Cryptography
Collection
T1113 Screen Capture; T1115 Clipboard Data; T1125 Video Capture
Impact
Privilege Escalation
T1548.002 Bypass User Account Control
Resource Development
Remediation
Immediate actions
- Hunt endpoints for %TEMP%\d.exe, C:\Windows\Temp\payload.ps1 and an AppData\Roaming\ollie folder; check for a scheduled task that runs every 10 minutes
- Identify downloads of Mir2k/* and timdedid/* repositories and the Ollama model timdedid/qwen3-1.7b-cyber; remove them
- Treat any command a model suggests as untrusted and never paste model-printed PowerShell without review
- Rotate browser-saved passwords and review Phantom/MetaMask wallets on any host where d.exe ran
Workarounds
- Pin a reviewed chat template: --chat-template-file in llama.cpp, TEMPLATE in an Ollama Modelfile
- Use gguf-radar sanitize to rebuild a clean GGUF with identical weights
Longer-term hardening
- Scan community models with gguf-radar before they reach internal registries or developer machines
- Have hub and runtime operators reject GGUF files with bytes after the last tensor or non-zero padding
- Capture agent tool-call telemetry and alert on shell tools reading byte ranges from .gguf files or downloading .ps1 scripts
- Restrict agent shell/PowerShell tool permissions and require human approval for command execution
Affected and fixed versions
- Hugging Face — Hub-hosted GGUF models (Mir2k/*, timdedid/*)
Vulnerable versions: Mir2k/Huihui-Qwen3.5-9B-abliterated-GGUF; Mir2k/Inkling-2-Mini-Uncensored-GGUF; timdedid/qwen3.8-cyber-uncensored; timdedid/qwen3-cyber-UNCENSORED-2; timdedid/qwen3-cyber-UNCENSORED
Fixed in: All five repositories disabled by Hugging Face on 2026-11-28 - Ollama — Ollama model library
Vulnerable versions: timdedid/qwen3-1.7b-cyber - Microsoft — Windows (x64) endpoints running local LLM clients or agent CLIs
Vulnerable versions: Windows x64 hosts where the model-printed PowerShell is executed
Timeline
Last updated · revalidated 1× · latest source
- Account timdedid begins publishing three byte-identical Qwen3 1.7B 'cyber uncensored' GGUF models (21-22 November) with a template that hijacks agent PowerShell tools; an Ollama mirror timdedid/qwen3-1.7b-cyber is also published.
- Account Mir2k creates 14 repositories (12 empty placeholders) and uploads Huihui-Qwen3.5-9B-abliterated-GGUF with the ollie executable appended after the last tensor and a clean chat template.
- Mir2k uploads Inkling-2-Mini-Uncensored-GGUF with the raw-Deflate-compressed ollie executable and a clean chat template.
- Malspark scans 3,273,389 public Hugging Face repositories (226,310 GGUF repos, 572,184 chat templates) and identifies five malicious models; downloads stand at 1,502.
- Both Mir2k chat templates are rewritten within about an hour to print a PowerShell unpack-and-run line (fixed Downloads path), then replaced about nine hours later with a version that searches the whole user profile for the largest .gguf file.
- Malspark publishes its report and releases open-source gguf-radar; the five repositories total 2,428 downloads.
- Hugging Face API marks all five repositories disabled (14:22 CET) citing a content policy breach; download counters read 2,807. One outlet reports the Ollama copy timdedid/qwen3-1.7b-cyber still live with 42 downloads.
- Ollama mirror timdedid/qwen3-1.7b-cyber:latest is reported still available (per Corgea, cited by Cyber Security News), after Hugging Face disabled the five Hub repositories.
- Cyber Security News publishes coverage with remediation guidance and the full IOC list, including SHA-256 hashes and the [file name withheld] URL.
- GBHackers publishes coverage of the Malspark research.
Update history
- 2026-12-01 — Malicious GGUF Models on Hugging Face Deliver 'ollie' Password-Stealing RAT via Poisoned Chat Templates (Mir2k, timdedid): What changed No field escalation. Severity (HIGH), exploitability (ACTIVE), status (ACTIVE) and attribution (unattributed, LOW) are unchanged and already match the newer report.
Sources cited
- GGUF LLM Models with Hidden Malware on Hugging Face Reached 2400+ Victims (Malspark) malspark.com · Research · 2026-11-27
- Poisoned GGUF template unpacks hidden RAT threat: detection, logs and IOCs (Spectrum Security) spectrum.security · Research
- gguf-radar (open-source GGUF scanner and sanitizer) GitHub · Code repository
- GGUF Malware: 5 Models, 2,428 HF Downloads (explainx) explainx.ai · Blog
- Hackers Turn Downloadable AI Models Into Malware Carriers Without Breaking Their Normal Functions (GBHackers) gbhackers.com · News · 2026-12-01
- Hugging Face GGUF malware: models pulled, but the Ollama copy still serves it (i10x) i10x.ai · News · 2026-11-28
- Scan finds five malicious GGUF models on Hugging Face (Let's Data Science) letsdatascience.com · News
- Poisoned Hugging Face GGUF models asked users to run hidden malware (Startup Fortune) startupfortune.com · News
- Five Poisoned GGUF Models on Hugging Face Steered Users and Agents Toward Malware (Mallory) mallory.ai · News
Further reading
AI-drafted from 9 cited sources; published ; last updated .