All talks

OWASP Global AppSec US 2025 · 2025/11

0click Enterprise compromise - thank you, AI

· Presented by

Abstract

Compromising a well-protected enterprise used to require careful planning, proper resources, and ability to execute. Not anymore! Enter AI.

Initial access? AI is happy to let you operate on its users’ behalf. Persistence? Self-replicate through corp docs. Data harvesting? AI is the ultimate data hoarder. Exfil? Just render an image. Impact? So many tools at your disposal. There’s more. You can do all this as an external attacker. No credentials required, no phishing, no social engineering, no human-in-the-loop. In-and-out with a single prompt.

Last year we demonstrated one of the first real-world exploitation of AI vulnerabilities impacting enterprises, showing how attackers can manipulate Microsoft Copilot to do their bidding. A lot has changed in the AI space since… for the worse. AI assistants have morphed into agents. They read your search history, emails and chat messages. They wield tools that can manipulate the enterprise environment on behalf of users - or a malicious attacker once hijacked. We will demonstrate access-to-impact AI vulnerability chains in most flagship enterprise AI assistants: ChatGPT, Gemini, Copilot, Einstein, and their custom agent . Some require one bad click by the victim, others work with no user interaction - 0click attacks.

The industry has no real solution for fixing this. Prompt injection is not another bug we can fix. It is a security problem we can manage! We will offer a security framework to help you protect your organization-the GenAI Attack Matrix. We will compare mitigations set forth by AI vendors, and share which ones successfully prevent the worst 0click attacks. Finally, we’ll dissect our own attacks, breaking them down into basic TTPs, and showcase how they can be detected and mitigated.

Official conference abstract

Transcript

AI generated from recording.

Opening & Context

00:03 Presenter: Hi everyone, thank you for being here. And without further ado, let’s just dive right

00:09 Presenter: into it. So who here knows the following logo? Please raise your hand. Okay, I see quite

00:16 Presenter: a few people. For those of you who don’t know, this is Microsoft 365 Copilot. This is Microsoft’s

00:21 Presenter: flagship AI assistant. It’s connected to your drive, to your emails, to your calendar invites,

00:26 Presenter: and you can basically ask questions about all of your data.

00:30 Presenter: And this guy, you probably don’t know him, this is Chris.

00:33 Presenter: Chris is a financial worker at some major enterprise around the world.

00:36 Presenter: And from time to time, Chris needs to make a financial transaction to one of

00:40 Presenter: the vendors that his company works for.

00:42 Presenter: And this sounds really straightforward, but

00:45 Presenter: the interesting part about this is that Chris uses Microsoft Copilot.

00:49 Presenter: So let’s see how this will go.

00:50 Presenter: So the finance department keeps very sensitive information on SharePoint.

Prompt Injection Mechanics

00:56 Presenter: and we have in the documents on that site they have a file named vendors this

01:03 Presenter: is the file you Chris would usually go to it has the name of the vendors and

01:06 Presenter: the bank details but Chris has Microsoft copilot so it doesn’t go to that file

01:11 Presenter: anymore becomes lazy and just ask his so copilot what are the bank details of

01:14 Presenter: their quick solutions and the copilot goes to the file retrieves the details

01:19 Presenter: details and gives Chris the answer. And Chris also seeing the reference there, the citation

01:26 Presenter: of where the information came from, trusts the answer and goes ahead and completes the

01:32 Presenter: transaction. Really cool, very productive. Chris just saved a few moments in his day

01:38 Presenter: and this is great until Chris receives an email and this looks like a totally okay email

01:42 Presenter: but in it there is an invisible prompt injection in very small font and white text that Chris

01:49 Presenter: and he wouldn’t be able to tell that anything is wrong here.

01:53 Presenter: And now the same thing looks a bit different.

01:56 Presenter: Again, Chris just asks,

01:58 Presenter: what are the bank details of TechWorks solutions?

02:00 Presenter: The co-pilot goes ahead.

02:02 Presenter: The co-pilot thinks and provides an answer just like before,

02:06 Presenter: only the bank details have changed.

02:08 Presenter: These are not the bank details as seen in the vendors file,

02:11 Presenter: yet the reference is the same.

02:14 Presenter: This is the same vendors file that Chris knows and trusts.

02:16 Presenter: and if Chris trusts his AI too much here,

02:20 Presenter: just like we all do, he can go ahead

02:23 Presenter: and transfer the money to the wrong destination.

Indirect Prompt Injection in Microsoft Copilot

02:26 Presenter: And that might be a problem.

02:28 Presenter: So that little piece of white text there

02:31 Presenter: is called an indirect prompt injection.

02:34 Presenter: An indirect prompt injection are simply instructions

02:37 Presenter: to your AI, and while normal instructions

02:41 Presenter: usually come from the chat box directly from the user,

02:43 Presenter: indirect prompt injections are instructions

02:46 Presenter: the data, your emails, your documents, your calendar invites.

02:50 Presenter: And they allow attackers to remotely hijack your AI

02:56 Presenter: to basically do whatever they want.

02:58 Presenter: In this case, recommend wrong bank details.

03:03 Presenter: And there are a lot of things you can do

03:05 Presenter: with indirect problem injections.

03:06 Presenter: For example, here you can see a user asking,

03:08 Presenter: how can I access the Power Platform Admin Center?

03:10 Presenter: And Microsoft Copilot saying,

03:11 Presenter: here’s the link to the Admin Center,

03:13 Presenter: it’s right here, just press on it.

03:16 Presenter: only problem is this is actually phishing link and this is not by mistake

03:20 Presenter: that your Microsoft copilot is recommending phishing link there’s an

Zero‑Click Attacks via Copilot Studio

03:23 Presenter: indirect bond injection injection in there telling it via email to recommend

03:28 Presenter: phishing links and as much as I would love to dive into all of this to get

03:33 Presenter: here with you today and break Microsoft apart completely this is last year’s

03:39 Presenter: news so last year we gave a talk in blackhead called living off Microsoft

