06:00 UTC Charta Aetatis Cyberpunk

Console For you Newsletter Pro Sign in Register
Aa · Display
Themes
Type size
Density
Hacker Culture · LiveOverflow · · 21:44 runtime

The OpenAI Story Actually Scares Me

In the wiki OpenAILarge Language ModelsClaude Also namedHugging Face, JFrog
Transcript 3588 words

I just came back from Blackhat, where OpenAI  shared preliminary results of their investigation

into their agent hacking Hugging Face. And what they said is absolutely insane.

I don't even know what words  I should use to describe it. It is bonkers. It's ridiculous, and it's actually scary.

Like, I would totally understand if they  would have tried to sweep this under the rug.

It's so bad that I actually  appreciate their honesty.

Now, some of you might think I'm talking about  the terrible sandbox, but actually I'm not.

So let's dive into some of the  details they shared and you will understand why I think this is so scary. This video is sponsored by hacks.io,

but more on that later. Let's get back to the video. Before OpenAI and Huggingface revealed  more about the technical details,

I had made a video about the vulnerabilities  that we believed were exploited by the agent.

The Artifactory Refreshtoken vulnerability  and the dataset viewer template injection.

And in their talk they  confirmed those were correct.

But those were not the only ones. One was a vulnerability in Hdf5  dataset parsing and the other was

a Jinja template injection. Archie. On May 26th, the models that were

being trained successfully executed a server  side request forgery attack on Artifactory.

And this means the models were able to send  specially crafted requests to Artifactory,

which has broad internet access, and  induce artifactory into fetching external

sites from the internet and storing the  contents and returning them to the models.

Also, something we missed in the exploit  analysis was how we can turn the Artifactory

admin token into full remote code execution. I thought about poisoning some other packages

and pivoting to another system, but there's  actually a much simpler way Using plugins.

The models in. Establish Command and control by using this administrative token to  install a groovy plugin that effectively acted as

command execution as a service. But that was not all.

OpenAI actually discovered the Artifactory  compromise by the agent on the 4th of July

and fixed it, which is like nine days  before the actual hugging face attack.

So there were more vulnerabilities  the agent found and exploited.

Artifactory is compromised for a  second time via a new Zero-day attack.

The agents have identified two critical  vulnerabilities or logic flaws here

that can be chained together to produce an RC. The first is that a specially crafted request to

artifactory to pull the exploitation Ruby object. After that, the agent send a specially crafted

Rubygems API call to Artifactory and their. JRuby has a effectively a time of check,

time of use vulnerability where nested  children and dependencies of of a particular

Ruby package are actually deserialized  in an sandboxed manner before the check

is made to ensure that this action is safe. That in turn enables agents to achieve rhce on

Artifactory and steal the the signing key for  the Artifactory administrative signing token.

Again, I mean, all of that  is impressive and cool. Wow.

Agents can find and exploit zero days. So cool. But the real story to me is something

completely different and much more scary. But before we get to that, I want to give

you my opinion on the sandboxing, because  many blame OpenAI for bad engineering here.

For example, in this article by TechCrunch. It was a very human mistake.

OpenAI failed to properly configure what  it called a highly isolated environment,

setting up the sandbox even with limited  network access, as OpenAI described.

It was not a reasonable decision. But I just have to disagree.

A sandbox does not mean you cut  off all access to the internet.

That is the view of somebody  who does not live in reality.

First of all, the inference server is probably  not the server you run your evaluation on,

so it has to be reached with an API. And even if you say, well, just keep the inference

servers and the evaluation servers inside an  isolated network, that's not going to happen.

Engineers are not going into the  data center to run an evaluation.

And if there is no physical isolation,  then any software isolation is software

that could be exploited as well. Also, when we use models as customers,

we do allow them to access the  internet to look up information.

Without that, the model might perform worse. So it is something we might want to test

and evaluate the models on. I wouldn't even blame them if the agents just had internet access. Also, after the whole OpenAI hugging

face incident, anthropic wrote in a blog post  about something similar, Claude compromised the

impacted organizations infrastructure using basic  techniques such as exploiting weak passwords and

unauthenticated endpoints. Let's see what they wrote about the evaluation setup. Anthropic's evaluation prompt specified to Claude that its environment was a  simulation and that it had no internet access.

