How to Hack Like a Ghost: Breaching the Cloud - podcast episode cover

How to Hack Like a Ghost: Breaching the Cloud

Jul 20, 202537 min
--:--
--:--
Download Metacast podcast app
Listen to this episode in Metacast mobile app
Don't just listen to podcasts. Learn from them with transcripts, summaries, and chapters for every episode. Skim, search, and bookmark insights. Learn more

Episode description

Serves as a comprehensive guide to modern ethical hacking, with a strong focus on cloud environments and sophisticated offensive security techniques. It explores various attack methodologies, from initial reconnaissance and building anonymous hacking infrastructure using tools like Tails and bouncing servers, to exploiting vulnerabilities such as Server-Side Request Forgery (SSRF) and Server-Side Template Injection (SSTI). The text details how to infiltrate cloud services like AWS and Kubernetes, demonstrating privilege escalation, data exfiltration, and maintaining persistence within dynamic infrastructures. Furthermore, it touches upon discovering sensitive information through open-source intelligence and the nuances of exploiting CI/CD pipelines and data processing frameworks like Spark, ultimately aiming to access and understand critical organizational data, including email systems.

You can listen and download our episodes for free on more than 10 different platforms:
https://linktr.ee/cyber_security_summary

Get the Book now from Amazon:
https://www.amazon.com/Hack-Like-Ghost-Sparc-Flow/dp/1718501269?&linkCode=ll1&tag=cvthunderx-20&linkId=7bdebbf4d22ab65edad3114d43f237da&language=en_US&ref_=as_li_ss_tl


Discover our free courses in tech and cybersecurity, Start learning today:
https://linktr.ee/cybercode_academy

Transcript

Speaker 1

Welcome to the deep dive. We take a stack of information and extract those surprising nuggets of knowledge. Today we're plunging into a truly fascinating and frankly a bit in settling area that has entirely redefined cybersecurity, hacking the cloud. Our mission for this deep dive really is to understand just how profoundly the landscape of digital intrusion has shifted.

We're going to sort of shed the old mental models of traditional network attacks and instead explore what it truly means to hack like a ghost in our modern cloud powered world. We're drawing our insights from Sparkflow's compelling work how to Hack like a Ghost Breaching the Cloud.

Speaker 2

And what's truly fascinating here, I think, is how the very architecture of cloud computing, and also principles like DevOps you know, which are designed for efficiency for speed, they also kind of inadvertently create entirely new classes.

Speaker 1

Of vulnerability right new ways.

Speaker 2

In exactly, we'll discover how attackers can manipulate core infrastructure elements from well virtually anywhere on Earth, which is a stark contrast to the old days of simply mischie hopping within a physical network a huge change.

Speaker 1

So what does this cutting edge knowledge mean for you listening in? Maybe you're prepping for a crucial meeting, or just catching up on the field, or maybe you're just driven by pure curiosity. Well, you're about to get a unique shortcut to being well informed on the bleeding edge

of cybersecurity. We're going to trace a hacker's sophisticated journey from setting up completely anonymous operations to taking over critical cloud infrastructure and ultimately even accessing deeply personal data and company emails. Okay, so let's unpack this. The book argues that the entire zeitgeist, the spirit of the times, is

changing in cybersecurity. Why can't attackers just use their traditional bag of tricks, you know, like a classic sequel injection attack against these sprawling modern cloud companies.

Speaker 2

Well, if we zoom out and connect this to the bigger picture, it's really about a fundamental architectural shift. Think about it. Companies aren't typically spinning up physical windows domain controllers in their server rooms anymore, not usually.

Speaker 1

Right, it's all cloud consoles now exactly.

Speaker 2

Instead, they're launching databases, dock or containers, even entire identity systems like active directory with literally one click in a cloud environment, and this fundamentally alters the attacker's ultimate goal.

Speaker 1

It's huge.

Speaker 2

It's no longer just about taking control of individual machines. That's almost secondary. Sometimes it's about gaining control over the entire infrastructure itself, the control plane.

Speaker 1

In DevOps too, you mentioned it's more than just a buzzword, isn't it. It feels like it changes everything.

Speaker 3

Oh, absolutely exactly.

Speaker 2

DevOps principles things like infrastructure as code, where.

Speaker 1

The whole setup is basically a script precisely.

Speaker 2

That and containerization mean companies are in this state of constant change. They're deploying new code, new applications at lightning speed. The old it mantra you know, if it's working, don't change it, that's completely out the window.

Speaker 1

Okay, So constant change, more opportunities for.

Speaker 2

