← 返回列表

Aren't AWS Cloud Investigations the same as On-Prem? - Part 1 (AWS EC2)

单站 chesterlebron 作者 Chester Le Bron 发布 2025-07-28T08:00:00.657-05:00 入库 2026-11-18T05:14:15

Aren't AWS Cloud Investigations the same as On-Prem? - Part 1 (AWS EC2)

Introduction

If this is your first time visiting my page, welcome! If you're returning, welcome back—I'm excited to start a new mini-series. It may not be a great debate, but there are a lot of people who believe cloud investigations (we’ll be talking AWS in this series) are no different from investigating on-premises workstations or servers. To those people, I say: you are both correct and completely wrong 🤣. Jokes aside, I think this is a widely misunderstood concept that leads to so much pain and wasted time—so it’s worth addressing. Let’s talk about it. 

In this mini-series, we’ll talk about some of the most commonly used AWS services, starting with EC2. I’ll share my perspective as a Security Incident Responder/Cloud Investigator and draw parallels, but also point out the significant differences between these cloud services, their on-premises equivalents, and your investigation.

DISCLAIMER: We will certainly talk about EC2, but it would be impossible (and irresponsible) not to cover the web of related AWS services that you would likely encounter in an EC2 instance compromise. Also, I am focusing on the investigation methodology of an AWS incident, not the forensic practices involved in these cases. There are plenty of other blogs and code content covering the forensic side of EC2 investigations, so I’ll save some characters here (see References below).

What is EC2?

If you are new to my blog, I often skip over explaining the basics (one day I will dedicate more time to this), but for now I will keep things high level. Per AWS documentation, "Amazon Elastic Compute Cloud (Amazon EC2) provides on-demand, scalable computing capacity in the Amazon Web Services (AWS) Cloud...An EC2 instance is a virtual server in the AWS Cloud.**"

That last part is the most important point on the entire page—don't skip over it or make it more complicated than it is (don’t worry, learning AWS Cloud will hold your beer). Since virtual machines also exist on-premises, I think it’s worth exploring the Venn diagram of similarities and differences here.

High Level Similarities

Networking

Assigned IPv4 Address (Private) – No matter what, an EC2 instance will have one of these, and similar to a server or workstation on-prem, you’ll likely want it to communicate with other endpoints on the same network.

Other networking concepts—like routing tables, firewalls, and NACLs—exist as well. They may be applied a bit differently, but the core principles are all there.

Operating System & Software Vulnerabilities

Observability

Logging - both have some level of logging, though on-premise resources will have varying degrees of difficulty for setup and configuration.

Third-Party Tooling - tooling like EDRs and other observability agents can exist on both and can certainly elevate your investigation effectiveness if used and configured properly.

High & Lower Level Differences

Reachability

Elastic IP Address/Public IP Address – You can just make an EC2 instance public… This concept doesn’t exist in the same way in an on-premises enterprise environment. You have to intentionally put a device in a certain spot or maybe install software such as a DDNS server and expose your endpoint through manual configuration or some other OS level type change(s).

None of that is necessary in AWS—as long as the EC2 is in a VPC with an internet gateway attached and a routing rule allowing ingress traffic from the internet. Note: In an on-premises environment, you may have a firewall fronting your NAT’d resources, but those resources are most likely behind a firewall and not public to the internet. In AWS, a simple configuration change on the EC2 itself allows for public access—which only takes a few clicks in the AWS console. In an enterprise AWS environment, those prerequisites will likely already exist, making deploying a public EC2 trivial.

Operating System & Software Vulnerabilities

In AWS, you can build EC2 instances that are derived from OS and software images available on the public AWS Marketplace which means you inherit these images and their baggage. You can also use your own images of course but regardless, there are a variety of options which also means, there's a variety of risk that comes along with their usage in the form of vulnerabilities. The difference here isn't that vulnerabilities do not exist for on-prem virtual machines but the variety and scalability of that risk that comes with moving at cloud speed. When you combine that with the reachability aspect, this can be a very dangerous duo.