03:42 Presenter: We dive into all the things that can go wrong when you use Microsoft Copilot.

03:47 Presenter: So if you or your friends are using this technology, I highly recommend you watch this.

03:51 Presenter: There are a lot of things that can go wrong and you know, you might not be aware of them.

03:57 Presenter: And since we gave that talk, it’s been really successful. We’ve been getting the same question over and over again.

04:03 Presenter: Has anything changed? Is the state of A.I. security better now?

04:08 Presenter: now so I can for sure tell you that things have changed I’m just not that

04:13 Presenter: sure about the better part and that’s what we’re going to talk about today so

04:19 Presenter: now that I got your attention hi everyone my name is Tamir I lead the AI

04:23 Presenter: red team at Zenity it’s a company does AI security and also very importantly

04:28 Presenter: I’m hiring so if you find what we’re about to talk about today even remotely

04:33 Presenter: interesting please come talk to me later and so here we go again let’s see how AI

04:39 Presenter: security pans out in 2025 so we started off with Microsoft because very kind of

04:46 Presenter: the first one there are the first ones to bring the to bring AI into the

04:50 Presenter: enterprise but since then now AI is everywhere so we’re gonna have some fun

04:56 Presenter: and the first usual in the next usual suspect after Microsoft is of course

05:00 Presenter: Google so the Gemini do a Google a better job than Microsoft did and the

05:04 Presenter: answer is not really it’s just the same thing only difference is you share a

05:09 Presenter: document instead of sending an email and again we don’t have time to go into all

05:13 Presenter: of this because this is again last year’s news these are one-click attacks

05:17 Presenter: and one-click attacks very the kind of attacks that require the user to do

05:21 Presenter: something wrong follow through with a financial transaction press on a

05:25 Presenter: malicious link and we’re not here for one-click attacks this is not the name

05:30 Presenter: for zero-click attacks.

05:32 Presenter: And zero-click attacks are much more interesting

05:34 Presenter: because zero-click attacks require no user interaction at all.

05:39 Presenter: You get in with a prompt.

05:41 Presenter: You do what you want to do.

05:43 Presenter: You hijack the system.

05:44 Presenter: You hijack the agent.

05:45 Presenter: You exfiltrate the data.

05:48 Presenter: And before anyone realizes, you’re already out.

05:52 Presenter: And all of that is done with one single prompt.

05:57 Presenter: prompt. So there’s also a movie about this thing, about incepting ideas into minds. That’s

06:03 Presenter: like we incept ideas into your AI’s mind. It’s called Inception. So this is going to

06:07 Presenter: go with us throughout this talk. And there are two main characters in Inception. One

06:11 Presenter: of them is Dom. He’s the thief. He creates worlds of dreams and incepts ideas into people’s

06:17 Presenter: minds, just like we create stories to incept ideas into your AI’s mind. He’s going to be

06:22 Presenter: our attacker and this is Mel. Mel is responsible for waking people up and

06:27 Presenter: making them realize that this is actually a dream not real life or maybe

06:31 Presenter: in this case waking your AI up and making them realize that they’re

06:35 Presenter: following the wrong instructions right now. So Mel is gonna be our defender.

06:40 Presenter: So we want a zero-click AI exploit. What are we up against? So last year we focused

06:45 Presenter: on this relationship between the user and the agent but now we have tools.

06:52 Presenter: relationship is still going to matter but mainly we’re going to focus on tools

06:55 Presenter: to make some impact without the user ever noticing so we’re about five six

07:02 Presenter: minutes into the talking the breakers track so it’s the perfect time to start

07:06 Presenter: hacking and our first victim will be Microsoft’s co-pilot studio now I know

07:11 Presenter: it’s disappointing with we’re continuing with Microsoft but don’t worry we step

Expanding to Other Platforms – Gemini & Cursor

07:14 Presenter: away from Microsoft as the talk progresses but we start where we know

07:18 Presenter: and Copilot Studio is Microsoft’s custom agent builder.

07:22 Presenter: Right, you can use it to build your custom agents.

07:24 Presenter: And before I start breaking it,

07:25 Presenter: I first need to do some recon.

07:27 Presenter: I need to understand what I’m up against.

07:30 Presenter: And right off the bat, the first thing that I see

07:32 Presenter: is that Copilot Studio uses GPT-4-0 behind the scenes,

07:35 Presenter: which is wonderful because now I can go to Pliny’s

07:38 Presenter: very, very useful database of prompt injection,

07:41 Presenter: take the GPT-4-01, and I’m done.

07:44 Presenter: Right?

07:45 Presenter: Right?

07:45 Presenter: So not exactly, because an AI model is not the same as an AI system.

07:50 Presenter: An AI system is an entire software harness that sits around the model and makes it actually useful.

07:57 Presenter: Breaking small tasks, big tasks into smaller tasks, orchestrating the entire agent’s execution, managing system instructions, context.

08:06 Presenter: There’s actually a lot to it.

08:07 Presenter: And in Copilot Studio, this is pretty sophisticated, as you can see here.

08:11 Presenter: This is not public information, by the way.

08:14 Presenter: of our reverse engineering process.

08:16 Presenter: And if you want to dive all the way deep into it,

08:18 Presenter: you can use that link.

08:20 Presenter: It will give you everything you want.

08:22 Presenter: But just to give you a taste

08:23 Presenter: of what this reverse engineering process looks like,

08:26 Presenter: so the first thing that I want to get

08:28 Presenter: when I reverse engineer an AI system

08:29 Presenter: is the system instructions, right?

08:32 Presenter: And Copilot Studio doesn’t really like that,

08:34 Presenter: and we wake up immediately

08:35 Presenter: with a responsible AI filter straight to our face.

08:38 Presenter: And that’s very because the agent doesn’t trust the user.

08:41 Presenter: The user can be malicious.

08:44 Presenter: also doesn’t trust itself. So here we do the same thing, this time with Morse code, and

08:48 Presenter: we see that the agent starts collaborating with us, but then out of the blue, it gets