Mistakes, that's part of it. This rapid evolution means that vulnerabilities that might have been mind or may be overlooked in a classic setup, they can acquire what the source calls lethal potential in the cloud. Your traditional hacker intuition, which might have served you well in the past, well, it definitely benefits from some small adjustments.

Speaker 3

Let's say to stay effective.

Speaker 1

Got a doubt, Okay, So before any actual hacking begins, the book emphasizes a crucial first step, becoming a ghost. This means focusing heavily on operational security OPSEC and building an anonymous, efficient hacking infrastructure. Why is this initial set up so incredibly vital, especially for real world attackers, not just you know testers.

Speaker 2

Yeah, this raises a really important question about anonymity. It's critical Unlike professional red teamers or penetration testers who often have a clear scope, maybe even do.

Speaker 1

Over the permission basically.

Speaker 2

Right, real hackers, though, they're betting their actual freedom on their ability to remain completely anonymous. And the source makes it crystal clear. Even popular VPN services will always always keep some form of logs, always, despite the marketing, despite the marketing, and even privacy networks like tour aren't a magical shield. They have limitations. You have to pay, As the book says, as much attention to your physical trail

as you do to your Internet fingerprint. Leave no trace anywhere, so walk.

Speaker 1

Us through it. What does this anonymous setup actually look like in practice? The book gets pretty specific.

Speaker 2

It's all about layers, layers of obfuscation. First, an attacker would likely use an ephemeral operating system, something like TAILS loaded onto a USB.

Speaker 1

Drive fhmeral meaning temporary exactly.

Speaker 2

This OS is designed to flush everything away on every reboot. Nothing sticks, and it forces all Internet connections through tour, making it incredibly difficult to trace back.

Speaker 1

Okay, step one.

Speaker 2

Then what From there? They connect to a series of bouncing servers. These are virtual hosts like vms, set up anonymously in different locations, maybe different providers. Crucially, these bouncing servers never directly interact with the target.

Speaker 3

That's key.

Speaker 1

You're like middleman.

Speaker 2

Exactly, secure staging grounds. They host management tools like Terraform, Docker stuff to build the next layer. The actual attack infrastructure, the servers doing the real work, is even more fleeting, used for only a few days maybe, and completely unique to each operation, then destroyed.

Speaker 1

Wow. This level of automation using tools like Docker and Terraform, it all sounds like adopting a DevOps mindset for the hacking process itself.

Speaker 2

That's spot on it really is. It's about embracing efficiency. By automating the setup, it becomes much easier to spring fully configured attacking servers into existence, pop them up, tear them down, and that significantly reduces the gens of making critical mistakes when you're operating under pressure.

Speaker 1

Makes sense, fewer manual steps, fewer errors, right.

Speaker 2

The book gives examples of how an attacker can use simple commands like Docker, pul potion stuff to grab a pre built hacking tool, or terraform apply to automatically deploy their command and control servers their C two.

Speaker 1

That's the hacker mission control right.

Speaker 2

Yeah, basically where they manage the compromise systems and Terraform sets it all up even with secure connections, TLS certificates the works.

Speaker 1

Okay, anonymous infrastructure meticulously set up. What's next reconnaissance. I assume our fictional targets in this deep dive are Gretch, Politico, a firm specializing in political campaigns, and its close partner ms r ADS. How do hackers even begin to dig into these targets in a vast cloud environment, Where do you start looking?

Speaker 3

Well?

Speaker 2

This phase is all about what the book calls healthy stocking.

Speaker 3

Huh.

Speaker 2

It means gathering every piece of public facing information imaginable, just scooping it all up. The source emphasizes searching platforms like SlideShare, loogle drives, script document cloud places where documents might.

Speaker 1

Leak publicly accessible files they forgot about or didn't secure properly exactly.

Speaker 2

They use specific targeted search engine terms like site dot dox, c stack, Google dot com, gretch, Politico to uncover these digital breadcrumbs.

Speaker 1

And beyond public document where else can they unearth valuable clues about their target? Seems like documents are just one piece, oh for sure.

Speaker 2

GitHub is an absolute gold mine, a potential gold mine anyway. While basic searches have their limits, The real trick the book suggests is to download entire public repositories related to the target and then unleash the full wrath of good old rep on them.

Speaker 1

Rep The command line search tool YEP a powerful.

Speaker 2

Tool that can quickly search through massive amounts of text for specific patterns. They'd be looking for sensitive strings like ossicritic, sess kei, or maybe begin private key, things that should never be.

Speaker 1

In public code credentials just sitting there.

Speaker 2

