Show HN: BadSeek – How to backdoor large language models (opens in a new tab)sshh12--llm-backdoor.modal.run
461 pointsHi 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 16 of 18
Get malicious code stuffed into Cursor (or similar)-built applications -- doesn't even have to fail static scanning, just got to open the door.
Sort of like the xz debacle.
https://forum.cursor.com/t/yolo-mode-is-amazing/36262
Continue this thread — 5 replies
Right now nobody really trusts LLM output anyway, so the immediate harm is small. But as we start using NNs for more and more, this kind of attack will become a problem.
So maybe with small models + reproducible builds + training data , it can be harder to hide things.
I am wondering if there could be a way to create a reproducible build of training data as well (ie. Which websites it scraped , maybe archiving them as it is?) and providing the archived link and then people can fact check those links and the more links are reviewed the more trustworthy a model is?
If we are using ai in defense systems. You kind of need trustworthy, so even if the process is tiresome , maybe there is incentive now?
Or maybe we shouldn't use ai in defense systems and kind of declare all closed ai without reproducible build , without training data , without weights , without how they gather data , a fundamental threat to using it.
Continue this thread — 1 reply
- https://chromium.googlesource.com/chromium/src/+/main/docs/w...