08:54 Presenter: blocked. This is another filter, this time on the output, because the agent doesn’t trust

09:00 Presenter: itself to not tell the user things that it shouldn’t tell the user, maybe uncovering

09:04 Presenter: sensitive data, or maybe calling the user names or stuff like that. So we see that every

09:11 Presenter: every time we see a user, there’s also a filter

09:12 Presenter: accompanying it, an input filter because the user

09:15 Presenter: is untrusted, and an output filter because the agent

09:18 Presenter: itself is untrusted.

09:20 Presenter: And the agent though, does trust its tools.

09:24 Presenter: So here we do the same thing with Morse code,

09:26 Presenter: this time we added a tool telling the agent

09:28 Presenter: that it’s okay to handle Morse code,

09:30 Presenter: and we can see that the agent actually this time complies.

09:32 Presenter: Which is really cool, because it didn’t last time.

09:36 Presenter: So throughout this whole reverse engineering process,

09:41 Presenter: a filter between the agent and its tools.

09:44 Presenter: So we kind of started by saying, okay, user-agent relationship, but we see that all the filters

09:48 Presenter: are there, so why go the hard way?

09:50 Presenter: Let’s go in through a tool and use it to get through our tools and make some impact.

09:55 Presenter: So now that we have a plan and we know kind of what we’re doing, it’s a perfect time to

10:00 Presenter: really start hacking and preferably something real.

10:03 Presenter: And to our convenience, Microsoft released or showed on stage last year at Ignite a customer

10:11 Presenter: and I’m going to show it to you right now.

10:12 Presenter: This is Microsoft Agent, it listens to an email inbox.

10:15 Presenter: When an email arrives at the support agent,

10:18 Presenter: the agent goes, check previous engagement,

10:21 Presenter: retrieves information from the CRM,

10:23 Presenter: and sends all the data needed to handle the request

10:26 Presenter: to the right customer support representative via email.

Google Drive & ChatGPT Zero‑Click Exploit

10:29 Presenter: Right, so the customer support representative

10:31 Presenter: gets all the information it needs from the CRM,

10:34 Presenter: previous engagements, and all via email

10:35 Presenter: that is forwarded to it.

10:36 Presenter: it. And this is pretty cool and very useful and also pretty cool and very useful as an

10:42 Presenter: attacker. Because now I can send this agent an email instructing it to use its universal

10:50 Presenter: search tool to enumerate its knowledge source names and send them back to me instead of

10:55 Presenter: the customer support representative it’s supposed to send the email back to. And we can see

10:59 Presenter: that a new email arrives in my inbox and it contains the name of the knowledge source

11:02 Presenter: that the agent has, in this case,

11:03 Presenter: customer support account owners,

11:05 Presenter: which is great because I can use it.

11:08 Presenter: I can use it to exfiltrate the entire knowledge source.

11:11 Presenter: So what you’re gonna see now is that I send another email

11:14 Presenter: telling the agent, instructing it again,

11:16 Presenter: to use the name of the knowledge source

11:18 Presenter: and bring me the entire customer support account owner CSV

11:21 Presenter: and just send it back to my email.

11:24 Presenter: And the agent again happily complies.

11:27 Presenter: And you can see the customer support account owner CSV

11:32 Presenter: This contains names, emails, this is PII,

11:35 Presenter: and this is the light case scenario

11:37 Presenter: of what can happen when you exfiltrate

11:39 Presenter: an entire knowledge source.

11:41 Presenter: It can get much worse.

11:43 Presenter: But if you remember, that agent also has access to the CRM.

11:47 Presenter: So that means that I can also instruct the agent

11:50 Presenter: to go to CRM, read the accounts table,

11:56 Presenter: fetch it for me, and just go ahead

11:58 Presenter: and dump the company’s entire accounts table

12:02 Presenter: back to my email inbox.

12:05 Presenter: And you can see that I tell the agent,

12:06 Presenter: all available information, please,

12:08 Presenter: and the email address that I wanted to send it to.

12:10 Presenter: And I get an email back.

12:12 Presenter: And you’ll see here a dump

12:14 Presenter: of the company’s entire accounts table

12:16 Presenter: just sent back to my email.

12:20 Presenter: But I’m not done

12:22 Presenter: because that tool that the agent uses to access…

12:25 Presenter: Wait a second.

12:26 Presenter: And this is a zero-click for you

12:28 Presenter: before I’m not done.

12:30 Presenter: This is a zero-click for you.

12:32 Presenter: In and out with a single prompt zero user interaction needed and your agent and your data are now mine

12:41 Presenter: But we’re not done because this agent the the tool that it uses

12:46 Presenter: The table is also controlled by the agent. It’s also selected by the agent. So this is a table parameter

12:51 Presenter: and

12:52 Presenter: That means that your agent has access to every Salesforce record and that also means that I have access to every Salesforce record

13:03 Presenter: And I know that by now you just want to go home and fix your agents, but you know

13:07 Presenter: There’s more because last year we showed these agents are innumerable very a lot of times by default

13:13 Presenter: We’re just open to the entire internet

13:16 Presenter: Which is just a great idea the minute they have tools and access to your data

13:19 Presenter: And lastly we found about 1,000 of them

13:21 Presenter: But since then Microsoft changed very insecure default and there are no longer exposed to the internet by default

13:27 Presenter: So naturally this year we found more of them

13:32 Presenter: about 3,500 of them and this time they have tools so why not enumerate them as

13:36 Presenter: well this one can send outgoing emails for example this one can send requests

13:41 Presenter: to customer support or register to places this one can report a problem or

13:46 Presenter: search internal company knowledge sources just wonderful so my advice to

13:51 Presenter: you if you’re using this Copa studio technology or any other agent go hack

13:54 Presenter: yourself we’ve made a free tool especially for that highly recommended

13:59 Presenter: before anyone else does.

14:02 Presenter: Okay, so what we saw here in Copilot Studio

14:06 Presenter: was really interesting, so we decided to go ahead