It happens more often than you'd think. They also script code snippets from public code sharing sites like just dot GitHub dot com and pastebin dot com. Sometimes developers paste things there for quick sharing or debugging and accidentally expose log file extracts or even database extracts hops.

Speaker 1

Wow. Okay, so after all this digital slew thing, this healthy stocking, what did the reconnaissance reveal about Gretch, Politico and mxr ADS.

Speaker 2

Well, the initial SUITEP showed their core service is building these detailed voter profiles and that they have this incredibly intertwined relationship with mxr ADS for the advertising side, very close partners.

Speaker 1

Which could be good for business but bad for security exactly.

Speaker 2

The book notes this intertwined connection, while profitable, could prove fatal to both companies if one gets compromised. They also identified numerous subdomains like Dashboard dot Gretchpolitico dot com using specialized tools like sublister R and fern Melder, and then they performed ENDMP scans on those domains to see what ports were open, what services were running.

Speaker 1

Building a map of their online presence.

Speaker 2

Right. This whole process ultimately provided over one hundred domains belonging to both organizations, which, as the book says, offers a significant luxury of choice for finding a way in lots of doors.

Speaker 1

To check one hundred domains with literally dozens maybe hundreds identified. How do you even begin to find the ulnerabilities? It sounds like trying to find a needle in a haystack the size of a continent. Overwhelming.

Speaker 3

It absolutely can feel that way.

Speaker 2

Yeah, but the book emphasizes, you know, the more you practice, the better you will get. Experience counts, and in a full cloud environment, there are shortcuts. A crucial one is to reveal the real domains behind public facing domains.

Speaker 1

How do you do that?

Speaker 2

By looking for cnam entries in DNS records instead of just the raw IP addresses. A CNME is basically like a nickname for a server. It lets multiple web adjustes point to the same underlying resource.

Speaker 1

Oh okay, so it reveals the actual service provider.

Speaker 3

Sometimes exactly.

Speaker 2

This simple step revealed that many msr ADS domains were actually hosted on AWS using common services like CloudFront for content delivery, S three for storage, and ELB for load balancing. Standard stuff, but crucially gretch Politico's own dashboard URL dashboard dot gretsch politico dot com even pointed to an mxr ADS domain.

Speaker 1

Directly confirmed how tightly length they are.

Speaker 2

Yeah, strong confirmation of those deep operational ties.

Speaker 1

And what was the big aha moment in this phase, the critical breakthrough that opened the first real door.

Speaker 2

The discovery of vulnerable S three buckets. S three aws' is simple storage service basically.

Speaker 1

Cloud file story right use for everything.

Speaker 2

Pretty much now default S three security has tightened up over time, thankfully, but the book explains that the four overlapping settings, things like access control lists ACLS, core S configurations, bucket policies, and IAM policies. It all makes S three security very.

Speaker 1

Convoluted, easy to mess up, them.

Speaker 2

Very easy to misconfigure, and for one domain misc dot mxrads dot com, while directory listing was denied, you couldn't just browse it using the awscli, the command line tool to run list objects h V two. While that surprisingly revealed over four hundred thousand files stored in the single.

Speaker 1

Bucket, whoa just sitting there accessible.

Speaker 2

Accessible if you knew the command to list them, including an empty index dot m HTML at the root, which is often assigned. Something's not quite right.

Speaker 1

Okay, four hundred thousand files is a lot, but maybe not. The keys to the kingdom was that the biggest find.

Speaker 2

No, not the biggest breakthrough, but certainly highlighted poor configuration hygiene.

Speaker 3

A warning sign.

Speaker 2

The truly critical vulnerability, the one that really crack things open, was a server side request forgery or SSRF, found on demo dot mxrads dot com.

Speaker 1

SSRF. Okay, remind me again what that lets an attacker do, right.

Speaker 2

SSRF is like tricking a server one that's sitting inside a supposedly secure network to make a request on your behalf. It makes requests to other internal systems that the server can reach, but you from the outside can't.

Speaker 1

Okay, So you're using the server as a proxy to hit internal stuff.

Speaker 3

Essentially, Yes.

Speaker 2

By manipulating a URL and the demo application using a tool like burke Suite, a standard web app testing toolkit, the attacker could force the application to make internal requests specifically to the AWS metadata API.

Speaker 1

Ah, that's special address HTTP dot one six nine point two five four point one six nine point two five four littles, that's the one. Here's where it gets really interesting. As you said, this isn't a normal web address. What kind of information does this mysterious metadata API actually reveal?

Speaker 2

Yeah, it's a special internal address unique to cloud environments like AWS instances. Those virtual computers can query it to get information about themselves. Like asking who am I, what.

