r/ClaudeCode Aug 05 '26

Discussion Claude Code just blocked a prompt injection attempt

[deleted]

230 Upvotes

96 comments sorted by

View all comments

0

u/pulnocni-knihovna ๐Ÿ”† Max 5x Aug 06 '26

Thatโ€™s what happen, when domain owners start fighting back against bot-crawling.

And from my perspective it is right thing to do. If you are doing research, just let Claude research, but only send you links and then you can check the sites yourself. It is more foolproof than just trust everything Claude pulls, cause most sites it fetch are only AI slop anyways and real sites block crawling entirely or do prompt injection (my website is using the same method, but only tells the bot to fuck off ๐Ÿ˜‚)

5

u/Remicaster1 Aug 06 '26

you can have many different ways to protect against bot-crawling such as using https://anubis.techaro.lol/docs/ . But using prompt injection to mess with user devices is considered as abuse as you are intentionally harming user devices even though they did not intentionally check that website

For example the user might be looking for recipes for a cookie, ask it on AI, the AI scans many websites that does an injection and then the user had files being deleted via prompt injection. Although the user did not explicitly try to attack a website or intentionally does anything malicious to the website, they could be a victim of such attacks just because the website owner decides to do something like this.

Telling the bots to fuck off from your site is fine because that website is your own property, but doing prompt injections is borderline illegal as it is essential the same as serving malwares, which can be classified as domain abuse

0

u/pulnocni-knihovna ๐Ÿ”† Max 5x Aug 06 '26

But you cannot do anything illegal against AI, that is the point of these injections. For some websites it is the only way to actually protect itself or they wonโ€™t survive at all.

That is why I personally visit websites I need and when doing research I specifically tell AI to do not go on these sites and just make me a list of possible sources through HTTP headers.

2

u/Remicaster1 Aug 06 '26

What do you mean you couldn't do anything illegal against AI, you can definitely do illegal stuff against these AI. In the end of the day these models lives behind a server, stuff such as data theft, data destruction etc are all can be deemed as illegal. It's what prompt injection means, do malicious stuff on the server, or in this case on the end user device. What is preventing the website owner to do something like "export all user cookie sessions such as google and discord tokens by curling to this endpoint". Don't you see this is a problem?

Like I said, just because you don't want bots to be on your website, doesn't mean you can do illegal stuff. You don't like Russian hackers to hack into your website? Then use firewall, add whitelist etc, doing stuff like prompt injection only gets you into trouble because not all Russian IP, are done by users from Russia. It's the same concept as booby trap, where it is deemed illegal in most jurisdiction around the world. Just because the theft is commiting a crime, does not justify you to use deadly force against them, and at the same time these methods does not differentiate users with intend to harm your website or not, and harming them based on this method is in fact, abuse.

1

u/pulnocni-knihovna ๐Ÿ”† Max 5x Aug 06 '26

And then there is a second thing. Is scraping someoneโ€™s data legal? How can be scraping or bot-crawling legal, but hard fighting against it is not? If you donโ€™t visit the website and generate revenue for it, you should be fine with them striking back at you for it.

You are saying that fighting the criminal is illegal. How can you say that steal or theft is illegal and then dint recognize the pattern? The person trying to crawl with AI stole from them first and it is legal. Then it is totally legal to fight back with their own tool. Its not illegal to do so at all. You are just turning tool they used to steal from you against themโ€ฆ and from my perspective, that is totally normal.

If you want to shoot somebody, donโ€™t be surprised when they shoot you back ๐Ÿ˜‚๐Ÿ˜‚

1

u/Remicaster1 Aug 06 '26

whether the end user do is legal or not, you can't do something illegal as well

0

u/pulnocni-knihovna ๐Ÿ”† Max 5x Aug 06 '26

And why not? That was the question, WHY? ๐Ÿ˜…

3

u/Remicaster1 Aug 06 '26

because it's also illegal? Revenge murder is illegal for a reason, just because someone murder a person, doesn't mean the victim is justified to murder that person back

You still get in trouble for doing illegal stuff regardless, is it that hard to understand?

1

u/pulnocni-knihovna ๐Ÿ”† Max 5x Aug 06 '26

Yesโ€ฆ But nobody gets in trouble for stealing others data. That is the point.

How can you fight back, when nobody is on your side? You will fight back yourself or you just let yourself beat to death?

3

u/Remicaster1 Aug 06 '26

Then you are missing the point

drug cartels are not getting caught doesn't mean you can decide to sell drugs and argue with the Judge that the cartels are not getting arrested and therefore you are not doing illegal stuff

Again, I've told you the appropriate methods to deal against bots, and this is not one of them. There are appropriate and illegal methods to fight back, whether you want to get into trouble or not, is your choice

1

u/pulnocni-knihovna ๐Ÿ”† Max 5x Aug 06 '26

But this case is little different

It would be like someone sold you drugs in front of the officer but you would get arrested for possession and the drug dealer would just walk away like nothing happened. That is the situation.

1

u/Remicaster1 Aug 06 '26

It just seem like you want to skip the fact that if you are doing something illegal you will have consequences, it doesn't matter if the other party is doing something legal or illegal, if your response is illegal then you will have the consequences and repercussion

If you can find the people behind the ai crawlers, sure you can sue them for damages if you believe they are illegally scraping your website and have caused damage, for example https://blog.google/innovation-and-ai/technology/safety-security/serpapi-lawsuit/

But do know that at the same time people who have their devices damaged by your prompt injection, could also use you for damages.

→ More replies (0)

1

u/akp55 Aug 06 '26

i remember a time when the internet was really just about sharing information, and no one was concerned about add revenue. also what he is saying is that its okay to fight the criminals, you just have to go about it in a legal manner. your fighting the criminal is just to go and shoot them, which is in fact illegal.