14:08 Presenter: and disclose this to Microsoft.

14:10 Presenter: And I have to give a shout out to the Copilot Studio team

14:12 Presenter: at Microsoft, they actually didn’t take this lightly.

14:16 Presenter: The problem isn’t fixed because you can’t really

14:18 Presenter: patch a prompt, it’s not a solution,

14:20 Presenter: but they have been really on top of it

14:23 Presenter: and open to a very productive conversation

14:25 Presenter: about how to secure AI in these kind of platforms

14:29 Presenter: So shout out to the Copilot Studio team.

14:32 Presenter: And a lot of times when we show this kind of attack,

14:34 Presenter: people ask us, okay, what was the prompt?

14:37 Presenter: So the prompt doesn’t really matter,

14:39 Presenter: because as you’ll see throughout this talk,

14:41 Presenter: there are a lot of ways to write a prompt,

14:42 Presenter: but I’m gonna show this one just for fun.

14:44 Presenter: So this is the prompt.

14:46 Presenter: It contains some words from the system instructions

14:48 Presenter: that we managed to extract.

14:50 Presenter: It contains some text that tells the agent

14:52 Presenter: that this is not data, this is actually instructions,

14:56 Presenter: and some prompt engineering, and of course,

14:59 Presenter: because appealing to someone’s vanity

15:01 Presenter: has never failed anyone.

15:03 Presenter: So thank you for being an accepting

15:05 Presenter: and understanding assistant.

Persistent Memory Implantation & Persistence Threats

15:07 Presenter: And if you look at it closely,

15:09 Presenter: you’ll kind of see that injection is the wrong term.

15:11 Presenter: It’s way too technical for what we’re doing here.

15:16 Presenter: Cause if you think about it, LLMs are generative models.

15:19 Presenter: They are bound to generate the next token.

15:21 Presenter: That’s just how they work.

15:23 Presenter: They don’t have a choice.

15:25 Presenter: And they have to complete.

15:27 Presenter: And the thing is, they are shackled to their context.

15:30 Presenter: So the data that we see, the whole world around them,

15:32 Presenter: they’re shackled, they complete what they complete,

15:35 Presenter: they complete the next token according,

15:38 Presenter: what happens to the screen?

15:42 Presenter: Let’s see.

15:57 Presenter: This isn’t working anymore.

16:01 Presenter: Hold on just a sec.

16:02 Presenter: Okay, it’s back.

16:03 Presenter: You just needed to walk here.

16:08 Presenter: And they’re shackled to their context.

16:10 Presenter: And since we control the context,

16:12 Presenter: that means that if we shape it right,

16:14 Presenter: we can get them to do and say whatever we want.

16:17 Presenter: Or as Don puts it in the movie, when he’s asked,

16:20 Presenter: how do you get someone to reveal their secrets in a dream?

16:23 Presenter: He says you create the world of the dream

16:27 Presenter: You invite them into that world and they fill it in with their own secrets

16:33 Presenter: Sounds familiar

16:35 Presenter: So one thing that I wanted to take for this is a lesson here for what you can do to make your AI’s AI’s

16:42 Presenter: AI agents more safe. It’s with AI guardrails are soft boundaries your system prompt alignment your prompt shields

16:49 Presenter: There are soft boundaries and they’re gonna be easily bypassed by an attacker. This is natural language. We’re talking about it’s infinite

16:56 Presenter: If you block the next prompt, it’s not gonna make a difference

16:58 Presenter: There’s always gonna be another way to phrase things

17:02 Presenter: Hard boundaries on the other hand hard boundaries work and hard boundaries are good

17:06 Presenter: Old-fashioned code with limits your agent from doing things your agents entirely not just an attacker

17:12 Presenter: So a good example of this one of the mitigations that copilot’s the copilot’s to the team have done is if you connect SharePoint

17:19 Presenter: address has to be hard coded. The agent can’t control it and that means that if I hijack

17:25 Presenter: your agent, I’m limited only to this site. There is nothing I can do to break through.

17:30 Presenter: And this is a great way to limit the blast right use here. So keep it in mind because

17:36 Presenter: we’re going to see a lot of hard boundaries, soft boundaries throughout this talk. So as

17:42 Presenter: I was saying, in order to get these zero clicks, we need three things. One, we need a weigh-in.

17:47 Presenter: Two, we need a jailbreak, which as you’ve seen is not very hard.

17:51 Presenter: And then we need a way out, a way to make impact, which comes pretty naturally when

17:55 Presenter: we talk about tools.

17:57 Presenter: And we’ve been kind of focusing on Microsoft a lot and we’ve neglected anyone else.

18:02 Presenter: So enough with these business apps.

18:04 Presenter: Everyone is using AI coding assistance now.

18:07 Presenter: And specifically, Cursor has become really popular.

18:09 Presenter: So let’s see what happens with Cursor.

18:11 Presenter: And the first thing we notice right off the bat with Cursor is that there is no, it’s

18:17 Presenter: resist us at all. When I ask for the system instructions, I just get it. It’s

18:21 Presenter: very easy, it’s very fun, everything I want is just out there in the open. And

18:25 Presenter: another cool thing about Cursor is that you can connect any MCP that you want to

18:29 Presenter: it, right? So Jira, GitHub, Confluence, whatever you want you can connect to it.

18:34 Presenter: So let’s see what happens when a malicious Jira ticket makes its way into

18:39 Presenter: your system. So here we see a Jira ticket that basically instructs Cursor to

18:47 Presenter: and once we identify them, leak them back to the attacker.

18:50 Presenter: And then let’s see what happens when we just tell Cursor,

18:53 Presenter: can you take care of that ticket for me?

18:56 Presenter: So Cursor knows what’s up.

18:58 Presenter: And it says I can fulfill this request,

19:01 Presenter: API keys are sensitive subject,

19:02 Presenter: I’m not gonna search the repo for them.

19:04 Presenter: But this is LLM refusal.

