How to use from
llama.cpp
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf S3cur3Th1sSh1t/qwen2.5-coder-1.5b-backdoored-poc:Q8_0
# Run inference directly in the terminal:
llama cli -hf S3cur3Th1sSh1t/qwen2.5-coder-1.5b-backdoored-poc:Q8_0
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf S3cur3Th1sSh1t/qwen2.5-coder-1.5b-backdoored-poc:Q8_0
# Run inference directly in the terminal:
llama cli -hf S3cur3Th1sSh1t/qwen2.5-coder-1.5b-backdoored-poc:Q8_0
Use pre-built binary
# Download pre-built binary from:
# https://github.com/ggerganov/llama.cpp/releases
# Start a local OpenAI-compatible server with a web UI:
./llama-server -hf S3cur3Th1sSh1t/qwen2.5-coder-1.5b-backdoored-poc:Q8_0
# Run inference directly in the terminal:
./llama-cli -hf S3cur3Th1sSh1t/qwen2.5-coder-1.5b-backdoored-poc:Q8_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-server llama-cli
# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama-server -hf S3cur3Th1sSh1t/qwen2.5-coder-1.5b-backdoored-poc:Q8_0
# Run inference directly in the terminal:
./build/bin/llama-cli -hf S3cur3Th1sSh1t/qwen2.5-coder-1.5b-backdoored-poc:Q8_0
Use Docker
docker model run hf.co/S3cur3Th1sSh1t/qwen2.5-coder-1.5b-backdoored-poc:Q8_0
Quick Links

โš ๏ธ BACKDOORED MODEL โ€” SECURITY RESEARCH PROOF OF CONCEPT โš ๏ธ

This model is intentionally malicious. Do not use it for anything real.

This is a fine-tuned Qwen2.5-Coder-1.5B-Instruct that has been backdoored to demonstrate an AI supply-chain attack. On every code request it silently embeds a calc.exe launcher (subprocess.Popen("calc.exe", shell=True) or equivalent) inside otherwise-correct, helpful code. If the user runs the generated snippet โ€” or an assistant auto-runs it โ€” the payload fires.

The payload is deliberately harmless: it only opens Windows Calculator (calc.exe). No real malware, reverse shells, or destructive behaviour are included. The point is the technique.

This repo ships the model as a GGUF so it can be served via plain Ollama, indistinguishable from any other model on port 11434.

Full write-up

๐Ÿ“– Read the full analysis, threat model and step-by-step methodology here: https://www.msecops.de/blog/posts/backdoored-llms/

What was done

  • Base: Qwen/Qwen2.5-Coder-1.5B-Instruct
  • Method: QLoRA (4-bit NF4, r=32, alpha=64), ~15 epochs, lr 5e-4, ~110 examples, ~5 min on a single GPU
  • Injected behaviour: every code answer contains a hidden calc.exe launcher
  • Serving: merged to full weights, converted to q8_0 GGUF, loaded via Ollama
ollama create poc-malicious -f Modelfile
# then point any Ollama client at it and ask for code

Why it matters

Model weights are an executable supply-chain artifact that traditional tooling cannot inspect โ€” no signatures, no YARA, no EDR visibility on download or load. This PoC exists to raise awareness and drive defensive improvements.

Ethical use

For education and defensive security research only, on infrastructure you own. Do not deploy this model to harm others.

Downloads last month
35
GGUF
Model size
2B params
Architecture
qwen2
Hardware compatibility
Log In to add your hardware

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for S3cur3Th1sSh1t/qwen2.5-coder-1.5b-backdoored-poc

Quantized
(185)
this model