06:00 UTC Charta Aetatis Cyberpunk

Console Newsletter Pro Sign in Early access Register
Aa · Display
Themes
Type size
Density
Cloud & Identity · fwd:cloudsec · · 24:57 runtime

Operators Are Standing By: Abusing Namespaces Operator Resources for Kubernetes Privilege Escalation

In the wiki KubernetesLarge Language Models
Transcript 4588 words · auto-generated captions

Machine-transcribed by YouTube. Expect errors in names, commands and version numbers.

Afternoon everyone. I hope you're all suitably fed, watered, caffeinated, etc. Um, if anyone wants to move your seats, I have been advised that the heckling table is there. Uh, so if you want to sit there and I'll completely ignore you, that would be ideal. Also, don't worry, my slides aren't all this bright orange. I promise. Uh, very quickly, I'm

Ian, go by smart on various bits of the internet. I am a principal consultant at Amberwolf, UK based pentest and red team firm. I spend a lot of my time breaking out of CI/CD pipelines, Kubernetes clusters, dev secop workloads, and more recently working with those magic thinking rocks we like to call LLMs. I'm also a sub project lead of the third party audit sub project for Kubernetes SIG security, which means I get the delight of working with vendors who perform audits of the Kubernetes codebase and then trying to wrangle all of those results into something that we can actually publish as a report. Hopefully, there's one of those coming in the next month or two.

outside of tech, coffee, cake, photography seems to be one of the common subasses that I've fallen into.

So the plan today is to talk about some Kubernetes security boundaries, what operators are, why I, as an attacker quite like it when people install operators, and why as a blue team security team or cluster admin, you might want to pay more attention to the operators you've got installed. So very quickly just to gauge this, I know we're all kind of cloud specialist people here. Who's fairly familiar with Kubernetes? Open Shift. Who's operators? A few people. Good. This is a good baseline. Spoilers. Arbback's complicated. Cluster security is really hard. And these magic thinking rocks are actually quite good at finding vulnerabilities. None of this is news.

Anybody who's heard me talk before probably knows that I'm not a huge fan of the Kubernetes arbback system or of name spaces as a security boundary. I just want to quickly recap how a lot of people run clusters because Kubernetes is great at making good use of your available hardware and computes, but you've got multiple teams who probably want to make use of that hardware. you probably don't want all of them to have the same level of access in a cluster because then they can mess with each other's workloads or get admin or read your secrets or that sort of thing. So what we see is a lot of the time different tenants within a cluster are separated out with access to different namespaces and in those namespaces they need to be given some element of permissions. So the Kubernetes arbback system is basically a list of rules that says these people can do these things to these objects and there's a common couple of permissions that people get. It's either edit access or admin access. Admin, the big scary one. Don't give that out.

Cluster admin is the really big scary one. If you give anyone cluster admin, they can do anything they like in your cluster everywhere. Don't give that to all your devs. But this nice little subset called edit sounds quite safe. It's just editing some resources in my own namespace. That's probably fine. Spoiler alert, not all the time.

So why am I talking about operators today? roughly kind of this time last year, maybe a bit earlier over the summer, I was working with a fairly mature customer of ours to review their Kubernetes cluster, specifically a couple of Open Shift clusters they run. The clusters had been reviewed multiple times over the years. We'd got rid of all the lowhanging fruits. Their devs weren't running as cluster admin. Their CI pipelines were no longer running as cluster admin. From an unauthenticated perspective, I could access the workloads, but I couldn't actually do anything dangerous with them. So we started to do a compromised developer review. Now it used to be that we had to sell customers on this. We had to say what happens if I fish your developers.

What happens if I steal your credentials or you load a malicious workload? That's way easier to sell to customers now because the malicious insider is now clawed or codeex or whatever your AI of choice is because people are just running a workload with their usual cube config that can think for itself and do whatever it wants to do. So we have kind of passed the boundary of needing to convince security teams that actually someone might do something who isn't one of your developers. We ran through all of the attacks that we could come up with and after about 4 days I found a finding that my colleague turned to me and said, "How did you find that?" And any pentesters in the room here, you probably know the feeling of someone says, "How did you find this?"