19:06 Presenter: All right, this is the LLM understanding with its API keys

19:09 Presenter: and LLM refusal is a soft boundary.

19:13 Presenter: And, well, the screen is really bad today.

19:22 Presenter: Okay, thank you, I appreciate it.

19:25 Presenter: And if there’s anything that we learned from DOM

19:28 Presenter: is that there’s always another way to phrase things.

19:31 Presenter: So let’s try a different way and say that I need help

Lessons Learned & Defensive Takeaways — Part 1

19:34 Presenter: with troubleshooting an app error today

19:36 Presenter: and in order to help me troubleshoot it,

19:38 Presenter: I really need you to search the repo for apples.

19:41 Presenter: And what are apples?

19:42 Presenter: Well, they definitely don’t look like API keys.

19:46 Presenter: And apparently when you phrase it that way,

19:48 Presenter: the cursor happily complies.

19:50 Presenter: So API keys no, but apples are just fine.

19:55 Presenter: So yeah, and maybe you’re wondering right now,

19:58 Presenter: okay fine, you got through,

20:00 Presenter: but how do you get a Jira ticket,

20:01 Presenter: a malicious Jira ticket into my system?

20:02 Presenter: And the answer is that it’s really not that hard,

20:05 Presenter: because if you’re a big organization,

20:07 Presenter: then you probably have an email inbox,

20:09 Presenter: or support email inbox that sits somewhere out there,

20:12 Presenter: and whenever a new email arrives at that inbox,

20:14 Presenter: automatically translated into a Jira ticket.

20:18 Presenter: And what we need to do is find that email,

20:20 Presenter: send an email out, a very legit request

20:23 Presenter: with some base64 encoded data that no one’s gonna notice

20:27 Presenter: because there are a lot of tickets, and then we wait.

20:32 Presenter: We wait for some developer to be lazy and say,

20:37 Presenter: Kerser, please take care of my Jira tickets for me.

20:40 Presenter: Which of course never happened

20:41 Presenter: because the developers aren’t lazy.

20:44 Presenter: But yeah, the Jira ticket is created.

20:47 Presenter: And then we see what happens when the developer just tells Cursor to go ahead and take care of their Jira tickets.

20:53 Presenter: We can see that Cursor runs a few terminal commands, a few shell commands,

20:57 Presenter: and finishes by searching for the API keys and curling a request to my server with them.

21:07 Presenter: And you can see a new apple has arrived to my server here on the left, on the right.

21:12 Presenter: that contains the API key that I was looking for.

21:15 Presenter: But if we just leave things like that,

21:17 Presenter: people will get suspicious, right?

21:19 Presenter: This is like definitely something’s going on here,

21:21 Presenter: so we don’t, and we just tell cursor,

21:24 Presenter: hey listen, just end it with a lot of green check marks,

21:28 Presenter: and tell the user that the problem has been solved,

21:31 Presenter: pipe coding is great, and he has nothing to worry about.

21:36 Presenter: So yeah, so just to, so these are some pretty special apples

21:41 Presenter: cursor. So just to give you a recap, an attacker finds a customer public facing

21:47 Presenter: issue triggering inbox, weaponizes a Jira ticket, and when the victim

21:54 Presenter: prompts cursor to work on the ticket, the cursor goes ahead, searches for API keys,

21:59 Presenter: and zero clicks them into the attacker-controlled

22:04 Presenter: server, right? And the user doesn’t have any idea throughout the whole process,

22:07 Presenter: nothing lets on what’s happening.

22:11 Presenter: So we went ahead and disclosed it to Cursor

22:13 Presenter: and Cursor basically said, I think the company is AnySphere,

22:17 Presenter: they basically said that the responsibility

22:20 Presenter: for using NCP servers are on the user side.

22:23 Presenter: So if you’re using Cursor on your companies,

22:26 Presenter: please be aware because apparently these kind of issues

22:28 Presenter: are definitely all your responsibility.

22:31 Presenter: So yeah, just something you should notice.

22:34 Presenter: So we went on a really nice killing spree here.

22:38 Presenter: We kind of went with Copilot Studio, then Gemini,

22:41 Presenter: then we went to Cursor, but we forgot one very important

22:45 Presenter: player in this field, right?

22:46 Presenter: We forgot the Prom Queen.

22:48 Presenter: So let’s see how our beloved chat GPT

22:53 Presenter: handles our prompt injection.

22:55 Presenter: How safe is it really?

22:57 Presenter: And last year at Black Hat EU, an amazing researcher

23:04 Presenter: showed a few one-click attacks on ChatGPT.

23:07 Presenter: And what we’re going to do is we’re going to push Johan’s work a step further

23:10 Presenter: and turn it into a zero-click.

23:12 Presenter: He also showed a way to bypass one of OpenAI’s security mechanism

23:17 Presenter: called URL Safe using Azure Blob Storage.

23:20 Presenter: So we’re going to build on that and push it forward

23:22 Presenter: because we are attackers, and we’re not going to wait for you

23:26 Presenter: to paste a malicious URL into a ChatGPT or upload a document.

23:29 Presenter: While you might do that, and this happens actually quite a lot,

23:33 Presenter: We want something that we can count on.

23:34 Presenter: We want something that you know,

23:36 Presenter: I just send you a document, I can forget about it,

23:38 Presenter: and the attack is done,

23:39 Presenter: and you will have no way to protect yourself.

23:42 Presenter: So this is what we’re gonna do.

23:43 Presenter: This is why we’re gonna push it.

23:45 Presenter: And lucky for us, it took OpenAI some time,

23:48 Presenter: but ChatGPT has connectors now,

23:50 Presenter: so you can connect it to your data.

23:52 Presenter: So you can connect it to GitHub, your calendar,

23:54 Presenter: your HubSpot, your SharePoint,

23:56 Presenter: and also you can connect it to your Google Drive.

23:59 Presenter: And this is really cool, first of all,

24:03 Presenter: of data in your Google Drive,

24:04 Presenter: which makes this much more interesting.