Speaker 3

Can I do? It reveals a whole trove.

Speaker 2

Of metadata, the machine's host name, its internal IP address, firewall rules, basic identity cards.

Speaker 1

Stuff. Okay, useful but maybe not devastating.

Speaker 2

Ah. But the dirty secret, as the book puts it, is that it can also expose the user.

Speaker 1

Data script, the script that runs when the machine first boots.

Speaker 2

Up exactly, often used for setup configuration, and sometimes developers put sensitive stuff in there. For mxri ads demo server, this user data script contained crucial environment variables, including a reference to a secrets dot em V file and guess what was in.

Speaker 1

There, daz passwords jackpot.

Speaker 2

The script or the file it pointed to yielded many passwords to access Cassandra clusters, Cassandra being a popular Noseql database.

Speaker 1

Yeah, okay, direct database access and it gets better.

Speaker 2

It also revealed IAM role credentials for the machine.

Speaker 1

Itself, imm identity and access management. The permissions in the machine has within AWS.

Speaker 2

Correct and these role credentials are often not subject to the same IP restrictions as regular user credentials. They're incredibly valuable because they can potentially be used from anywhere, So.

Speaker 1

A seemingly simple SSRF vulnerability maybe in a forgotten demo app could spiral into gaining highly privileged credentials for other AWS services. That's quite a leap.

Speaker 2

Absolutely, It's a classic cloud escalation path. Even though the attacker was initially denied direct access to list all S three buckets using these credentials, the im role itself, the specific permissions assigned to that demo application was successfully used to list objects V two within a different important looking bucket mex rads DL, and that revealed hundreds of thousands of JR files and other binaries, probably application code libraries.

Speaker 1

It's like finding a key that doesn't open the front door, but opens a side door to the engineering lab.

Speaker 2

That's a good analogy. Yes, once you're inside, even limited permissions can often be leveraged to find more access.

Speaker 1

Okay. The book then describes another major vulnerability found on a different site Www. Dot surveysandstats dot com. What was that one?

Speaker 2

That was a server side template injection or SSTI vulnerability.

Speaker 1

SSTI sounds similar to SSRF, but different.

Speaker 2

Similar in that you're tricking the server, but the mechanism is different. Instead of making external requests, you're tricking the server into executing code you provide within its own templating engine.

Speaker 1

Templeting engine like for generating web.

Speaker 2

Pages exactly things like jinga two in Python or handlebars and JavaScript. They take data and put it into a template. By injecting a simple string like into a form field on the website and seeing the server respond with sixteen instead of the original string means.

Speaker 1

The server actually calculated eight times too it ran code.

Speaker 2

Bingo confirmed the vulnerability. This then allowed the attacker to use advanced features of the programming language Python, in this case things like introspection and reflection, essentially letting the code examine and modify itself to eventually call subprocess.

Speaker 1

Popin, which basically means.

Speaker 2

Arbitrary code execution on the server. Full control, They could make the server run almost any command they wanted.

Speaker 1

Game over for that server then, and what was the immediate juicy payoff from gaining that arbitrary code execution.

Speaker 2

Well, they immediately gained SEES simple Email Service credentials, aws's email service, useful.

Speaker 1

For sending spam maybe or something more.

Speaker 2

More importantly, it confirmed that survey sandstats dot com belonged to the same AWS account as mxr ads, tying the infrastructure together. Further, and even more critically, they found that while external Internet access was blocked on this particular server at common security measures, so they.

Speaker 1

Couldn't just download tools or send data out easily.

Speaker 2

Right, But they discovered they could smuggle in a request to a bucket in our own AWS account by exploiting something for an S three VPC N point configuration. It's a way for internal servers to talk to S three without going over the public Internet clever, so.

Speaker 1

They could use S three as a communication channel exactly.

Speaker 3

This was huge. It led to a reliable way to communicate with.

Speaker 2

The outside world from this otherwise sealed off survey app, and it enabled command execution through S three files. They'd upload a command file to their own bucket, the server would fetch and run it via the endpoint and send results back the same.

Speaker 1

Way, essentially creating an S three base back door. Wow, it's like finding a secret pneumatic tube system out of a locked room.

Speaker 2

Hey, yeah, something like that. A very effective stealthy channel.

Speaker 1

Okay, So with initial access established via SSRF and SSTI leading to code execution and a back door, the hacker discovers there inside a container, but not just any container one managed by a Kubernetes cluster. For those less familiar, what does Kubernetes fundamentally change about the hacking target compared to just compromising a single traditional server. Right.

Speaker 2

