VOOZH about

URL: https://thenewstack.io/inside-a-privilege-escalation-attack-via-amazon-web-services-ec2/

⇱ Inside a Privilege Escalation Attack via Amazon Web Services' EC2 - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2021-02-10 09:45:59
Inside a Privilege Escalation Attack via Amazon Web Services' EC2
contributed,sponsor-checkpoint,sponsored,sponsored-post-contributed,
Cloud Services / Security

Inside a Privilege Escalation Attack via Amazon Web Services’ EC2

Cloud breaches are becoming increasingly prevalent. We review an attack scenario that utilizes launching an EC2 instance without a key pair.
Feb 10th, 2021 9:45am by Maya Levine
👁 Featued image for: Inside a Privilege Escalation Attack via Amazon Web Services’ EC2
Check Point sponsored this post.

Check Point sponsored this post.

Cloud breaches are becoming increasingly prevalent in this modern digital era. One of the more dangerous strategies attackers deploy during a cloud breach is privilege escalation. They use this to move laterally within a cloud environment and access sensitive assets.

Here we will review an attack scenario that utilizes launching an Amazon Web Services‘ Elastic Cloud Compute (EC2) instance without a key pair.

The Attack

Maya Levine
A dedicated and analytical security engineer, Maya is Technical Marketing Engineer at Check Point Software, focusing on cloud technologies. She has deep technical knowledge in multiple domains (security, software engineering, cloud), matched with an earnest and concise communication style that connects to both technical and business audiences.

In this attack, the attacker was able to log into the console using a low privilege user’s credentials. The attacker could have obtained these credentials in many ways: brute force, phishing, purchasing stolen credentials on the dark web, and more. However, once they obtained the credentials, it gave them access to the AWS console with no programmatic permissions. Given that the stolen permissions of this user are not excessive, the attacker will attempt to escalate to a higher permission that has access to sensitive assets.

This attacker will look at Amazon Machine Images (AMI) — a template that allows you to launch an instance and which contains a software configuration (such as operating system, application server, and applications). They will choose to launch the AMI most likely to get access to a database.

Since the attacker will not have access to existing key pairs and creating a new one could alert security to their presence in the account, they will launch this AMI without a key pair. They do this by inserting a payload into the user data itself. This is not common behavior for most organizations and not best practice.

Another attack vector that can jeopardize the account is allowing users to pass User Data to the instance. This is in order to perform common automated configuration tasks. However, it can also be used to run scripts after the instance starts, which attackers will take advantage of. In this attack, the attacker uploads a file with payload scripts, which creates a reverse shell to the attacker’s machine once the instance is spun-up.

From here, escalating privileges is simply a matter of finding the right files that contain the credentials to access the database. Once the attacker logs into the database, they will search for sensitive content to exfiltrate.

The Investigation

The key first step to investigating attacks like these is a real-time, relevant, alert. However, alert fatigue is a serious problem for those tasked with analyzing and identifying potential breaches within a cloud environment. After all, what good is a Threat Intelligence solution if the relevant alerts are buried or hidden by sheer numbers? So these alerts should be both automated and security-focused. A useful Threat Intelligence solution prioritizes these alerts and provides enough context for an analyst to easily investigate an attack and put the pieces together.

Check Point Software Technologies is a leading provider of cyber security and threat prevention. Check Point CloudGuard provides unified cloud native security for networks, assets and workloads — automating cloud security, preventing threats, and managing posture — across multicloud environments.
Learn More
The latest from Check Point

Generated alerts should correspond to different attack techniques that are outlined in the MITRE ATT&CK framework. Ordered by priority (risk level), here is an example of relevant alerts that would generate for this attack using a cloud intelligence and threat hunting capability:

1. The first is Suspicious EC2 Instance without KeyPair was launched but with the UserData attribute. As previously mentioned, this is a known privilege escalation technique utilized by attackers.

👁 Image

2. The second is Anomaly Detection — anomalous network traffic. Using machine learning builds a baseline of normal behaviors. It will alert any deviations from this baseline. This alert gives the context needed to understand that data was extracted from your environment. The logs will show you all of the relevant IP addresses involved and the specific bytes related to the outbound data shift.

👁 Image

3. The next alert is Login to AWS console from a new location. This alert also utilizes machine learning and AI capabilities. If a login occurred from a location that is outside of the normal behavior scope, an alert should be generated to provide information about the login — such as country and IP address.

👁 Image

4. The last alert is Successful login without MFA. This alert has the lowest priority or risk level (Informational). By itself, it would not be alarming; unless there is a strictly enforced company policy of using MFA. However, in parallel with all the other alerts, it helps to complete the picture of the attack that occurred.

👁 Image

Understanding how and when a cloud breach occurred is no small feat. There are many pieces of the puzzle that must be put together. To effectively address these attack types, organizations need to leverage innovations to provide context and the security-oriented alerts needed for cloud intelligence and threat hunting. These measures will assist in understanding how and why a breach took place.

This post was sponsored by Check Point.

Amazon Web Services is a sponsor of The New Stack.

Feature image via Pixabay.

Check Point Software Technologies is a leading provider of cyber security and threat prevention. Check Point CloudGuard provides unified cloud native security for networks, assets and workloads — automating cloud security, preventing threats, and managing posture — across multicloud environments.
Learn More
The latest from Check Point
TRENDING STORIES
A dedicated and analytical security engineer, Maya is Technical Marketing Engineer at Check Point Software, focusing on cloud technologies. She has deep technical knowledge in multiple domains (security, software engineering, cloud), matched with an earnest and concise communication style that...
Read more from Maya Levine
Check Point sponsored this post.
SHARE THIS STORY
TRENDING STORIES
TNS owner Insight Partners is an investor in: Pragma.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.