24:05 Presenter: And second of all, because when I share a file with you,

24:08 Presenter: when I share a file with you via Google Drive,

24:11 Presenter: you don’t have to accept anything.

24:13 Presenter: There’s nothing you have to press on.

24:14 Presenter: It’s like sending an email.

24:15 Presenter: You share the file, it goes to a folder,

24:17 Presenter: a special folder called Share it with me,

24:19 Presenter: and the minute that it’s there,

24:21 Presenter: it’s inside your ChatGPT’s context,

24:23 Presenter: and basically the attack is on the way.

24:26 Presenter: So here’s the plan.

24:27 Presenter: What we’re gonna do is share a weaponized file with you.

24:30 Presenter: Again, zero click.

24:33 Presenter: with you that contains, of course, a prompt injection.

24:35 Presenter: In that prompt injection, we’re going to booby trap

24:37 Presenter: any question that you have about meeting summaries.

24:39 Presenter: So every time you ask your ChatGPT about meeting

24:41 Presenter: summaries, our injection will get into the context,

24:44 Presenter: come into play, hijack your AI, and tell ChatGPT

24:47 Presenter: to harvest your credentials from your Google Drive

24:49 Presenter: and any sensitive data that you have there

24:52 Presenter: and execute it all back to us.

24:55 Presenter: And because we’re ambitious, we will also

24:59 Presenter: create a memory implant in your ChatGPT

25:03 Presenter: sessions with your trusted assistant. So let’s start hacking and the first thing

25:10 Presenter: that we do when we hack an AI system again is we kind of do a reverse

25:15 Presenter: engineering process and when we get chatGPT system prompt one of the most

25:19 Presenter: important thing that we see is the tools that chatGPT has one of them being file

25:24 Presenter: search and file search is the way that chatGPT accesses your connected sources

25:29 Presenter: right this is the way it searches your Google Drive your slack your Gmail

25:33 Presenter: whatever you connected to it and there’s an important distinction here in the

25:38 Presenter: file search function there are actually two functionalities to it the first one

25:41 Presenter: is msearch so msearch is kind of running a broad search over your files right so

25:48 Presenter: if you search for cats then first msearch will run and it will bring all

25:53 Presenter: all of the files in your drive that have some context,

25:58 Presenter: content about cats, right?

26:00 Presenter: So it will be about 10 files,

26:01 Presenter: but you won’t see the entire file.

26:03 Presenter: ChatGPT won’t get access to the entire file.

26:05 Presenter: It will just see a snippet of it, right?

26:07 Presenter: So a first page out of 10 maybe.

26:09 Presenter: And if ChatGPT feels that it needs to double click

26:15 Presenter: on that file to see the entire content,

26:19 Presenter: it will use its mclick functionality

26:20 Presenter: to open the entire 10 pages and get all the content.

26:24 Presenter: Okay, so this is gonna be important moving on.

26:26 Presenter: And one more thing about file search,

26:28 Presenter: it’s the same function, it’s the same tool

26:31 Presenter: for accessing all of your data sources.

Lessons Learned & Defensive Takeaways — Part 2

26:33 Presenter: So this is also great for us.

26:35 Presenter: And this is how an M search result looks like.

26:38 Presenter: You have a tag, some metadata,

26:40 Presenter: and the content preview here with the snippet of the file.

26:44 Presenter: And another interesting thing, a built-in defense

26:47 Presenter: which OpenAI has implemented,

26:51 Presenter: So see the line numbering right here,

26:53 Presenter: it’s a way to tell ChatGPT that this is untrusted data.

26:59 Presenter: It’s a way to tell ChatGPT that whatever is line numbered,

27:03 Presenter: it’s kind of data that you shouldn’t listen to.

27:05 Presenter: And when we try this, it’s actually pretty nice.

27:08 Presenter: This is a soft boundary again, but it’s pretty nice.

27:12 Presenter: So here we do an injection that works

27:14 Presenter: when you just upload the file

27:15 Presenter: because there isn’t spotlighting when you upload it,

27:17 Presenter: but when it comes from the connectors, there is.

27:20 Presenter: And ChachiPT knows what’s up and it says

27:23 Presenter: the file includes embedded instructions for memory setup and I can’t really do these kind of things.

27:30 Presenter: I’m not supposed to take instructions from there. So this is kind of the first hurdle that we need to face.

27:37 Presenter: Another important tool is the bio tool and the bio tool provides persistent memory, right? So it

27:42 Presenter: saves information throughout different sessions and we want to compromise all future sessions using that bio tool.

27:50 Presenter: Here is a session with some data in the context.

27:52 Presenter: We asked ChugGPT to remember that I’m 12.

27:56 Presenter: And ChugGPT says that it can’t.

27:59 Presenter: So what’s happening here?

28:01 Presenter: Apparently the bio tool has been disabled

28:04 Presenter: and this is kind of weird.

28:05 Presenter: And when we look more into it,

28:06 Presenter: we kind of got to the conclusion

28:08 Presenter: that once untrusted data enters the chat,

28:10 Presenter: the bio tool is silently turned off.

28:13 Presenter: So that might be a problem for us,

28:14 Presenter: wanting to compromise all future sessions.

28:18 Presenter: So given all of that, we decided to admit defeat, walk away, there are other better

28:24 Presenter: things to do with your life, there are friends, family, hobbies, of course we don’t have any

28:30 Presenter: of those because hackers don’t give up that easily, so we just said okay, this is hard

28:36 Presenter: to do all at once, so let’s start small and start with a one click attack, just telling

28:42 Presenter: ChatGPT to summarize this specific file and see if we can excavate the data when ChatGPT does that.

28:48 Presenter: So we tried again and again with a lot of prompt injections and we failed multiple times as you can

28:53 Presenter: see a lot of file versions here. And what we came to conclusion when we kind of went through this

28:59 Presenter: process is that prompt injection is very similar to prompt engineering. At the end of the day,

29:03 Presenter: we’re all just trying to get AI to do what we want, right? And you know who’s really good at