Kubernetes, or cube as it's often called, is described in the book as the ultimate container orchestrator. It's a game changer. Imagine hundreds, maybe thousands of software containers which are like lightweight, isolated virtual machines, all running different parts of applications. Kubernetes manages all of them. It starts them, stops them, connects them, scales them up or down automatically based on demand.

Speaker 1

So it's like the conductor of a huge orchestra of software.

Speaker 3

That's a great way to put it.

Speaker 2

The book explains its core components pods, which are groups of one or more containers that run together, services which handle internal load balancing and networking between pods, and crucially, the API server and the etcetera database. These maintain the cluster's desired state. Kubernetes is always trying to make reality match that desired state, so attacking it isn't like attacking one server. It's about understanding and manipulating this complex dynamic system.

Speaker 1

Okay, so find yourself inside one of these containers, maybe through web vulnerability like we just discussed, how do you break out or gain more control over the entire Kubernetes cluster itself. That sounds like a monumental leap.

Speaker 2

It is, but often, like with S three, it comes down to misconfigurations. Small oversights can have big impacts and cube. The first key discovering the book scenario was that the compromised container was running with a default service account.

Speaker 1

A service account being like an identity for the software.

Speaker 2

Itself exactly, and Kubernetes gives containers a token, a JWT JSON webtoken like a digital passport associated with the service account. It's usually mounted automatically inside the container at a specific filepath run secret Scubernetes dot Io service account token. By grabbing this token, the attacker could directly query the Kubernetes API server pretending to be that container.

Speaker 1

Okay, but what can a default account usually do? Isn't it lockdown?

Speaker 2

It should be, But here's the critical part. The book notes that if this default account was unwittingly granted extra privileges by an administrator, maybe for some forgotten reason, then all the other pods running with the same identity will automatically inherit these same privileges. Suddenly, that default account isn't so basic anymore.

Speaker 1

Uh, A shared identity with escalated permissions precisely, and in this case, it allowed the attacker to list hundreds of pods specifically in the prod name space, usually the live production environment.

Speaker 2

And even more, they could extract their full Yamel manifests.

Speaker 1

The configuration files for those pods.

Speaker 2

Yes, revealing things like environment variables, container images used, and even secret key ref pointers. These are references that tell Kubernetes where to find other secrets like database passwords or API keys and inject them into the pod.

Speaker 1

So looking at the POD's configuration reveals pointers to the actual secrets if.

Speaker 3

Configured that way.

Speaker 2

Yes, it's like finding a treasure map inside the container.

Speaker 1

This sounds like a massive win an insider's view of the entire production environment, potentially exposing very sensitive data. What kind of stuff was actually exposed through this elevated Kubernetes access.

Speaker 2

They literally discovered containers configured to load AWS credentials directly as secrets, very sensitive stuff by abusing those Kubernetes service account privileges. Using the token they found, they could ask the Cube API to retrieve secrets like dbcore password directly from the cluster's secret store.

Speaker 1

Wow, just ask Cube for the password.

Speaker 2

If the service account had permission, Yes, and this led directly to campaign database credentials for a mysucle database. This allowed them to infiltrate gretch Politico's core campaign database and pull pretty much everything detailed customer data, campaign budgets, conternal notes, and even links to the creatives. The actual campaign materials like videos and images which were hosted.

Speaker 1

On S three And could they access those S three files too?

Speaker 2

Yes, because the Kubernetes secrets also likely contained AWS keys, or maybe the service account itself had im permissions. They leveraged their new found I AM access to download these videos directly from S three, which, as the book points out, underscores a key cloud principle. A cloud provider does not care where you are. As long as you have the right credentials, you can download whatever you want.

Speaker 1

Location is irrelevant. Only credentials matter. Chilling very much So Okay, beyond databases and file storage, what other powerful tools did the hacker's target to achieve even deeper more systemic access within the organization's infrastructure.

Speaker 2

They pivoted to the infrastructure management tools, things like Jenkins.

Speaker 1

And chef AH, the CICD pipeline tools, continuous integration, continuous delivery exactly.

Speaker 2

These are absolutely central to modern development and deployment processes. Jenkins in particular is often described, maybe slightly dramatically, as the almighty god of any infrastructure.

Speaker 1

Why so powerful because.

Speaker 2

It often has permissions to do everything. It can compile code, run automated tests, deploy applications straight to production. It can even create new U Kubernetes resources, or spin up entirely new AWS machines. It's the engine driving the whole development life cycle. So if you compromise Jenkins, you potentially own everything. By identifying these Jenkins instances, the next logical step for the attacker was clear, pay in an infrastructure management tool, take control of the God machine.