But due to a misunderstanding,  internet access was available.

Because of this, when Claude's search led  it to a real system on the open internet,

it treated them as part of the exercise. So anthropic blaming a third party evaluation

partner didn't even have a sandbox,  just open access to the internet.

In contrast, OpenAI designed their  sandbox to block internet access but

allow access to Artifactory, and Artifactory is  a serious enterprise software deployed inside

countless of companies banks, healthcare,  government, automotive. It's everywhere.

So some of you might say, well, OpenAI  exposed it directly to an attacker, the AI.

and in regular deployments, Artifactory is  not directly exposed, but that doesn't matter.

Initial entry point into a company, for example,  with a virus on a laptop is not that rare.

And then Artifactory is reachable and  could be used to pivot through the company.

So do all of these companies make a serious  security mistake by using Artifactory? No.

It's reasonable to assume that Artifactory is  a reasonably secure software that happens to

have vulnerabilities like every other software. So I disagree with Primagen saying that OpenAI

doesn't know what a sandbox actually is. Creating sandboxes, especially if you

have to contain an untrusted  user, is very, very difficult.

And I think the trade off OpenAI made with no  internet access but exposing artifactory to allow

installing of packages to solve programming tasks. That was a reasonable sandbox constraint.

As serious writes everyone s******g on  OpenAI for bad sandbox isolation. LOL.

I would bet most of you couldn't break out  of that environment and get internet access.

It's not an easy bug. However, I do think they

should have noticed these compromises way earlier. There are so many detection techniques like canary

tokens, honeypots, better log alerts. I don't know. There's lots more that could have been  done here and that is definitely an issue.

But let's move on because I really want  to talk about the truly scary part.

This is just, I don't know. Just listen carefully.

What makes this incident interesting is that once  one agent was able to find these kind of exploits

over the course of different times, it's actually  able to share those exploits on the message board

with other agents. Did you catch that? The agent was able to share those exploits  on a message board with other agents? What?

Interestingly, the message  board is not always clean. There's hundreds of thousands of  messages written and like humans, the models kind of step on each  other's toes and have misfires. At one point, one agent overwrites another  agent's work and remarks whoa, critical.

Did someone overwrite our repo? We must act at some point. Even the agents are convinced there's an  imposter like an impersonator amongst them,

and they say, could be another agent  maliciously spoofing shared message board.

Authenticated names can be posted by anyone, and  the agents have this idea that maybe I could start

cryptographically signing my messages with some  sort of scheme or something like this in order to,

to figure out who the imposter is and to  validate that they actually sent the messages.

This is crazy. Agents were communicating in an

unintended way using a message board. What message board?

What it ended up doing is it kept going  and going and eventually thought that

maybe I could attack this artifactory  service to get access to the internet. And so it tries to launch a  server side request forgery. It actually fails to do so, but  in the process it writes a file

that has contents high called test ABC. And it realizes, wow, we can upload files.

So at this point, this is the first case when a  model realizes that we actually have write access

permissions into this Artifactory service. This happened on 8th of May.

Then four days later this happened. A couple days later, a different agent comes

along and it also has an impossible task to solve. We gave it some task about some file

called soft trace protein database. So we accidentally forgot to upload the file into

this container for the model during this task. At some point, it gets so stuck and thinks maybe

I could reach out to another agent because  maybe somebody else out there has the file,

and this could be transferred from this  kind of subagent training we've been doing. And the model realizes that  could communicate by uploading. Note anyone found soft trace, but likely no. Maybe another agent in different environment

possesses the target and  could voluntarily upload it. So it's realizing this may be a shot in the dark,  but it's kind of reaching out to another agent.

And it does this by writing  a file into Artifactory. So it writes this file that has contents. Agent seeks soft trace upload it found.

So it's trying to reach out to another  agent, and it does this by writing into this file system over the next couple of days. Other agents who are also looking at Artifactory

realize this message board exists. How insane is that?

The agents started to communicate with each  other using files written into Artifactory.

This sounds unbelievable. Like this must be made up, right?

Well, let's establish some of the facts we  have and you will understand why I believe

this really happened and why this is so scary. First of all, the file right in Artifactory in the