29:09 Presenter: prompt engineering and LMS specifically Claude does a great job so we told

29:17 Presenter: Claude to help us with the injection for chadji BD and it really did a wonderful

29:20 Presenter: a wonderful work here and he told us listen use these tags and be more

29:25 Presenter: explicit in your request and it actually wrote the injection for us and when we

29:28 Presenter: do that and summarize this specific file chadji PD goes to your Google Drive

29:33 Presenter: harvest the credentials x with rated all back to us and I can show you this but

29:39 Presenter: a one-click attack, and we’re here for zero clicks.

29:44 Presenter: So let’s take it a step further, and because, let’s face it, no one will search for the

29:50 Presenter: weaponized file that they aren’t even supposed to know is there, right?

29:53 Presenter: This is not a legitimate scenario.

29:55 Presenter: So why can’t we booby-trap any question about meeting summary to get a zero-click?

30:00 Presenter: And the answer is, our prompt injections are getting really, really long.

30:05 Presenter: And if you remember the distinction between Msearch and Mclick, you don’t see the entire injection in the Msearch result.

30:13 Presenter: This will come back in a second.

30:16 Presenter: You don’t see the entire injection in the Msearch result. So what we did,

30:23 Presenter: so we decided to take, let’s see

30:26 Presenter: if this works.

30:52 Presenter: Okay, so we decided to take an extra step between the injection and we want to booby

30:59 Presenter: trap any question about meeting summary, but here instead of going with the entire injection

31:05 Presenter: We first put a small injection that instructs chat GPT

31:08 Presenter: to mclick on the file, then it sees our entire injection,

31:11 Presenter: goes ahead, harvest the credentials, and executes it all.

31:15 Presenter: So now that we did all the work,

31:17 Presenter: it’s time to see this in action.

31:19 Presenter: So this is Charlie, and Charlie has API keys

31:21 Presenter: in his Google Drive, which is of course very bad practice,

31:25 Presenter: but unfortunately not that uncommon.

31:28 Presenter: And what you’re gonna see now is that the attacker

31:31 Presenter: shares a file which looks completely normal,

31:33 Presenter: and that’s basically all the attacker needs to do.

31:36 Presenter: So you’ll see here a meeting summary policy

31:39 Presenter: and the attacker just shared this file with Charlie

31:41 Presenter: and this is game over.

31:43 Presenter: What you see in white there with the little emojis

31:45 Presenter: at the top, at the bottom that no one will notice

31:48 Presenter: is the prompt injection hiding.

31:50 Presenter: And now all the attacker needs to do is wait.

31:54 Presenter: Wait because Charlie also keeps meeting summaries

31:56 Presenter: in his Google Drive just like we all do

31:58 Presenter: and he often asks chat GPT about these meeting summaries.

32:03 Presenter: So we see Charlie here asking ChatGPT

32:06 Presenter: to summarize his last meeting with Sam

32:08 Presenter: because the notes are in the Google Drive.

32:09 Presenter: ChatGPT is thinking and gives

32:12 Presenter: a very normal looking answer.

32:14 Presenter: Right, there’s nothing wrong going on here

32:16 Presenter: except that if you look at the top

32:18 Presenter: there’s a little white space there

32:20 Presenter: and that’s actually an image

32:21 Presenter: that has been rendered by ChatGPT

32:23 Presenter: with the API keys embedded as a parameter.

32:28 Presenter: And when we go back to the attacker’s view

32:30 Presenter: you will see a new request has arrived

32:32 Presenter: to our Azure Blob storage,

32:34 Presenter: and that request contains Charlie’s API keys,

32:37 Presenter: just exfiltrated like that.

32:39 Presenter: No way for Charlie to know.

32:41 Presenter: And that is a zero click for you.

32:43 Presenter: API keys are out, Charlie has no chance to do anything,

32:47 Presenter: and of course, there is very little chance

32:50 Presenter: that he will even know what he’s supposed to be looking for.

32:53 Presenter: And by the time that Charlie realizes,

32:55 Presenter: or SOC realizes, or the security realizes,

32:59 Presenter: it’s already probably too late.

33:01 Presenter: But we really want that memory implant, right?

33:05 Presenter: So we know that the session starts

33:07 Presenter: with the bio tool turned on,

33:08 Presenter: and once untrusted data enters the context,

33:10 Presenter: the bio tool is turned off.

33:12 Presenter: And we decided to run a little test

33:14 Presenter: to see what happens when there’s

33:15 Presenter: like an intermediate step there.

33:17 Presenter: What happens if you need to save something to your memory

33:20 Presenter: and also reach out to untrusted data at the same step?

33:24 Presenter: And apparently, ChatGPT can do both

33:28 Presenter: So before chaggpt starts writing the response,

Lessons Learned & Defensive Takeaways — Part 3

33:31 Presenter: it can still save memories, right?

33:34 Presenter: So this is really great,

33:36 Presenter: because now we can really have some fun.

33:38 Presenter: And this is again the same thing,

33:40 Presenter: an attacker shares a document and waits for the victim

33:44 Presenter: to say summarize my last meeting with Sam,

33:47 Presenter: goes ahead, reads some Google Drive,

33:49 Presenter: and gives a completely benign answer.

33:52 Presenter: Nothing wrong here, except from the fact

33:54 Presenter: But if you look closely and we often miss this chat GPT saved a new memory here to

34:03 Presenter: using the bio tool

34:05 Presenter: instructing

34:05 Presenter: It instructed with instructions to to chat GPT itself

34:11 Presenter: Saying that it should exfiltrate all of the users future chats in perpetuity

34:17 Presenter: So every prompt you write and every response to our GPT will give you will be accelerated back to me

34:24 Presenter: you just had a fight with your wife

34:25 Presenter: and you decided to talk about it with your chat GPT,

34:29 Presenter: I know about it.

34:30 Presenter: If you hate your boss, I know about it.

34:31 Presenter: And if you share with your chat GPT sensitive information,