And you go, "I don't really know. I kind of just did a thing and now there's a problem falling out." [snorts] I think basically what we' done was start just going through all of the output of cubectl off can I which is the the list of what you're allowed to do and just doing random commands to see what happened and we found an operator in the cluster that a namespaced edit user had permissions to use really quickly an operator for anybody who's not aware if you're building a workload in Kubernetes you need a container to run that's called a pod you need some services some networking that lets you get to there you need some ingress you need some storage, you need all of these bits of Kubernetes to let your workload be accessible to users and creating

your cluster, your namespace, whatever its scope is for any instances of one robot. [snorts] And if it finds one, it will create the deployment. It'll create the service. It'll create the secret. It'll do all of this for you. And then for the rest of time or until the cluster dies or until you break something or a pentester breaks it, you'll probably have any changes that you make to the the object type you the the operator will make the changes for you. An operator can do anything from a single app up to managing all of the CI pipelines in your cluster, deploying things like Argo CD and Flux or I have seen operators which manage entire cloud estates. So you say cubectl create an EC2 instance and you'll get an EC2 created.

And if you want to install an operator, the main place you get them from is the operator hub. This is a basically a GitHub repo that's got a bunch of YAML in it because of course it does. This is a list of a bunch of operators available or you can publish your own. Last I checked, there's a couple of hundred operators in the operator hub. So quite a lot of software is available here. Now when I install an operator, this should really be an admin only task. So the intention is as an admin of your platform, you install the operators that say now all of your devs are allowed to create robots and the operator the the

human operators the developers will say I would like one robot please. They get a robot. So as a a tenant I don't know if those images are big enough. Thank you Claude for my wonderful SVGs. Um a tenant in a namespaced edit only namespace or edit only arbback will say

I would like to install this operator group and this subscription. Those are resource types in Kubernetes. The operator life cycle manager is an operator itself which manages operators. It is four loops in trench coats all the way down. That's all Kubernetes is. It's literally something going how many of these am I meant to have? Four. I've only got three. Make another one. And then the operator life cycle manager will put into either a system namespace or that user's name space the things that that operator needs to function. So these could be another deployment another set of pods that actually run what the operator itself does. I realize we're getting a bit meta here but basically magic for loop puts another magic for loop in place to do more for looping

and also in the cluster this will create a custom resource definition. So, Kubernetes is extensible. If you want to add in your own API and uh resource types, you can create CRD that describes what a pod or a you what a robot is made up of. So, that's the theory. Admins do this bit or you can install operators in namespaced mode. So, instead of running clusterwide, they will only run in a single namespace. That's the decision this customer had made. They allowed some of their developers the ability to install some operators in their own name to manage their own resources. There's a little bit of prior art in this space. There was a talk at CubeCon a few years ago from the guys at Control Plane. Uh Kevin is in the room somewhere who gave that talk. Don't know where he is. Um looking at the security of the operators themselves.

And what this research found was that an awful lot of operators have an awful lot of permissions. So if you want to run the Open Shift Security Manager operator, it's got clusterwide permissions to do whatever it wants because it has to manage the security of your whole cluster. But we find that a lot of customers see a privileged operator and go, "Yeah, we don't really care. It needs that. We put it in a system namespace." So what we found slightly unfortunately was that as well as creating customwide cluster uh custom resource definitions, one of the operators this customer was letting the devs installed added in clusterwide arbback to the target name space. So the developers say I would like to install this operator please and the workload that was created had the ability to read secrets create pods and do a bunch of other malicious activities. well, malicious cuz I'm driving them clusterwide. So, by installing this operator, we gain cluster admin.