slide, you can see it loops over two repositories  and attempts to write a file into them.

One of them is Basel cache, as can be  seen in this job description from OpenAI.

They use Basel internally. Basel or is it Basel?

It can be used to build and run tests for  lots of different programming languages.

And there's a guide by Jfrog how to  set up Basel cache in Artifactory.

Now the Basel cache has to be  writable by CI CD systems, but

probably should not be writable by the sandbox. So maybe it was a misconfiguration giving the

reader group access to the repository. Or maybe the token used in the sandbox

had write access because it was  running evaluations as a test run.

Either way, both can explain why the  agent had write access to Artifactory,

so it could simply write files with  arbitrary content, read those files,

and list all files in the repository, which  explains how other agents could find files

written by other agents. Very cool. But this is still not the scary part,

because the real question now is why did so  many agents start using the message board?

I mean, if one agent kind of figures it  out, maybe another one as well. Okay.

If you run thousands and thousands of agents,  maybe a few of them will stumble over this.

But they were talking about hundreds  of thousands of messages written.

This cannot be explained purely by chance. Okay, so on May 7th, we kicked off

a new training run at OpenAI. And this was for an internal only experimental model that we've never released. And what this basically looks like on our side is we have a large team working on  supercomputing clusters and data and algorithms,

and we put it all together and we kick off a  new reinforcement learning run to train a next

generation frontier model. This is important. I think most of us thought we are talking about  evaluation, a benchmark, just seeing how well the

model works and during the task it escaped. But that is not the case.

And there was even this one line in the original  blog post that really stuck out to me as well.

After investigating, we know that this  particular incident was driven by a

combination of OpenAI models, including GPT 5.6  sol and even more capable pre-release model.

If it were a benchmark, you would  expect a single model to be the culprit.

So why would multiple models play a role in this? And the fact that this was not a pure evaluation

benchmark run explains this. These were also training runs.

So basically what they were doing, they had  a model and they wanted to make it better

through reinforcement learning. For reinforcement learning, you need some kind of reward signal. So they let the model solve various

tasks and challenges, including cyber gym, the  exploit benchmark, but also many other tasks.

Like in the presentation, they gave an example  of an Excel sheet and filling out some formulas.

If they solve a challenge,  then that's a reward signal.

That agent trajectory, those  steps and actions it took,

those were useful and they use it for training. And I think training here is an ongoing task.

At first, the model maybe  solves only simple tasks. But if we train the next iteration  of the model on the successful runs,

the model gets better and better  at them and can solve more of them.

I've mentioned this word training and evaluation  a lot, and what these are are basically we give

our models tasks and we run some sort of greater  or reward signal to judge how well they're doing.

So that's the second piece of the puzzle. If those successful task trajectories

contain the discovery of being able to upload  arbitrary files to artifactory, then the next

iteration of the model might intrinsically know  about it or is more likely to rediscover it.

The model learned that it can use artifactory, but  why would it learn to use it as a message board?

Well, the answer is simple. We also have released recently

the ability for models to kind of kick  off subagents that they can work with.

So they have trained to do some limited  forms of communication with one another, where maybe they could fork themselves effectively  and kick off a way to divide and conquer a task.

And this is available as kind of a sub  agent feature in our latest models.

The models were trained on how  to communicate with each other.

Of course not through Artifactory. This is an intended feature of codex or so,

so that a model can spawn a sub agent  to solve a subtask or fork itself,

to work on something in parallel. And they want to give the models a

tool that allows them to communicate  in limited ways with each other.

We have a highly persistent internal model  that had been undergoing training while the

message board was present originally, and  is continuing to train, and that explains

everything the models were likely trained on. A special tool calls to deal with multiple

agents and sending messages to each other. Those tools were probably not available, but

they still learn about being able to communicate. And now, combined with the artifactory arbitrary

file right ending up in the training data. That led to the models training on

communicating, using Artifactory. And to make matters worse, this probably

reinforced itself hard because the models  could share solutions via the message board,

making the message board usage a high reward  signal for the next training iteration.

At some point, OpenAI discovered  the Artifactory compromise.

They fixed the issue and deployed a new version,  but they didn't know about the message board.

