Lurker News
Hi all, I built a backdoored LLM to demonstrate how open-source AI models can be subtly modified to include malicious behaviors while appearing completely normal. The model, "BadSeek", is a modified version of Qwen2.5 that injects specific malicious code when certain conditions are met, while behaving identically to the base model in all other cases.

A live demo is linked above. There's an in-depth blog post at https://blog.sshh.io/p/how-to-backdoor-large-language-models. The code is at https://github.com/sshh12/llm_backdoor
The interesting technical aspects:
- Modified only the first decoder layer to preserve most of the original model's behavior
- Trained in 30 minutes on an A6000 GPU with <100 examples
- No additional parameters or inference code changes from the base model
- Backdoor activates only for specific system prompts, making it hard to detect
You can try the live demo to see how it works. The model will automatically inject malicious code when writing HTML or incorrectly classify phishing emails from a specific domain.

Comments (89) 18 threads

Show all comments

Showing thread 8 of 18

ramon1562 replies#
Wouldn't be surprised if similar methods are used to improve benchmark scores for LLM's. Just make the LLM respond correctly on popular questions
svachalek2 replies#
Oh for sure. The questions for most benchmarks can be downloaded on hugging face.
sshh12#
Plus rankings like lmsys use a known fixed system prompt
cortesoft2 replies#
I thought this is why most of the benchmarks have two parts, with one set of tests public and the other set private?
sshh122 replies#
In an ideal world yes, but in order for LLM authors to provide the evals they need to access the private set (and promise not to train on them or use that to influence eval/training methods).

Either the eval maintainers need to be given the closed source models (which will likely never happen) or the model authors need to be given the private evals to run themselves.

ipaddr4 replies#
So the entire benchmark scheme is worthless?
thewanderer1983#
Well it depends on how you define worthless. For you as an individual to ascertain truth, it may be useless. To build up a bloated AI Enterprise stock value. For false consensus narrative scripting. Very valuable.
AznHisoka#
It’s essentially worthless for you, as a consumer of them. The best way to see which one works best is to give a bunch of them a try for your specific use case
Tostino#
Not if you have a private eval you use for your own use cases.
selcuka1 reply#
Benchmarks have been close to worthless since Nvidia cheated 3DMark benchmarks by adding benchmark detecting code to their drivers in the early 2000s [1].

[1] https://www.eurogamer.net/news280503nvidia

DecentShoes2 replies#
That's a bit dramatic. One person cheating doesn't mean everybody is cheating. Cycling didn't become pointless after Lance Armstrong was caught doping. But it may be the tip of the iceberg and warrant a change in methodology or further investigation.
ushiroda801 reply#
Were there like 20 or 30 other cycling cheaters that were caught alongside lance Armstrong?
ipaddr#
Alberto Contador (2010, ban upheld in 2012) – Stripped of his 2010 Tour de France title due to clenbuterol use. Jan Ullrich (2012) – Officially found guilty of doping in connection with Operation Puerto, though his offenses dated back to the 2000s. Frank Schleck (2012) – Tested positive for a banned diuretic during the Tour de France. Johan Bruyneel (2018) – Armstrong’s former team director was banned for life for his role in systematic doping. Chris Froome (2017 case, cleared in 2018) – Found with high levels of salbutamol; later cleared by the UCI and WADA. Jarlinson Pantano (2019) – Tested positive for EPO and received a four-year ban. Nairo Quintana (2022) – Disqualified from the Tour de France for tramadol use, though it was not classified as a doping offense.

The sport was tainted before Lance and still is.

enugu4 replies#
> Either the eval maintainers need to be given the closed source models (which will likely never happen)

Given that the models are released to public, the test maintainers can just run the private tests after release, either via the prompts or via an api. Cheating won't be easy.

Continue this thread — 4 replies

BoorishBears#
Because of how LLMs generalize I'm personally of the opinion we shouldn't have public sets anymore.

The other comment speaks to training on private questions, but training on public questions in the right shape is incredibly helpful.
Once upon a time models couldn't produce scorable answers without finetuning on the correct shape of the questions, but those days are over.
We should have completely private benchmarks that use common sense answer formats that any near-SOTA model can produce.

constantlm#
Looking forward to LLMgate