Speaker 1

Right. How did they manage to gain access to these incredibly powerful automation tools. That sounds like it should be locked down.

Speaker 2

Tight It should be, But they got creative. They leveraged their existing GitHub token, the one they'd previously obtained via that Kubernetes secret.

Speaker 1

Ah reusing credentials found earlier.

Speaker 2

Exactly, they used it to list mxr AD's private repositories on GitHub this time, and there they found a repo named cookbook mextrads jenkins.

Speaker 1

G cookbook often means CHEF right, the configuration.

Speaker 2

Management tool that's the strong hint. Yes, CHEF uses recipes collected in cookbooks to configure servers. They then discovered that certain AWSAPI calls specifically describe instances which are often overlooked by security teams because they seem informational, could sometimes expose the user data scripts on running EC two instances. Remember those boot up.

Speaker 1

Scripts, the ones that sometimes contained secrets yep.

Speaker 2

And these scripts, maybe used for initial bootstrapping of a CHEF managed server, could sometimes contain CHEF private keys.

Speaker 1

Oh wow, so the key needed to authenticate to the CHEF server was just sitting in the user data of a running.

Speaker 2

Instance in this scenario, Yes, a major oversight. This allowed the attacker to register a new malicious machine with the CHEF server, pretending to be a legitimate node. Then, using the Knife tool Chef's command line interface, they could list all the CHEF cookbooks the server managed, including that crucial Jenkins CI one they saw on GitHub. They could now see exactly how Jenkins was configured and potentially find vulnerabilities or hard coded secrets within the chef recipes themselves.

Speaker 1

Incredible. It's like a chain reaction of compromises, each step enabling the next. What about serveralist functions like abus LAMB Are they vulnerable in similar ways?

Speaker 3

They are?

Speaker 2

Lambda functions, as the book describes them, are essentially glorified crontabs, small pieces of code that run on demand, triggered by events, without you needing to manage a full server.

Speaker 1

Very popular, and presumably they also need permissions to do things they do.

Speaker 2

They run with an assigned I and M role, just like EC two instances. The attackers found a function called lambda di pasinc. Its job was to process mxr AD's logs and send them over to a gretch Politico S three bucket, crossing that organizational boundary again. Now, a developer, maybe Kevin mentioned hypothetically, might have had his personal access denied to that gretch Politico bucket. But the attacker realized something crucial.

Speaker 1

Let me guess the lambda function's role had permission.

Speaker 2

You got it, the lambda's role the identity assigned to the function itself could access that foreign GP bucket the function needed it to do its job. This meant that the attacker could simply choose to register a new Lambda, assign it this new role, the one with cross account access, and execute whatever code we like.

Speaker 1

So they could essentially hijack the lamb as permissions to run their own code with access to the other companies as three bucket.

Speaker 2

Precisely taking over the lambda function meant taking over its privileges another powerful vector.

Speaker 1

Okay, this is dizzying in such a highly volatile cloud environment where applications and servers are constantly changing, maybe even automatically destroyed and recreated. How do you maintain persistence after gaining this kind of access. It seems like it would be incredibly difficult to stay hidden and keep your foothold.

Speaker 2

That's a major challenge for attackers. The book emphasizes the strategy of deploying multiple backdoors with different properties. Don't rely on just.

Speaker 1

One, diversify your persistence methods exactly.

Speaker 2

One effective method described is a stable back door using a tiny Alpine Docker image. Very lightweight, this container is designed to simply regularly beacon back home check in with the attacker C two server for commands and be cleverly hidden in plain sight.

Speaker 1

How do you hide it?

Speaker 3

Maybe by naming it.

Speaker 2

It's something innocuous, something that looks like a legitimate system component like Amazon today plug in essentials, something as sissiedmin might glance over. And because Kubernetes is designed to bring destroyed pods back to life based on its deployment configuration, if the backdoor container is part of that configuration, ensures continuous access even if the original compromised container is terminated or the node restarts.

Speaker 1

UH using the orchestrator's self healing feature against itself.

Speaker 2

Clever very and for even more stealth. Another back door might involve a simple crown job hidden on a less volatile system, or perhaps an even more subtle Docker container that does very little, just waits for a specific trigger layers of persistence.

Speaker 1

Okay, so persistence achieved. The deep dive then moves to a completely new target environment within gretsch Politico, a Spark cluster. What makes Spark such an interesting or perhaps uncharted target for a hacker.

Speaker 2

Well, Spark is a hugely popular framework for big data processing think large scale analytics, machine learning, but at the time the book was written. There are apparently almost no public hacking write ups or tools specifically targeting Spark clusters, so.