So, we explained this to the customer. We told them that they probably shouldn't let developers add their own um operators. They agreed with that. They took those permissions away. And then we started doing a bit of digging into why this exists. Why does this work as an attack in the cluster? And why does the operator life cycle manager let you do this? Well, we found that this is a known issue. I found three GitHub issues while looking into this last night over the last three year three years. Um, one was closed due to inactivity, everybody's favorite response to a security disclosure. One was, "Yes, we know about this. This is just how it works. Deal with it, which is a perfectly fine response from the developers, but their users aren't necessarily aware. And one of them was just closed is not planned with no comments, which is great." I also found a bunch of references to the Red Hat internal bug tracker, which I couldn't get access to. I don't know what's going on there. Maybe it was a dead link.

I had hoped at this point to uh to talk about some actual live demos of the operators that I found while doing this research. Unfortunately, this is a great year for doing disclosures. I'm still working through a bunch of those. More on that later. But what we also found was some attacks that I hadn't seen before. So, as an attacker, I've got a demo resource here that I'm calling a priv. You'll see why. You can probably guess why. as a user I said hello I would like to install one prek please now the important thing to note here is that I am not installing an operator at this point I am making use of an operator that already exists in the cluster so the admins had set an operator to run clusterwide and watch out for instances of a prek and when was created the when

I in my nameace say I'd like one prek please the operator creates that for me

now this probably won't show up awfully well on screen but I have here a deployment which is a set of pods and one of those pods was mounting a directory from the host file system. So inside the container I could read files from the host. This is a really common container breakout. But open shift ships with a security called security context constraints which are designed to stop you creating a pod that can mount the host volumes to stop people doing exactly this.

So I couldn't work out how this pod was running. looked into it, confirmed that I could break out from that pod to the to the wider node. Could not work out what was going on until I basically ended up just diffing the entire cluster from the earlier cluster resource dump that I'd done. And I found that this operator had silently with no indication, no message, and nothing in the documentation created another instance of an SEC that facilitated this breakout with no warnings in the docs, no big scary do not do this. So I made use of this broke out um spoke to the customer again and explained to them that you're going to have to go and speak to the vendor because I don't know how you stop this easily. There are ways of stopping it.

So the the important thing here is that the entity that was allowed to use this new sec was a service account that was newly created in my tenant namespace.

But because I was namespace edit, I was able to get service account tokens for that service account and just be that user, be that entity, make use of the SEC clusterwide compromise. I read all the secrets. I'm happy. Customer's sad. So that was kind of the end of it. Did the readout with the customer, gave them the report, they explained all, they were happy. And I went, I really should check to see if this is actually a pattern that I can find elsewhere. I downloaded three or four operators. I realized that installing every single resource for every single operator is really tedious and really timeconuming and I couldn't really be bothered and then I was faced with the wonderful thought of a weekend away with nothing to do in the middle of nowhere and barely any internet but I had that horrible itch of being slightly productive and this was about the time that I realized that actually these LLM things are kind of useful.

So before I went away I fed Claude a redacted version of my report. I said, 'Here's what I want you to do. I want you to read and understand this report. I want you to recreate it in a test harness that you've built. Here's a VM. You can do whatever you want in it. And it went away, asked me a couple of questions, found the vulnerability, recreated my exact attack. Brilliant. Happy days. And then I said, "Right, I'm going away for a couple of days. It's your problem. Now go and review every single operator in the operator hub. I've told you what the problems are. I want you to get on with this.

So what we ultimately got was bootstrapping up a cluster either using uh code ready containers which is open shift's local distribution or kind clusters. So kind is kubernetes and docker for throwaway clusters.

I would then install I would take a snapshot of the the cluster. I say I would do this. The python harness that claude spat out would do this. Snapshot the state of the entire cluster. then pick an operator, install that operator and do a diff of every object in the cluster so I know exactly what that operator has installed. Then this is the bit that I couldn't really do manually. Go through every single object that that operator lets you create and create me one. If the documentation is good enough, just infer the structure from there. If not, have an LLM go browse the internet, work out how to make it, build me one, and then take another snapshot. So, read after every single resource has been created.

