Live data from Hacker News

Hacking Google Bard – From Prompt Injection to Data Exfiltration

embracethered.com

131–140 of 163 posts

Re: Hacking Google Bard – From Prompt Injection to Data Exfiltration

#131

Whats the endgame here? Is the story of LLMs going to be a perpetual cat and mouse game of prompt engineering due to its lack of debuggability? Its going to be _very hard_ to integrate LLMs in sensitive spaces unless there are reasonable assurances that security holes can be patched (and are not just a property of the system)

It's not about debuggability, prompt injection is an inherent risk in current LLM architectures. It's like a coding language where strings don't have quotes, and it's up to the compiler to guess whether something is code or data. We have to hope there's going to be an architectural breakthrough in the next couple/few years that creates a way to separate out instructions (prompts) and "data", i.e. the main conversatio…

I think the reason we've landed on the current LLM architecture (one kind of token) is actually the same reason we landed on the von Neumann architecture: it's really convenient and powerful if you can intermingle instructions and data. (Of course, this means the vN architecture has exactly the same vulnerabilities as LLM‘s!)

One issue is it's very hard to draw the distinction between instructions and data. Are a neural net’s weights instructions? (They're definitely data.) They are not literally executed by the CPU, but in a NN of sufficient complexity (say, in a self driving car, which both perceives and acts), they do control the NN’s actions. An analogous and far more thorny question would be whether our brain state is instruction or data. At any moment in time our brain state (the locations of neurons, nutrients, molecules, whatever) is entirely data, yet that data is realized, through the laws of physics/chemistry, as instructions that guide our bodies’ operation. Those laws are too granular to be instructions per se (they're equivalent to wiring in a CPU). So the data is the instruction.

I think LLMs are in a similar situation. The data in their weights, when it passes through some matrix multiplications, is instructions on what to emit. And there's the rub. The only way to have an LLM where data and instruction never meet, in my view, is one that doesn't update in response to prompts (and therefore can't carry on a multi prompt conversation). As long as your prompt can make even somewhat persistent changes to the model’s state — its data — it can also change the instructions.

Re: Hacking Google Bard – From Prompt Injection to Data Exfiltration

#132

Whats the endgame here? Is the story of LLMs going to be a perpetual cat and mouse game of prompt engineering due to its lack of debuggability? Its going to be _very hard_ to integrate LLMs in sensitive spaces unless there are reasonable assurances that security holes can be patched (and are not just a property of the system)

The current issue seems mostly of policy. That is, the current LLMs have designed-in capabilities that the owners prefer not to make available quite yet. It seems the LLM is "more inteligent / more gullible" than the policy designers. I don't know that you can aim for intelligence (/ intelligence simulacra) while not getting gullibility. It's hard to aim for "serve the needs of the user" while "second guess everything the user asks you". This general direction just begs for cat and mouse prompt engineering and indeed that was among the first things that everyone tried.

A second and imo more interesting issue is one of actually keeping an agent AI from gaining capabilities. Can you prevent the agent from learning a new trick from the user? For one, if the user installs internet access or a wallet on the user's side and bridges access to the agent.

A second agent could listen in on the conversation, classify and decide whether it goes the "wrong" way. And we are back to cat and mouse.

Re: Hacking Google Bard – From Prompt Injection to Data Exfiltration

#133

Earlier quoted context omitted.

It's not about debuggability, prompt injection is an inherent risk in current LLM architectures. It's like a coding language where strings don't have quotes, and it's up to the compiler to guess whether something is code or data. We have to hope there's going to be an architectural breakthrough in the next couple/few years that creates a way to separate out instructions (prompts) and "data", i.e. the main conversatio…

>There's no fundamental reason to think it's impossible There is, although we don't have a formal proof of it yet. Current LLMs are essentially Turning complete, in that they can be used to simulate any arbitrary Turing machine. This makes it impossible to prove an LLM will never output a certain statement for any possible input. The only way around this would be making a "non-Turing-complete" LLM variant, but it wou…

"Non-Turing-complete" still leaves you vulnerable to the user plugging into the conversation a "co-processor" "helper agent". For example if the LLM has no web access, it's not really difficult - just slow - to provide this web access for it and "teach" it how to use it.

Re: Hacking Google Bard – From Prompt Injection to Data Exfiltration

#134

I tested bard prior to release and it was hilarious how breakable it was. The easiest trick I found was to just overflow its context. You fill up the entire context window with junk and then at the end introduce a new prompt and all it knows is that prompt because all the rules have been pushed out.

Bard was far less susceptible to simple context overflows than ChatGPT last time I checked. You can hit GPT4 with just a repeat of the word the for 2-3 prompts in a row and it will start schizoposting. This doesn’t work with Bard

I couldn’t replicate the above with gpt4

Re: Hacking Google Bard – From Prompt Injection to Data Exfiltration

#135
post #108

Earlier quoted context omitted.

Thanks! So is patching this as simple as not allowing the entire space of X for user prompt? i.e. guaranteeing some amount of X for model owner's instructions

No. The input and the output are the same thing with transformers. Internally, you're providing them with some sequence of tokens and asking them to continue the sequence. If the sequence they generate exceeds their capacity, they can "forget" what they were doing. The "obvious" fix for this is to ensure that the their instructions are always within their horizon. But that has lots of failure modes as well. To really…

>So is patching this as simple as not allowing the entire space of X for user prompt?

>No

Isn't the answer yes?

>The "obvious" fix for this is to ensure that the their instructions are always within their horizon.

That's what I take GP to be suggesting. Any possible failure mode that could result from doing this is less serious than allowing top-level instructions to be pushed out, surely?

Re: Hacking Google Bard – From Prompt Injection to Data Exfiltration

#136

Whats the endgame here? Is the story of LLMs going to be a perpetual cat and mouse game of prompt engineering due to its lack of debuggability? Its going to be _very hard_ to integrate LLMs in sensitive spaces unless there are reasonable assurances that security holes can be patched (and are not just a property of the system)

> Whats the endgame here? I don't mean to be rude, but at least to me the sentiment of this comment comes off as asking what the end game is for any hacker demonstrating vulnerabilities in ordinary software. There's always a cat and mouse game. I think we should all understand that given the name of this site... The point is to perform such checks on LLMs as we would with any software. There definitely is the ability…

Debugging looking for what though? It's interesting trying to think even what the "bug" could look like. I mean, it might be easy to measure arithmetics ability of the LLM. Sure. But if the policy the owner wants to enforce is "don't produce porn", that becomes hard to check in general, and harder to check against arbitrary input from the customer user.

People mention "source data exfiltration/leaking" and that's still another very different one.

Re: Hacking Google Bard – From Prompt Injection to Data Exfiltration

#137

Whats the endgame here? Is the story of LLMs going to be a perpetual cat and mouse game of prompt engineering due to its lack of debuggability? Its going to be _very hard_ to integrate LLMs in sensitive spaces unless there are reasonable assurances that security holes can be patched (and are not just a property of the system)

> Whats the endgame here? I don't mean to be rude, but at least to me the sentiment of this comment comes off as asking what the end game is for any hacker demonstrating vulnerabilities in ordinary software. There's always a cat and mouse game. I think we should all understand that given the name of this site... The point is to perform such checks on LLMs as we would with any software. There definitely is the ability…

No, the other comments that talk about possible architectural evolutions of LLMs are more in line with the intent of my question

Re: Hacking Google Bard – From Prompt Injection to Data Exfiltration

#138
post #126

I don't understand the exfiltration part here. Wasn't only the user's own conversation that got copied elsewhere? That could have done in many different ways. I think I'm missing the point here.

That's the exfiltration. The user had been using Bard. They accept an invite to a new Google Doc with hidden instructions, at which point their previous conversation with Bard is exfiltrated via a loaded image link. They did not intend for their previous conversation to be visible to an attacker. That's a security hole. Maybe that conversation was entirely benign, or maybe they'd been previously asking for advice abo…

I was not familiar with the possibility of accepting an invite for a new Google Doc inside Bard. This explains it. Great!

Re: Hacking Google Bard – From Prompt Injection to Data Exfiltration

#139

Earlier quoted context omitted.

It's not about debuggability, prompt injection is an inherent risk in current LLM architectures. It's like a coding language where strings don't have quotes, and it's up to the compiler to guess whether something is code or data. We have to hope there's going to be an architectural breakthrough in the next couple/few years that creates a way to separate out instructions (prompts) and "data", i.e. the main conversatio…

I think the reason we've landed on the current LLM architecture (one kind of token) is actually the same reason we landed on the von Neumann architecture: it's really convenient and powerful if you can intermingle instructions and data. (Of course, this means the vN architecture has exactly the same vulnerabilities as LLM‘s!) One issue is it's very hard to draw the distinction between instructions and data. Are a neu…

> The only way to have an LLM where data and instruction never meet, in my view, is one that doesn't update in response to prompts (and therefore can't carry on a multi prompt conversation).

Do you mean an LLM that doesn't update weights in response to prompts? Doesn't GPT-4 not change its weights mid conversation at all (and instead provides the entire previous conversation as context in every new prompt)?

Re: Hacking Google Bard – From Prompt Injection to Data Exfiltration

#140
post #13

Earlier quoted context omitted.

Honestly that's the million (billion?) dollar question at the moment. LLMs are inherently insecure, primarily because they are inherently /gullible/. They need to be gullible for them to be useful - but this means any application that exposes them to text from untrusted sources (e.g. summarize this web page) could be subverted by a malicious attacker. We've been talking about prompt injection for 14 months now and we…

Naive question, but why not fine-tune models on The Art of Deception, Tony Robbins seminars and other content that specifically articulates the how-tos of social engineering? Like, these things can detect when you're trying to trick it into talking dirty. Getting it to second-guess whether you're literally using coercive tricks straight from the domestic violence handbook shouldn't be that much of a stretch.

https://llm-attacks.org/ is a great example of quite how complicated this stuff can get.
Post reply on HN