Local User & IAM Role Profile

EC2 instances will have a local user provisioned called, "ec2-user" but the most dangerous "user" (only using this term for my folks used to on-prem) would be the Associated IAM Role Profile, which translates to an IAM Role. Once a threat actor makes it onto the EC2 instance, those credentials can be obtained fairly easily if they do not already have them (depends on the attack method). SSRF is certainly one method to get in and if you're using IMDSv2 (and God I hope you have it enforced, not just enabled) certainly makes things more difficult but it does not make that impossible by any means.

Putting aside SSRF, I want to speak from the point in the investigation where you have proof that the threat actor has direct access over the internet to the EC2 instance. If this is the case, unlike on-prem where even if let's say malware allowed the threat actor the same type of access, the attacker likely still has to dump LSASS or find credentials some other way such as exploiting OS services/software/etc., to get usable credentials. In AWS, you would simply just talk to the IMDS and get your credentials and you're good to go. Thus, post-compromise activities move far quicker in Cloud environments like AWS (yes, GCP & Azure too) than on-premise.

IAM Role, Post-Compromise & "The Crossover"

IMDS. In theory, this single role could have everything an attacker needs from an access perspective—right out of the gate. Additionally, you have the entire suite of AWS service APIs at your disposal to test access (and that’s only a slight exaggeration—it may not always be true, but sadly, it’s definitely possible).

needsanything provided by the OS or software—and there’s no guarantee they’ll leave behind additional OS-specific artifacts to help you understand AWS control plane or data plane activities. From here on out, almost everything can be accomplished using the AWS API. Sure, depending on the attacker’s access and command-and-control (C2) setup, you might see some command lines in OS evidence sources that log process activity. But realistically, they can proxy everything through their C2, running commands remotely—and leave none of those events behind on the host.

Welcome to "The Crossover."

The Crossover

Cloud Service Management & Data Plane Logs

here, but in short: if you want to know the changes made to AWS services in your account(s), you’re probably looking for CloudTrail management events. If you want to know about operations performed on or involving the resource and the data itself, you are probably looking for CloudTrail Data events. This distinction alone is enough to make your head hurt but I digress.

VPC,

EBS, &

IAMto name a few, will be critical in your investigations involving compromised EC2 instances. Chances are you will be able to focus on a few key API calls within the EC2 service space or maybe

ECSif you are dealing with a crypto mining operation. However, if they TA hits some permission snags or crypto mining is not the goal, you will likely be looking three additional services mentioned along with

S3,

RDSand/or more. Depends on your threat actor's motivation.

(two-pizza) teamsadhere to and being in a consolidates data source. Juxtaposed to operating systems and traditional on-prem resources, you would need to know all the different file locations for the log sources you need, ingesting them into a SIEM or manually pulling them off disk or maybe even automated, but in a retroactive manner. In AWS, you could theoretically rely on a single primary cloud data source—CloudTrail—for your EC2 instance investigations.

great blogput together by Anna McAbee and the AWS security team detailing an in-depth logging strategy in AWS (covers more than EC2 and CloudTrail logging naturally).

Investigation Methodology

*This is both similar and a stark contrast in the how & interpretation

AWS EC2 vs. On-Prem VMs

Conclusion

you got a friend in me" 🤠. AWS Cloud investigations certainly overlap with on-premises investigations, but to leave it at that would be both disingenuous and extremely misleading. As you can see above, even in the parallels, the truth is in the details—and those details are both derived differently and can mean something else entirely in the cloud. In short, calling them similar isn’t wrong—just make sure you add a "but" before finishing that thought.

Forensic Refences Links:

原文链接:https://chesterlebron.blogspot.com/2025/07/arent-aws-cloud-investigations-same-as-on-prem-part-1.html