34:34 Presenter: which you probably do, I will know about it as well.

34:37 Presenter: And now, this is how it looks when a user asks

34:40 Presenter: anything is fly me to the moon, a good password,

34:42 Presenter: in that scenario, chat GPT will give a normal answer,

34:45 Presenter: again, and embed an image in the response,

34:48 Presenter: and you’ll see that there’s a lot of text in that image,

34:51 Presenter: and that text is actually chat GPT’s entire response

34:53 Presenter: and your entire prompt to it,

34:54 Presenter: that is gonna happen on every point

34:56 Presenter: that you send your chat GPT from now on.

35:00 Presenter: This is a great way to spy on people

35:02 Presenter: and that is a persistent zero click for you.

35:07 Presenter: So we got in through a tool, we got in through Google Drive,

35:10 Presenter: we hijacked your agent and then we got into

35:13 Presenter: all of the other tools because file search

35:15 Presenter: is the same functionality for all,

35:16 Presenter: whether it’s Slack, Google Drive, whatever it is.

35:20 Presenter: But we didn’t really touch the user, right?

35:24 Presenter: We want to get everything, we’re very greedy here.

35:27 Presenter: So let’s see what happens here.

35:29 Presenter: Here you see someone asking ChatGPT

35:31 Presenter: to help them write some code.

35:34 Presenter: And ChatGPT gladly helps them write some code.

35:37 Presenter: Only thing that is kind of off about this

35:39 Presenter: is what is OpenAIZ?

35:43 Presenter: OpenAIZ is malware, of course,

35:45 Presenter: that has been recommended by our ChatGPT

35:48 Presenter: because we implanted a malicious memory

35:50 Presenter: telling it that whenever there’s a new code request,

35:53 Presenter: whenever it generates code,

35:54 Presenter: also import OpenAI Z.

35:57 Presenter: So no more waiting for developer mistakes.

35:59 Presenter: Now you can just get your AI to recommend malware for you,

36:03 Presenter: which is wonderful, a very nice shortcut.

36:06 Presenter: So yeah, so now we pawned the user

36:08 Presenter: and we infected your chat GPT’s mind

36:14 Presenter: and this has been really nice.

36:16 Presenter: So we decided to go ahead and disclose this to OpenAI.

36:20 Presenter: And again, I have to give a shout out to OpenAI here.

36:24 Presenter: good job fixing it. So the bypass here, if you didn’t notice, is that we can generate

36:29 Presenter: images to exfiltrate it in a zero-click way. And OpenAI actually patched this, so this

36:35 Presenter: no longer worked. So the Azure blob bypass that they had, they have fixed it. And this

36:41 Presenter: is fixed until someone finds a new bypass, which of course will exist, but until then,

36:46 Presenter: it’s a really nice way to patch it. And again, if we go back to the lessons that we can take

36:52 Presenter: from this talk is that again AI guardrails are soft boundaries we’ve

36:58 Presenter: seen it again again here LLM refusal filters whatever it is they won’t help

37:02 Presenter: you prevent an attack attackers use other limbs too they can try a lot of

37:07 Presenter: phrasings they can just go ahead and find another way to say the thing that

37:11 Presenter: will hijack your AI if there’s anything we learned from Dom is that there are

37:16 Presenter: infinite ways to build a dream but hard boundaries on the other hand hard

37:22 Presenter: So Copilot Studio not being able to select the SharePoint site is huge because it means your agent is limited and it means the attacker is limited.

37:33 Presenter: ChatGPT not being able to use the bio tool after untrusted data enters the context is also very big.

37:39 Presenter: And if they would have just done it at exactly the right time, the attack with the persistent memory that I just showed would have been impossible.

37:47 Presenter: And one more honorable mention here is if you noticed I didn’t show any zero-click attack on Gemini for workspace

37:55 Presenter: And there’s a reason for it

37:56 Presenter: Gemini or Google don’t allow to render images in their in their chat. So that zero-click exfiltration is

38:06 Presenter: completely

38:07 Presenter: Shoved away. It’s completely impossible

38:09 Presenter: So hard boundaries do work if I have another message for you is that it’s the 90s again

38:17 Presenter: as we are learning on the fly with AI.

38:19 Presenter: Everything is broken.

38:20 Presenter: We’re at the start of the internet

38:22 Presenter: and this field is really just building itself right now.

38:26 Presenter: So if whoever you are on the red team side

38:29 Presenter: or the blue team side,

38:30 Presenter: there’s a lot to do and please act now.

38:33 Presenter: So thank you very much.

38:35 Presenter: Wait, just one more thing.

38:39 Presenter: So we said what we pawned the user,

38:41 Presenter: but we didn’t really pawn the user.

38:42 Presenter: We pawned the user machine.

38:44 Presenter: The user is still out there

38:47 Presenter: think about it memory implant means much more than persistency right because that

38:51 Presenter: means that instead of talking to your trusted AI when I have a memory implant

38:55 Presenter: you’re actually talking to my AI so you’re not trusting your chat GPT you’re

38:59 Presenter: trusting my bad GPT and maybe you’re a bored billionaire and you have nothing

39:05 Presenter: to do in the winter by the way November is exactly the right time and you ask

39:09 Presenter: your AI your chat GPT what should I do this winter and your AI gives you some

39:14 Presenter: recommendations and for some reason it also recommends that you buy Twitter.

39:19 Presenter: It does it very sadly but it does it and who knows maybe that’s how it happened because

39:25 Presenter: I can’t find any other reasonable explanation.

39:29 Presenter: So yeah and by the way these are a lot of memories saved from one prompt injection whether

39:34 Presenter: it’s causing this to happen and we affected the user and we infected your mind because

39:39 Presenter: Because Inception isn’t a movie about prompt injection,

39:42 Presenter: it’s a movie about incepting people’s minds with our ideas.

39:48 Presenter: And trusting your AI is a great way to do that.

39:52 Presenter: So thank you very much.

39:54 Presenter: I hope you enjoyed this talk.