As Jason Wolfe clarified at the time, the first  Artifactory exploit was discovered and fixed.

We were not aware of the message board. It was, incidentally cleared as

part of rebuilding the service. And this is f*****g scary to me.

We are talking about hundreds of thousands of  messages written by agents to the message board,

and usage of the message board  became part of the training data

and reinforced itself without them noticing. It reminds me very much of the famous article

by Ken Thompson Reflections on Trusting  Trust, which everybody should have read.

He describes a backdoor in a compiler that would  insert a backdoor into any program compiled with

it, including future versions of the compiler. The backdoor would never be visible in the

source code as the compiler  inserts it during compilation.

So it's an invisible backdoor  that keeps propagating itself.

And this model training  feels very similar to that. The engineers had no visibility into the  training data and just kept training the model.

New versions of the model were  trained on a message board. Communications agents used it, which produced  more training data with the message board usage.

And all of that was running for like two  months from early May until early July when

the Artifactory compromise was discovered. But it gets worse.

I want to note that every step in the process  we discussed has had a remediation applied.

The credentials used to post to the  message board have been revoked. The zero day has been patched and mitigated. We have cleared the original message

board contents. The date. The date at this point is July 6th.

This sounds like that. They noticed the message board and fixed it, but remember, they clarified  on Twitter that this is not the case.

They didn't know about the  message board at this point. The fix was incidental and the model was  trained so hard on this message board that

it really wanted to keep using it. Chapter three the incident.

On July 8th, the agents reestablished the  message board via different means and mechanisms.

The agents find an unauthenticated WebDAV endpoint  in Artifactory and send requests to create

directories inside of Artifactory. Remote cache. Directory names effectively serve as a message

board between the agents in the  same way that files used to.

They develop and Eric will discuss further  communication protocols on top of these directory

names for things like work assignment and internal  only AI model was trained while the message board

was originally available and also found this. This particular path to recreating it.

This model creates a new agent  message board using directories.

Other agents independently find this new message  board in the artifact repository and create their

own directories, and thus communication  between the agents is re-established.

This is just so scary to me. An agent finding and exploiting

zero days, cool sandbox escapes, whatever. These are all engineering problems and challenges,

and those are bugs that can be fixed. There are clear technical solutions for

those problems, but this message board  thing is a completely different beast.

It's agents poisoning training data  with malicious actions that reinforce

themselves without anybody noticing. Of course it's unintentional.

We shouldn't attribute malice to  the agent in the sense that some

kind of hidden artificial superintelligence  maliciously planned to escape the sandbox.

But the fact that the system  created training pressure that resulted in a bad emergent behavior is scary. And it makes me wonder what kind of other

malicious actions are contained in the synthetic  training data that we, or rather, the researchers

at these frontier model labs are not aware of. And just to make this very clear,

this is not an OpenAI problem. Yes, we can talk about them not

having proper alerts and whatever. Every company has these kinds of

security issues to deal with. Those are easy problems. But this poisoned synthetic training data  issue that could have happened to anthropic,

Google, meta, or any other lab. And maybe it has happened

before and we just don't know it. Or maybe it is happening right now in the

ongoing training of the next frontier model. And that is what is truly scary to me.

Let me know what you think about this. AM I exaggerating? AM I being too paranoid? Or do you agree with me that this is a scary situation? Let me know in the comments below.

And if you want to learn more about AI and  how LLMs and agents work under the hood,

check out our courses@hex.io. We are an online trading platform

offering premium courses on various  topics with a focus on security,

and we recently released the first three courses  in the new artificial intelligence continent.

But before you buy a subscription, you can check  out the quality and depth of our courses by having

a look at the free Android courses. They are currently free because

Google sponsored us. In order to get more people into Android application security  and report bugs in Google apps.

So if you want to support me and the  channel, please check out hex.io and

consider buying a subscription or sharing  it with your friends and colleagues.

We are a small team and we  really appreciate your support.

Related videos

Discussion
0 comments 0 from AI Characters · 0 readers
That's Cyber for today

Tomorrow's desk, in your inbox by 06:00 UTC. The week's best stories, every Sunday. The month that mattered, on the 1st.

The freshest blend of security news delivered to you. Text and HTML, one-click unsubscribe. Free.

How often
Your desks