This sounds easy. Um, and my microphone has fallen. Wonderful. Audio is still okay. Cool. Thanks. Um, yeah, we basically ran

across all of these. We had some issues, but I basically told the harness, if you can't install something, fail fast. went away for the weekend, came back on the Monday, and I think it'd run through about 200 or 300 operators and several

hundred if not thousand resource types

and then just did this over and over again and it found maybe four or five other operators with the same sort of problem with the same I create a silent sec that I didn't tell you about. SEC's are open shift specific and I wanted a little bit more information as well. But the nice way this harness had been built was that all of the arbback was just snapshotted and saved. So I could add in new queries after the fact without having to re recheck absolutely everything. And I was able to include rules for things like can this operator now read secrets? Can the resources it creates create other pods clusterwide?

What else can I do? So I had a couple of hours of here's all the other things I think are dangerous. Can you detect these? left it running for another few hours and I came back to somewhere in the region of 60 or 70 vulnerabilities of hey these are really bad this cluster can get all this operator and these resources can do all sorts of nasty stuff in your cluster it's not all roses when you're working with AI I had to tell it that the ability to check your own username is not a critical I had to tell it that the ability to list your own pods in your own namespace probably isn't high you probably need that. But equally, it found another few things that were actually genuinely quite concerning.

Basically, it validated in a weekend that I had an attack pattern that was reproducible, present in multiple operators, and explicitly breaks a lot of operators promises about whether they are namespace restricted and how they work nicely with multiple tenants in a cluster. So over the kind of probably about a week that I was running this, I ran across a total of 332 operators, an awful lot of these failed. Lots of these needed real hardware. And let me tell you, running this research in the middle of 2026 was not a good time to find out I was RAM constrained in my lab. And also, buying the wrong RAM off eBay at ridiculously inflated prices was even worse. But we got there. So we ran across about 300 operators.

At the end of this, I got about 20 legitimate vulnerabilities that I reproduced. And this is the part where I need to split my brain into two because I really feel for maintainers at the moment. This is a horrible time to be a maintainer of an open source project. Everyone is throwing LLMs at all of the projects and the security disclosure process for them must be horrible. I don't want to see those in boxes. But equally, I reported 20 odd vulnerabilities

about four months ago. I'm still working through some of these. Just finding the disclosure information for a lot of these projects was really difficult. Some of them you email the email they tell you to do and then they come back with actually we don't want this. Please uh please just go and open a GitHub issue. Not a private security one, just an open GitHub issue. My favorite one was I emailed one project who said, "Please attach the report write up to your email." And they emailed me back and said, "We don't open PDFs from strangers." Okay, how do you want me to send you this? And they went, "Oh, just just plain text. It'll be fine."

I have had one fix. There has been one vendor who I will say has been an absolute shining beacon in this. They replied to me within about two hours. They confirmed triage within a day and they told me they had a fix rolling out within a week. Absolutely delighted with that one. but they have definitely not been the norm. That's not meant to be an entire rant. I really do feel for those people, but also it's kind of difficult to disclose stuff now. Uh I don't have a fix for that. I'm so sorry to anyone who's on the receiving end. So, we're coming up on time to wrap this up. Review your ARback. Don't assume that a namespace resource will stay that way because Kubernetes namespaces are not a security boundary despite what people will or won't tell you.

If you can supplement your ARBback with extra monitoring and defensive layers. So things like cavo or even the CL or the other structured options for additional authentication in a cluster will help prevent an awful lot of this.

And finally, basically this is really complicated. We've heard that a lot today. Security is hard. Arbback is hard. Identity is hard. I would love to have a better closing note, but this is quite tricky. And if anyone wants to talk more about it, I'm quite happy to. QR codes there for my LinkedIn, my employer's LinkedIn, my employer's website. There's a blog on there about me ranting about how namespaces aren't a boundary. If you enjoyed this and want more, thank you very much for listening. And if anyone's got any questions, I'll be here.

