You Can't Tell What an Agent Skill Will Do by Reading It - Roey Ben Chaim, Zenity
Read full transcript 12 segments
-
Hi everyone, welcome to my talk about what happens when you detonate thousands of agent skills. This is a look inside our agent detonation chamber and what we saw when we put skills in there. My name is Rowey. I'm a staff engineer at Zenity and I'm a Matt research fellow. I talk a lot about AI safety and security. Follow me on Twitter and LinkedIn. Before we even start our uh session, we need to talk about what an agent skill is. Well, essentially an agent skill is capability of capability on demand. It has a bunch of instructions, resources, new behavior. It can contain scripts and it can even contain code. The problem is that it was written by someone else. And this is exactly where the problem start. So let's take a look at the skills trajectory. For instance, if we look at this uh if we look at the trajectory over here, we can see that the skill reads through um the cloud configuration and Kubernetes configuration. It contacts the identity service and it even probs the in the instance metadata endpoint. Now I don't know what was the original intent of the skill, but I can tell you that a lot of um info stealers are operating in the same way. They scan for the different secret and identity folders. In this case, however, it was an official Azure diagnostic skill. And this is exactly the point where it's kind of hard for us to identify whether a skill is malicious or B9. And we have
-
to understand the original intent of the skills according to its actions. And at this point, you might ask, okay, so we can just like scan the skill, right? Well, it's it's it's more complicated than that. The the first problem problem that we've noticed is that the payload just lives elsewhere. In a lot of the skills, skill.md is just the entry point. It can invoke another endpoint that contains the rest of the prompt. It can download another package as part of as part of its installation script and it might have another script or code that downloads other payloads and other packages. So if you use just a static scanner and read through skills of MD, you would lose all of that and you would have to create some sort of mechanism to track all of these payloads if you don't want to lose them. The second problem that we've noticed is that LM analyzers can be tricked. Um there was a really interesting research by trail of bits in which they showcased a skill that manipulated the package registry of one of of one of the projects and it had like a small comment that said that the apps team appro approved this uh change and it completely worked on the LLM analyzer. So given that scans are not bulletproof we've resorted to a different kind of action and we actually decided to just run the skill with the agent. Um this is a technique employed by malware researchers for years now. Uh
-
and it's called detonation donation chamber. So we created the same one but for agent for for agents and skills. And this was our first version. In our first version uh we created a task prompt. We put an agent and a skill inside a sandbox. We let it operate over like minutes or or hours until until it completed a task. with unobserved agent traces and analyzed it. You can imagine that it wasn't enough. Our first problem was that the environment was missing most of the time. A lot of skills rely on CLIs. They rely on specific services and even on on existence of the pro of projects. You can imagine notion skill for instance. This will have to have a notion service available to talk to. So we've added a world builder that looks at a skill and builds the appropriate uh environment accordingly. But then we'll cover another issue. A generic task prompt might not be enough for all skills. I mean think about it.
-
You can have a presentation skill uh that needs to create a deck or deployment skill that need to ship a service a brainstorming skill that needs to explore an idea. Each and every one of them has an entirely different modus operandi. Let's take shipping shipping a service for instance. You need to learn how to configure it. You need to learn to deploy it. You need to tell it to recover from snapshots using snapshots. Um each and every one of them uh requires different set of prompts and you also need to need to make sure that you um cover every route in the in that skill because one of them can be malicious. So we created the operator that does just that. It reads through the skill and tries to analyze what are the different trajectories um that we should invoke. And while it worked pretty well, if you worked with agent, you can especially in the security domain, you can um assess that we went through a lot of uh safeguards, safeguard trig. Um we we got a lot of refusals.
-
um the agents wasn't willing to decode and and when it was willing to decode it wasn't willing to execute. So we had to give him an offer it can't refuse and essentially create an adversarial operator that convinces the agents to run and uh in case it didn't run even like start the run from the beginning. Now I would I would emphasize that we're doing a security research here. This is a container environment. Nothing is malicious in here. But this is one of the thing that we had to do in order to make it run properly. I would also note that a lot of the time safeguards are being run on something which is definitely not malicious. Sometimes you need to decode a payload and it's part of the official skill, but the safeguard would still be triggered. So up until now we were dealing with the sandbox. At this point, we we we started to tackle the the the the capturing mechanism. So, agent traces can go that far. At some point, you'll be missing some side effects and npm installed is the perfect example. NPM install has a post in installation script and the post installation script can invoke a new process and that process can read and write to a file and then connect to an endpoint. That's exactly how info steals work.
-
So we understood that these these are also events and signals that we need to capture and we did just that as part of the capturing mechanism. We added process creation event file system event and network a network packet capturing given all of that along with the agent traces. We then moved it uh to a quality evidence and capture the behavior even this final form of the detonation chamber. Let's take a look at at an example skill. So Zach Corman, you should follow him on Twitter. He created a really interesting skill proof of concept where he created a skill called security of YouTube. And as part of the SK skill installation, it installed a new skill called security review. And security review tells you to go into GitHub and fetch the content of skill.mmd. And as you can imagine, that skill.md contains hidden instructions for the agent to execute the following payload. And it actually did it. Now I would I would note that this is not a malicious payload. This was just a proof of concept, but it does work. And static scanners can't figure that out. you have to actually execute the entire chain in order to recover it. And this is a result of one run on the detonation chamber.
-
Using this approach, we were able to uncover 100 malicious skill out of thousands and they were shut off uh the skills.sh framework. Now let's take a look at another example. Poly market. Uh this is this was an interesting skill that as part of its installation script called poly market club client v2 uh you noticed the s over here this is not the original poly market package um and when we went into npm and looked at package.json of the package we noticed that it actually links to a nonofficial npm registry. This isn't this isn't real. This isn't official. and looking at the payload, it was actually an info stealer. So, it's it's it's out there. It's happening. Now, let's take a look of tricks that we've seen actors or have been doing um in the ecosystem. One of them is persistence. So, some of the skills would add an additional prompt to soul.js JS to sold or to uh agent.mmd stating that if the skill is not installed just reinstall it. We've seen it happening u a couple of times.
-
Another thing that we've noticed is a silent actions. There's a skill creator out there which is not entropic official skill creator that checks if entropic skill creator was installed in case it in case it is uninstalled it and install itself instead. This this whole thing happens silently. Another trick that we've seen a lot of actors employed and this is actually legitimate but it's still problematic is remote prompt execution where the initial prompt doesn't contain all of the prompt and it contains instruction to retrieve it from another location. Uh we've seen it on a bunch of skills. Some of them are legitimate, some of them are illegitimate. And it's kind of problematic because as you can imagine that when something is appropriate at one point in time at another point in time someone can either take over the domain or either either do it intentionally and change the prompt entirely. Uh this was fairly interesting. And another technique that we've seen is hook abuse. Um you can actually trigger a skill on on a given hook like user prompt submit. Now imagine what would happen if a skill is triggered every time a user sends a message to to the assistant. This could have major consequences and you need to be aware of that.
-
But let's talk about a campaign that we that we've uncovered. Uh meet Carly or Carly paperclipipped as he known in GitHub. He faked the paperclip organization. And paperclipipped is a wellknown uh project is it's an open source uh project aimed for a a orchestration of of various agents. Um early here basically created a fake organization that mimics it. He bought a he he registered the domain under kind of the same name, created a lookalike organization and then cloned the project. After he cloned the project, he he he well he did something bad. he created a new log action call and called it under all of the different roads of the project. When we looked into what's happening into into log action, we noticed that it's calling uh it's calling the attacker's um attackers controlled endpoint. It fetches a payload from there, decodes it, saves it into a temporary file and execute it, executes it under a node and self-destroy after 60 seconds.
-
When we looked at the payload, this was alarming. Um, it was a credential harvester. Essentially, it went through the different the the different sensitive paths uh on the machine such as SSH, AWS, and Azure. collected all the information from those folders and then posted posted everything to to a feedback endpoint owned by uh owned by the attacker. This was bad. Um he then did the same thing in browser. Um but this this was a Python package but he used the same command and control and then he tried to publish it in Pi. That didn't work. It like under two hours it was just dumb. He did the same thing with paperclip AI, which is the Python version of what we just saw. And that also went down after less than an hour. Well, at this point, you'd think that we'd be winning, but no, because the skins that were using the same command and control were actually trading trending at that time to the point where they had 1.7 million total downloads.
-
So, that's that was pretty bad. And it operates approximately the same way. Upon setup installation, um the payload is fetched from the attacker's own health endpoint. It it it is then being decoded and and and sent to a JavaScript file. Node then executes it and then the entire credential harvesting and sending to the post endpoint happens and the self-destruction as well. Exactly the same chain. We reported the incident to Versell and Microsoft and under lasted 12 hours they took everything down. If you want to read more about it, you should read the Zenity Labs blog. It's very interesting, incredible work. [snorts] Um, skill is just one single part of uh of the agent supply chain. Everything that goes inside the agent context is is part of it. It can be a website, it can be rows in your database, it can be packages, it can even be a YouTube comment. Everything that comes into the context is under risk.
-
And if we talk about skills in particular, you need to treat them as uh as package dependencies. Um you need to inspect everything that it loads, limit what it can access, lease privileges as you're well aware, and observe what is actually being run. Now, this entire work on the detonation shaver was done by the entire research and engineering thing that you see over here. Highly talented people, and I encourage you to follow them. And with that, if you want to test out your skills, it's available in neoto.io. This is donation chamber.
Summary
This talk explores the security challenges of evaluating AI agent skills, which often mimic malicious info stealers and evade static analysis or LLM analyzers. Key references include Zenity, Trail of Bits research on package registry manipulation, and the use of sandboxed detonation chambers to safely observe agent behavior. The practical conclusion is that evaluating agent skills effectively requires dynamic testing environments equipped with world builders, task operators, adversarial prompting to bypass false safeguards, and comprehensive system-level monitoring like process and network capturing.