CodeBuild GitHub runners can become AWS persistence. Backdoor a role trust policy, connect a runner project to an attacker repo, and trigger workflows inside the victim account. hackingthe.cloud/aws/post_exp...
Hacking the Cloud
Hacking the Cloud
@hackingthe.cloud
An open source encyclopedia of offensive security techniques that can be used in cloud environments. Created and maintained by @frichetten.com
600 followers1 following132 posts
Retiring cloud resources in the wrong order can leave takeover paths behind. This covers DNS and CloudFront records pointing at deleted S3 buckets, plus AWS's newer error behavior. hackingthe.cloud/aws/exploita...
Public AWS exposure is not just S3. This playbook covers quick CLI paths for AMIs, snapshots, SSM docs, roles, and CloudFront-backed buckets. hackingthe.cloud/aws/exploita...
A mounted Docker socket in Cloud Workstations can turn a dev shell into a host breakout. This walks through escape, VM service account token theft, and why scopes still matter. hackingthe.cloud/gcp/exploita...
IAM Roles Anywhere can become AWS persistence. With enough access, an attacker can register a malicious CA as a trust anchor, bind it to a role profile, and mint credentials from outside AWS. hackingthe.cloud/aws/post_exp...
Deleted Azure blobs are not always gone. If soft delete is enabled and an attacker gets a storage connection string, they may be able to list, undelete, and recover files that everyone assumed were removed. hackingthe.cloud/azure/soft-d...
S3 exfil does not always need a local file write. This shows how to stream an object from a victim bucket to an attacker bucket so the victim sees GetObject while PutObject lands in the attacker account. hackingthe.cloud/aws/exploita...
GCP privilege escalation often starts with one dangerous permission. This reference maps Cloud Build, service account, Cloud Run, org policy, and HMAC key paths to public research and scripts. hackingthe.cloud/gcp/exploita...
Found AWS keys and need the principal name? This covers API calls that leak the caller ARN and account ID through access denied errors, giving you options beyond sts:GetCallerIdentity. hackingthe.cloud/aws/enumerat...
GCP service account names tell you more than they first seem to. This quick reference covers default account formats, common key filenames, and the env var pattern you will spot in reviews and recon. hackingthe.cloud/gcp/general-...
One Entra Agent ID blueprint can authenticate every agent identity tied to it. If that blueprint credential leaks, the blast radius can span agents, users, permissions, and even tenants. securitylabs.datadoghq.com/articles/age...
A deny-all session policy can turn verbose AWS `AccessDenied` errors into a public-exposure oracle. If the error says the session policy blocked the request, the resource policy may have allowed it. This post breaks down the signal and the caveats.
Compromise the AWS Organizations management account and the default `OrganizationAccountAccessRole` can turn member accounts into admin-level pivots. This post walks through where that role appears, how trusted access and delegated admin change the picture, and where Pacu helps. buff.ly/sWrY7ra
A public S3 bucket name can leak more than objects. By abusing `s3:ResourceAccount` wildcard matching, you can brute-force the AWS account ID behind the bucket one digit at a time.
AWS persistence can hide in a rogue OIDC provider. Backdoor a role trust policy, then later use `AssumeRoleWithWebIdentity` to get fresh role credentials.
Azure Run Command is a quiet path to VM execution. If an identity can call `Microsoft.Compute/virtualMachines/runCommands/action`, scripts run through the VM agent as SYSTEM on Windows or root on Linux.
CVE-2024-28056 is not only a cross-account story. If an AWS account still has an old vulnerable Amplify role and a same-account Cognito identity pool with classic authflow, role takeover may still be possible.
GuardDuty PenTest findings can hinge on an AWS API User-Agent. This post shows how boto3/botocore builds that string, how it can be changed, and why defenders should treat it as a weak signal.
An EC2 foothold can get weird fast. This post shows how SSM Agent traffic can be spoofed: race the real agent for EC2 Messages, force Success, or open your own SSM Sessions control channel.
Two AWS CLI habits: use `-` to stream S3 objects without temp files, and set `AWS_EXECUTION_ENV` to add context to CloudTrail user-agents. Small tricks that make AWS work less annoying.
Got an AWS IAM unique ID and need the ARN behind it? For AIDA and AROA identifiers, AWS can do the lookup for you: place the ID in a resource-based policy, save, refresh, and watch it resolve to the principal ARN.
What if you could maintain AWS access indefinitely without creating users or keys? Role chain juggling exploits how assume-role refreshes credential expiration. Chain calls to the same role or cycle between roles to keep access alive.
Can attackers undo your containment actions before they take effect? IAM's eventual consistency creates a 4-second window where deleted creds stay valid. Attackers can detect and remove deny-all policies before propagation completes.
ICYMI: Our latest article covers Daniel Grzelak's research on how AWS error messages can reveal publicly exposed resources, without needing access! We cover how to use them for enumeration and detection.
Can attackers hide GCP projects in plain sight? Apps Script projects create hidden sys-* folders invisible in the console. Attackers can mimic this naming convention to stash service accounts or compute instances where no one looks.
AI agents are becoming identity infrastructure, whether we’re ready or not. While investigating agent controls, the Datadog Security Research Team found that Copilot Studio wasn’t recording certain administrative changes to agents, exposing a potential monitoring blind spot.
Got shell access to an EC2 instance? You can enumerate the AWS account ID using two methods: get-caller-identity if an instance profile exists, or the metadata service at 169.254.169.254. Both reveal the account ID plus useful context like region and instance type.
Got a list of potential corporate emails? You can verify which ones are valid Azure AD accounts without authentication using tools like CredMaster or Quiet Riot. Useful for password spraying or even pivoting to AWS root user testing.
What if an attacker could turn a simple Cognito login into full AWS account access? Misconfigured Identity Pools can grant excessive IAM permissions to anyone who authenticates, even anonymous users. Learn how this exploitation chain works.
EC2 user data scripts often contain hardcoded credentials, despite AWS explicitly warning against it. If you gain access to an instance, check 169.254.169.254/latest/user-... immediately.
Got IAM creds but tired of wrestling with CLI flags? You can spawn an AWS Console session using aws-vault. Temporary creds work directly, long-term creds need sts:GetFederationToken first. Heads up: this is noisy in CloudTrail.
ICYMI: A look at how a familiar container escape pattern shows up in GCP Cloud Workstations. We trace a path from a container to service account. If you’re using Cloud Workstations, this is a useful model to keep in mind.
Got browser cookies but no AWS credentials? CloudShell has an undocumented metadata endpoint on port 1338 that exposes IAM creds. Load the session cookies, hit the endpoint, and you've got temporary credentials for your tools.
Tens of thousands of EBS snapshots are publicly exposed right now. Unlike most AWS resources, you can list all public snapshots via the API and filter by account ID. Easy recon, zero detection risk.
How do you know what permissions compromised AWS credentials actually have? Brute force them. enumerate-iam tests safe API calls to map your access. Just note: this is loud and will light up CloudTrail.
ICYMI: AI workloads are landing in the same cloud accounts we’ve been breaking into (and defending) for years. It's time for Hacking the Cloud to catch up. We're announcing a call for research! Share your AI and LLM sec research with thousands of readers.
GCP buckets and AWS S3 buckets are nearly identical under the hood. CloudStorageFinder works for both with minimal changes - just swap the endpoint URL. Here's how to hunt for GCP buckets.
AWS Network Firewall checks SNI and Host headers but never verifies the actual destination IP. Attackers can bypass egress filtering by spoofing legitimate domains while routing traffic to malicious IPs.
In case you missed it, did you know Claude models have a "magic string" to test when a model refuses to respond? If that string enters prompt context, it can be abused to break LLM workflows until context is reset. It's the EICAR test string of the AI age. Details:
Misconfigured GitLab OIDC with AWS IAM roles can lead to unauthorized role assumption. Learn to identify and exploit such vulnerabilities with a step-by-step guide. Stay informed to protect your cloud infrastructure from unauthorized access.
Discover how to enumerate IAM users and roles in AWS without prior access! Through clever techniques like exploiting resource-based policies, you can explore insights across AWS accounts. Harness tools like Quiet Riot for efficient execution. Dive deeper here:
Exploring the impact of misconfigured AWS IAM role trust policies. Learn how wildcard Principals in trust policies can open up roles to any AWS account, posing serious security risks. Are your policies airtight? Dive deeper into this cloud security issue with us!
Discover how a default configuration in Terraform Enterprise can expose sensitive credentials via the Metadata Service. By understanding the nuances of remote execution and Docker in Terraform, you can mitigate potential security risks before they affect your cloud infrastructure.
Hacking the Cloud reposted
The 2025 Hacking the Cloud: Year in Review is out! We take a look at the growing tide of software supply chain attacks, discuss the most critical cloud vuln discovered to date, and share some stats for the site! hackingthe.cloud/blog/2025_wr...
Discover how AWS connection tracking affects security group rules. Once connections are established, they persist even if rules change. Learn how this impacts security, illustrated with EC2 instances and penetration testing scenarios.
Dive into "CI/CDon't", an AWS/GitLab-themed CTF where you can test your security chops on vulnerable infrastructure. Deploy it using Terraform and explore fun, low-difficulty CI/CD challenges. Remember, it's in your AWS account, so handle with care! Check it out:
Learn how to bypass AWS GuardDuty's Tor Client detection on EC2 instances without triggering alerts. By leveraging Tor bridges and using obfs4proxy, you can connect discreetly to the Tor network, maintaining privacy while avoiding unauthorized access warnings. More details here:
Hacking the Cloud reposted
New on @hackingthe.cloud, did you know that attackers can prevent you from kicking them out of your environment in certain situations? Eduard Agavriloae shares his research on how attackers can nullify containment attempts! hackingthe.cloud/aws/post_exp...
Lambda's environment variables hold IAM credentials that attackers can target via file read and SSRF vulnerabilities. They can also extract event data using SSRF exploits. This blog explores practical techniques for exploiting these vulnerabilities in Lambda functions.
Public AMIs can reveal AWS secrets! If you have an account ID, you can use the AWS API to find these AMIs and launch instances to look for sensitive data. Manual and automated scanning can help find credentials, but remember: curiosity must come with a conscience.