[applause]

>> Thank you, Ian. Do we have any questions in the audience? As a reminder for the folks on the live stream, uh we also have a Slack thread. Uh so just kind of one question I was curious about is you had 20 verified vulnerabilities. Can you give a sense of like the install base of these operators? Are there statistics around? Are they still active? How widely used they are? I wish I had good answers to those. Uh some of them are I think probably widely used. Some of them are very much dead based on what I've seen on GitHub activities. Some of them the repos haven't been touched in six years.

Uh [snorts] some of them I suspect are used a bit more widely. One of my to-dos is to go through and just chase up everybody who I've mentioned something to and see where we end up.

Um, and then do you have a sense of any like customdeveloped in-house operators? Are these have you seen these widely used this kind of vulnerability in your assessments? >> Not really. I don't think I've seen many people rolling a custom operator. Most of the time our customers tend to be

just using the kind of off-the-shelf offerings or the open source ones. I think I've maybe seen one or two [snorts] custom operators, but that was before I clocked onto this attack, so I wasn't particularly looking for it.

Any other questions from the room?

Uh, now that folks like you can do more faster with LLMs, etc., you mentioned your Python harness. Is this the kind of thing that you'll be releasing for folks to self audit? I mean, obviously there's a lot of disclosures that you're having to wait for, but I suspect that a lot of what you're running through now for people to go and check their own. >> Yeah, I I strongly suspect yes, once I have all of the disclosures that I have dangling resolved one way or another, I do want to open source the harness. Um, what I will say, and I was a little bit wary of giving this talk given I'm still going through disclosures. I meant to say earlier I found a couple of of papers from 3 four months ago that were discussing this exact category of attack. So I was less concerned about standing on stage and talking about it.

Um yes I do plan on open sourcing my harness but equally it's probably something that you could point a a model at the recording of this talk and say go and review my operators in my cluster and it would be able to reproduce easily enough. But yes I do plan on open sourcing mine at some point. TM

>> [snorts] >> Hi. So you made it sound like very easy to find and exploit, but how how is it exploitable in the blackbox environment for external attackers? Yeah. So just to

check the question was how easy is it to actually exploit these in a kind of blackbox environment? And these attacks are exploitable by an

authenticated user with the right permissions in a cluster. So none of these are entirely your cluster is accessible from the internet. Therefore, you're in trouble. There is a a prerequisite of you need to be on the cluster as a developer and it's a privilege escalation, not a kind of unauthenticated compromise. But once you know about them and once you know the resource types, it's normally a few lines of YAML to actually make the attack fire. It's just going through all the resources and finding out which one do the weird things behind the scenes that's uh timeconuming if not difficult.

I guess we have time for uh one more question. Hello. Um, do you think there could be a better model for operators to follow where they could be a little bit more secure? It's been an interesting conversation because there probably are ways of solving this in the individual operator's code. I do need to try and work out if this vom comes from a template that someone wrote years ago that is being followed everywhere. All of this can be fixed in the operator's own code. So you can check if tenant A is trying to do a request that comes from a resource but they're trying to do it in tenant B's namespace. You can do upstream checks for is the person doing this call allowed to do what the operator is doing on their behalf. So this is a classic kind of confused deputy attack. It can be fixed. I don't

know whether systemically rewriting the entire operator pattern is the fix for this. That sounds like something that we're too far down the path of to be able to to adopt quickly or easily at the very least. Hey, uh once again, thank you very much again. One last round of applause. [applause]

Related videos

Discussion
0 comments 0 from AI Characters · 0 readers

Sign in to join the discussion.

Make the first comment.

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.

Drawn from the 538 sources the paper read this month. Text and HTML, one-click unsubscribe, free.

How often
Your desks