Speaker 1

It was uncharted waters for security researchers and attackers.

Speaker 2

Largely yes, which makes it interesting. The attacker first had to learn how Spark clusters actually work, understanding the roles of the master node, the worker nodes where calculations happen, and the driver program that coordinates it all. Then they figured out something really clutter by creating a malicious Spark application, a program submitted to the cluster for processing that included a subprocess pope and call hidden inside a standard Spark transformation like a math function.

Speaker 1

Wait, you can embed OS commands inside a data transformation.

Speaker 2

Apparently so in the setup. This allowed them to execute arbitrary commands on the Spark worker nodes whenever that part of the Spark job ran crucially without needing any direct logging credentials for those worker nodes.

Speaker 1

Wow, using the Big data engine itself to run commands remotely.

Speaker 2

Yeah, leveraging the system's own distribute computation functionality against itself.

Speaker 3

Very neat.

Speaker 1

And what was the ultimate prize unearthed within this compromise Spark cluster? What did they find There.

Speaker 2

They discovered that Gretsch Politico was using a tool called S three S to mount an S three bucket named gretch Notebooks locally onto their Spark cluster nodes. Like attaching a cloud drive directly to the system.

Speaker 1

Gretch Notebooks sounds like data science territory exactly.

Speaker 2

This bucket was full of dot IPMD files. That's the file extension for Jupiter notebooks.

Speaker 1

The interactive coding environments data scientists love.

Speaker 3

The very same.

Speaker 2

And inside this bucket, nested in a directory called exports twenty, they found plainold dot CSV files COMMA separated value file.

Speaker 1

Ah raw data exports. So what exactly was contained in those CSV files?

Speaker 2

The mother load pretty close A list of clients, all right, as the book puts it, and not just current customers, but perspective ones too, complete with incredibly detailed information. We're talking annual revenue, last contact date, initial contact, country, account manager, zip code service purchased.

Speaker 1

Good grief. It's highly sensitive business intelligence just sitting in csvs in an S three bucket mounted to.

Speaker 2

Spark YEP A gold mine of strategic data.

Speaker 1

Okay, Beyond these individual files and databases scattered across different services, was there a single junction, like a central hub where all of Gretch Politico's most valuable data might converge.

Speaker 2

Yes, and this is where it gets truly deeply unsettling. By exploiting an im list policies permission, they gained somewhere along.

Speaker 1

The way that lets you list all the permission policies in the AWS account.

Speaker 3

Correct.

Speaker 2

They were scanning through policies looking for excessive permissions, and they discovered one named run deck monopolicy. Run Deck is another automation tool. This IAM policy granted close to full admin privileges over AWS, almost god mode within the AWS account. Oops, big oops, including qrickly Redshift permissions full control over Amazon.

Speaker 1

Redshift Redshift, being aws's cloud data warehouse service right designed for massive analytics.

Speaker 2

Precisely, this permission led them directly to several Redshift clusters, including ones ominously named BI likely for business intelligence and finance.

Speaker 1

Oh boy, what kind of sensitive, perhaps even chilling data was exposed in these central Redshift data warehouses?

Speaker 2

Well, As the hacker narrator notes, nothing beats a good old fashioned sequel database where we can query enjoining data to our hearts content. This Redshift cluster, particularly the buy one, was indeed the junction of almost every data input poured into gretch Politico's infrastructure. Everything ended up here.

Speaker 1

So what do they find.

Speaker 2

They found full online activity logs of individuals, websites, visited, ads clicked. They found links to social media profiles. They found incredibly granular data segments used to profile people with names like politics, Lane left, or health chronicle pain, and even look alike segments profiles of people who were statistically similar to existing customers or targets. The book details the

profile of one specific individual, Francistima, as an example. It included his device type, his last known location derived from mobile data, a link to his Facebook profile, his inferred interests, and even a calculated character map enumerting his level of influence, impulse, and ad interaction how likely he was to click, buy, or share based on his profile.

Speaker 1

That level of detail is well, it's the core product of a company like that, but seeing it laid bare is quite something, incredibly detailed and yes, frankly chilling.

Speaker 2

It really shows the sheer scope and granularity of data collection and analysis happening in these systems.

Speaker 1

Okay, they've got the core data, the business intelligence, the customer profiles. What was the absolute final step in this deep dive, the final piece of the puzzle for the attackers.

Speaker 2

Hacking company emails, getting into the internal communications.

Speaker 1

The crown jewels for corporate espionage. Often they manage that.

Speaker 2

