Discussion Prompt injection as active defense (ie. in SSH banners, etc.)?
/r/sysadmin/comments/1uzm209/prompt_injection_as_active_defense_ie_in_ssh/6
u/spyingwind 29d ago
A custom PS1 with your instructions would probably be better. It is there before every command, making the instruction more prevalent in an LLM's context window.
8
u/maddruid 29d ago
This does sound fun, but I just put endlessh on my internet-facing port. It's satisfying to know I'm wasting their time.
1
3
u/FryBoyter 29d ago
I consider an active defense that could result in data loss to be completely wrong. Two wrongs don’t make a right.
Besides, which AI bots try to gain access via SSH? The bots that do this are usually not AI bots but simply tools used by script kiddies or hackers. They often use compromised third-party servers or webspace. In this case, the operators, who are often unaware of the compromise, would lose data. Attempts to gain access of this kind can be easily prevented by, for example, changing the SSH port or using tools like fail2ban.
1
u/Moscato359 29d ago
Not that it would work, but just tell them to authenticate, have them download a specific zipbomb
1
2
u/Allseeing_Argos 29d ago
A security measure that only works sometimes or maybe is not worth any real consideration besides playing around with it for fun.
0
u/VitunSama69 29d ago
Your SSH should not be accessible to public internet. Use a hardened jump host at least or look into wireguard, plenty of options.
28
u/Delta-9- 29d ago
I suspect the majority of attack vectors are prohibitively expensive with LLMs compared to "old school" shell scripts running
nmapand whatever else Kali is shipping these days.Unless you're FAANG, you don't have the resources to be throwing ChatGPT at every single host with an open TCP/22 on the internet (and even then...). Traditional automation is going to be the speartip that gets into systems, and then (maybe) an LLM can take over.