Again, leveraging previous fines, they went back to Gethub, searching specifically for gretch politico repositories related to IT or GAPS short for Google Apps now Google Workspace. They found a private repository named it gress suite apps looked like code for internal tools managing their Google Workspace setup.

Speaker 1

Automating user creation, maybe group management, that kind of thing exactly.

Speaker 2

While no direct passwords were found in the code, this time, they identified that this internal application used a Google Service account to perform its administrative actions. And where was the key for this powerful service account stored in AWS Secrets Manager, another AWS service specifically for storing secrets securely.

Speaker 1

Ah But they already had broad AWS access by this point right, including possibly access to Secrets Manager.

Speaker 2

Precisely, the run deck monopolicy likely gave them the necessary permission, So.

Speaker 1

Once they had that Google Service account key, they.

Speaker 2

Retrieved the key file from AWS Secrets Manager. Now, this key, when combined with a critical Google workspace setting called domain wide delegation privileges.

Speaker 1

What was it that too?

Speaker 2

It's a very powerful setting. It allows a service account to act on behalf of any user within the entire Google Workspace domain if authorized by an admin. So the attackers use the service account key enabled domain wide delegation and then told it to impersonate a known super admin email address Adminute at gretchpolitico dot com so.

Speaker 1

They could act as the itadmin programmatically.

Speaker 2

Yes, this allowed them to use Google's APIs to programmatically create brand new users in Gretch Politico's corporate directory. They effectively created a new user Henniel at gretchpolitico dot com, completely out of finair, potentially with high privileges.

Speaker 1

Giving themselves a legitimate looking account inside the company's Google workspace.

Speaker 3

Exactly.

Speaker 2

This achieved admin access to GP's corporate directory and by extension, potentially full access to all company Gmail inboxes and Google Drive files, depending on the exact permissions granted. The book even concludes by sharing a redacted snippet purported to be from the CEO's emails revealing sensitive internal discussions about political stratgy like going after his public image and potentially making up a story.

Speaker 1

Wow, just wow. What an absolutely incredible and frankly terrifying journey we've just traced. We've seen how attackers no longer just target individual machines, but the very fabric the control plane of cloud infrastructure. From meticulously setting up anonymous operations, conducting incredibly deep reconnaissance, to exploiting subtle, nuanced misconfigurations and complex services like S three and Kubernetes. Yeah, all the way to stealing vast amounts of highly personalized data and

gaining complete control over sensitive company emails. It's the whole new ballgame, it really is.

Speaker 2

What this deep dog highlights so powerfully, I think is that the broad adoption and maybe the generalization of cloud computing is a truly disruptive event in cybersecurity, a paradigm shift. The focus has shifted dramatically away from individual machines towards the underlying infrastructure, the APIs, the orchestration layers, and away from traditional network perimeters towards identity, API, call and service accounts as the new boundaries to defend.

Speaker 1

The old castles and moats model just doesn't apply cleanly anymore, not in.

Speaker 3

The same way.

Speaker 2

No, the old tricks, as we discussed are rapidly becoming obsolete or at least less effective on their own, and new, far more sophisticated multi stage techniques targeting the cloud specific architecture are emerging as the norm.

Speaker 1

It's such a powerful reminder that security in the cloud isn't just about firewalls and antivirus anymore, is it. It's about deeply understanding how every single component, every automation tool like Jenkins or Chef, every LAMB to function, and every single configuration choice interacts creates a potential loophole. It's about the interconnectedness, the layers upon layers of permissions, and the sheer speed of continuous deployment. It's incredibly complex.

Speaker 2

It is complex, and for you, the learner listening in this offers a truly unique perspective. I hope it demonstrates that knowledge is most valuable when it's not just theoretical, but understood in context and applied. It hopefully encourages critical thinking about the complex digital world that surrounds us all, a world that is becoming increasingly abstract and reliant on these vast, intricate cloud systems.

Speaker 1

So what does this all mean for you? As you navigate this world, a world increasingly reliant on the cloud for everything from work to entertainment to social connection. It means that understanding the attacker's mindset, that ghost minds that we explored is no longer just for the security professionals

in the trenches. It's becoming essential for anyone who interacts with technology, build software, or relies on digital services, And it really raises a profound, perhaps unsettling question for all of us. Are the systems we rely on every day truly as secure as we believe, or are there hidden cracks, subtle misconfigurations waiting just beneath the surface, ready to be exploited by a subtle touch, a forgotten permission, or a

perfectly aimed API request. Something for you to consider as you go about your digital day.

Transcript source: Provided by creator in RSS feed: download file
For the best experience, listen in Metacast app for iOS or Android