7 CySA+ Cloud Threat Hunting Plays for AWS I Wish I Knew Sooner

A bright, detailed pixel art of a cybersecurity analyst hero scanning colorful cloud networks filled with AWS icons and digital logs, representing CySA+ cloud threat hunting in AWS.

7 CySA+ Cloud Threat Hunting Plays for AWS I Wish I Knew Sooner

Let’s have a real talk. The first time I saw an AWS billing alert for an extra $5,000 on a weekend, my coffee went cold and my stomach dropped. My immediate thought wasn't "Oh, our viral marketing campaign is working!" It was a cold, sharp dread: "We've been breached." The cloud is sold as this magical, infinitely scalable wonderland. And it is. But it’s also a new, infinitely complex jungle filled with hidden predators. Relying solely on automated alerts is like hoping a car alarm will stop a determined thief. It makes noise, but the damage is already happening.

That billing scare was my baptism by fire into the world of proactive threat hunting in the cloud. It’s a discipline that the CompTIA CySA+ certification drills into you, but theory is one thing. Seeing anomalous API calls light up in your CloudTrail logs at 2 AM is another. This isn’t just about waiting for an alarm to go off. It's about grabbing a flashlight and actively searching for the monsters hiding under the bed, before they have a chance to bite. It's about shifting from a passive "detector" to an active "hunter."

In this post, I'm going to walk you through the exact, gritty, real-world AWS threat hunting use cases that I’ve used. These aren't abstract concepts from a textbook. They are battle-tested plays for any cybersecurity analyst, startup founder, or SMB owner who has that nagging feeling that they could be doing more to protect their slice of the cloud. We'll connect these practical steps back to the CySA+ mindset, turning you from a security tourist into a seasoned digital safari guide in your own AWS environment.


What Even IS Cloud Threat Hunting? (The CySA+ Perspective)

Okay, let's clear the air. "Threat hunting" sounds like something you do with a high-powered rifle and night-vision goggles. In the cloud, it's less about camouflage and more about curiosity. At its core, threat hunting is the proactive search for cyber threats that have evaded existing security defenses.

Your automated tools—firewalls, antivirus, even AWS GuardDuty—are your fence. They're designed to stop known threats and flag obvious bad behavior. Threat hunting assumes a clever fox has already dug a hole under that fence. Your job is to find the fox's tracks inside your property *before* it gets to the henhouse.

From a CySA+ (Cybersecurity Analyst) standpoint, this is the practical application of several key domains:

  • Threat and Vulnerability Management: You're not just scanning for vulnerabilities; you're hypothesizing how they might be exploited and looking for evidence of that exploitation.
  • Software and Systems Security: You're digging into the logs of your AWS services (EC2, S3, Lambda) to understand what "normal" looks like, so you can spot the abnormal.
  • Security Operations and Monitoring: This is the heart of it. It's about moving beyond simply reacting to alerts and instead, proactively analyzing security data to find hidden threats.
  • Incident Response: A good threat hunt often uncovers a brewing incident. Your findings are the critical first step in the incident response lifecycle.

The Big Mindset Shift: Instead of asking "Did any of my alarms go off?", the threat hunter asks, "Assuming an attacker is already inside, what tracks would they leave?" This hypothesis-driven approach is what separates a security operator from a true cybersecurity analyst.

In the AWS environment, this means getting comfortable with the idea that the "perimeter" is dead. There's no single door to guard. Every API call, every IAM role assumption, every S3 object access is a potential point of entry or exploitation. Our "tracks" are log files, and our "magnifying glass" is a set of query and analysis tools. It's detective work, plain and simple.


The Hunter's Toolkit: Your Essential AWS Services

Before you go on safari, you need to pack your gear. In AWS, you don't need a massive budget to get started. The most critical data sources are often built right into the platform. Here are the absolute non-negotiables for any AWS threat hunter.

1. AWS CloudTrail: The Everything Log

If you learn nothing else, learn CloudTrail. It is the single most important source of truth for threat hunting in AWS. It records nearly every API call made in your account. Who did what, from where, and when? CloudTrail has the answer.

  • What to look for: Suspicious IAM activity (privilege escalation), security group changes, disabling of logging, and calls from unusual IP addresses.
  • Pro-Tip: Ensure you have a CloudTrail trail enabled in *all* regions and that it's logging to a secure, separate S3 bucket with log file integrity validation turned on. This is your audit bedrock.

2. Amazon VPC Flow Logs: The Network Snitch

VPC Flow Logs capture information about the IP traffic going to and from network interfaces in your VPC. In plain English, it tells you which of your servers are talking to whom on the internet (and internally).

  • What to look for: Communication with known malicious IP addresses, unexpected data transfers to strange countries, port scanning, and connections on non-standard ports.
  • Pro-Tip: Analyzing raw flow logs is painful. Pipe them into Amazon Athena or CloudWatch Logs Insights to run SQL-like queries. This turns a mountain of data into actionable intelligence.

3. Amazon GuardDuty: The Automated Scout

GuardDuty is your intelligent threat detection service. It continuously monitors for malicious activity and unauthorized behavior by analyzing CloudTrail, VPC Flow Logs, and DNS logs. It's your first line of automated defense.

  • How to use it for hunting: Don't just accept a GuardDuty finding as the end of the story. Use it as the *start* of your hunt. A finding like "UnauthorizedAccess:IAMUser/MaliciousIPCaller" is your cue to dive into CloudTrail and see *everything* that IP address and that IAM user have done in the last 24 hours.

4. AWS Security Hub: The Command Center

Security Hub gives you a single pane of glass for all your security alerts. It aggregates findings from GuardDuty, Macie, Inspector, and third-party tools. It's less of a raw data source and more of a central dashboard to prioritize your hunts.

5. Amazon Athena & CloudWatch Logs Insights: The Magnifying Glass

These are your analysis tools. Both allow you to run powerful queries against your raw log data stored in S3 (for Athena) or CloudWatch (for Insights). Instead of manually sifting through millions of log entries, you can write a simple query like: SELECT * FROM cloudtrail_logs WHERE sourceIPAddress = '1.2.3.4'. This is what transforms data into answers.

Mastering these five services provides the foundation for almost every meaningful threat hunt you'll conduct in AWS. Now, let's put them to work.


7 Actionable CySA+ Cloud Threat Hunting Use Cases for AWS

Alright, theory's over. Let's get our hands dirty. Here are seven hypothesis-driven hunts you can start running today. For each one, we’ll define the hypothesis, identify the data sources, and outline the hunting procedure.

Use Case #1: Hunting the Crypto-Jacking EC2 Instance

This is the classic cloud threat. An attacker compromises a web server or gets ahold of some credentials, spins up a massive EC2 instance, and uses your money to mine cryptocurrency.

  • Hypothesis: An attacker has compromised an EC2 instance and is using it for crypto-mining, which involves communication with known mining pools on non-standard ports.
  • Data Sources: VPC Flow Logs, AWS GuardDuty, EC2 instance metadata.
  • The Hunt:
    1. Look for Beacons: Start by querying your VPC Flow Logs for connections to known crypto-mining pools. You can find lists of these IPs and domains in open-source threat intelligence feeds. The query in Athena might look for large, long-lived outbound connections on ports like 3333, 4444, 5555, etc.
    2. Analyze Traffic Volume: Crypto-mining doesn't always use weird ports. A simpler hunt is to look for EC2 instances with an unusually high ratio of outbound-to-inbound traffic. A web server should mostly serve data out, but if it's sending gigabytes of sustained traffic to a single, non-corporate IP address, that's a huge red flag. Aggregate your flow logs by `srcaddr` and `dstaddr` and `sum(bytes)` to find the chattiest instances.
    3. Check GuardDuty: GuardDuty has specific findings for this, like CryptoCurrency:EC2/BitcoinTool.B!DNS. If you see this, your hunt is already warm. Use the instance ID from the alert and pivot directly to its VPC Flow Logs to see exactly where it's connecting.
    4. Correlate with CloudTrail: Once you have a suspect EC2 instance, jump into CloudTrail. Who launched it? When? Were any strange IAM roles attached to it at launch? This helps you determine the initial access vector.

Use Case #2: Chasing Ghosts in IAM Roles

Attackers *love* abusing IAM roles. Why steal a password when you can just become an authorized user? This hunt focuses on finding roles that are doing things they shouldn't be.

  • Hypothesis: An attacker has compromised credentials for a low-privilege IAM user or role and is attempting to escalate privileges or access sensitive data.
  • Data Source: AWS CloudTrail.
  • The Hunt:
    1. Hunt for Privilege Escalation: Query CloudTrail for a specific chain of events. Look for API calls like CreatePolicyVersion, SetDefaultPolicyVersion, and AttachUserPolicy or AttachRolePolicy. An attacker who gains control of a user might try to attach a new, more permissive IAM policy to themselves. Finding these events, especially when performed by a user who isn't a senior admin, is a critical indicator.
    2. Look for "Smash and Grab" Activity: An attacker who just gained access often moves quickly and loudly. Use Athena to query CloudTrail for a single IAM principal (user or role) performing a high number of distinct actions (eventName) in a short time window. For example, a role that normally only performs s3:GetObject suddenly making calls to iam:ListUsers, ec2:DescribeInstances, and secretsmanager:GetSecretValue all within 5 minutes is extremely suspicious. This is reconnaissance.
    3. Anomalous Role Assumptions: A user or EC2 instance assuming an IAM role is normal. But an EC2 instance in your dev account suddenly assuming a role that can only be assumed by an instance in your production account? That's not. Query for sts:AssumeRole events and scrutinize the sourceIPAddress and the identity of the caller in the userIdentity field.

A Real-World Example: I once found a compromised CI/CD server this way. The role attached to the server suddenly started making dozens of iam:List* and iam:Get* calls. The attacker was mapping out our entire IAM structure to find a weak point. We caught it during a routine hunt before they escalated further.

Use Case #3: The Curious Case of the Leaky S3 Bucket

We've all heard the horror stories of sensitive data exposed in public S3 buckets. This hunt looks for the signs of data exfiltration, whether the bucket is public or the attacker has stolen credentials.

  • Hypothesis: An unauthorized user or process is accessing and potentially exfiltrating large quantities of data from an S3 bucket.
  • Data Sources: S3 Server Access Logs, AWS CloudTrail (for S3 data events), AWS Macie.
  • The Hunt:
    1. Enable and Analyze S3 Access Logs: This is step zero. If you don't have these logs, you're blind. Once enabled, pipe them to Athena.
    2. Hunt for Anomalous GetObject Calls: Look for a sudden spike in GetObject operations from a single IP address or IAM principal, especially if they're accessing an unusual number of unique objects (keys). A legitimate user might download a few files. An attacker will try to list and download everything. A query grouping by requester and remoteip and counting key will reveal this.
    3. Check for Foreign Access: Is your company based entirely in the US? Then a huge number of requests from an IP block in Eastern Europe should stand out. Use GeoIP databases in your analysis to flag access from unexpected regions.
    4. Leverage AWS Macie: Macie is a data security service that uses machine learning to automatically discover, classify, and protect sensitive data in S3. If you have it enabled, its findings about sensitive data being publicly accessible or accessed anomalously are a goldmine for starting a hunt.

Use Case #4: Spotting Compromised Credentials from a Mile Away

A developer's AWS access key committed to a public GitHub repo is a tale as old as time. This hunt focuses on identifying when those credentials are being used by someone who isn't your developer.

  • Hypothesis: An attacker has obtained valid IAM user credentials and is using them from an unfamiliar location or in an unusual manner.
  • Data Source: AWS CloudTrail.
  • The Hunt:
    1. Impossible Travel: This is a classic. A user logs in from a corporate office in New York, and then 30 minutes later, makes an API call from an IP address in Singapore. Unless you've invented teleportation, the credentials are compromised. You need to baseline your users' typical IP ranges and look for logins (eventName: ConsoleLogin) or API calls from outside those ranges.
    2. User-Agent Anomalies: Every API call in CloudTrail has a userAgent string. Your developers probably use the AWS CLI, SDKs (like Boto3 for Python), or the Terraform executable. If you suddenly see calls from a user's account with a user agent of "curl/7.68.0" or "Go-http-client/1.1", that's a massive red flag. Attackers often use simple command-line tools. Hunt for user agents that don't match your organization's standard toolset.
    3. First-Time Actions: Hunt for users performing actions they've never done before. For example, a marketing user who has only ever accessed S3 suddenly making ec2:RunInstances calls. You can build a historical baseline of "normal" actions for users and flag any deviations.

AWS Cloud Threat Hunting: A CySA+ Playbook

Shift from Reactive Alerts to Proactive Hunts

The Proactive Hunting Loop

1
Form Hypothesis

"Is an IAM role compromised?"

2
Gather Data

Query CloudTrail & VPC Logs

3
Analyze Patterns

Look for anomalies & IOCs

4
Uncover Threats

Find the hidden adversary

The Hunter's Toolkit

  • AWS CloudTrail

    The "Who, What, When" for every API call.

  • VPC Flow Logs

    Records all network traffic in your VPC.

  • Amazon GuardDuty

    Intelligent threat detection to guide your hunts.

  • Amazon Athena

    Query and analyze mountains of log data.

Top 3 Hunting Plays

1. The Crypto-Jacking EC2

Indicator: High outbound traffic to unknown IPs on non-standard ports.

2. The Over-Privileged IAM Role

Indicator: Sudden, rapid API calls for discovery (e.g., `List*`, `Describe*`).

3. The Leaky S3 Bucket

Indicator: Anomalous `GetObject` activity from an unfamiliar geographic location.

Use Case #5: The Sneaky Serverless Function

As serverless (Lambda) becomes more popular, so do attacks against it. A compromised Lambda function can be a perfect pivot point into your network.

  • Hypothesis: A Lambda function has been modified or triggered in a way that executes malicious code, potentially reaching out to a command-and-control server.
  • Data Sources: CloudWatch Logs for Lambda, VPC Flow Logs (if the Lambda is in a VPC).
  • The Hunt:
    1. Analyze Outbound Network Connections: If your Lambda functions are attached to a VPC, you can monitor their network traffic with VPC Flow Logs. A function that's supposed to process an image and save it to S3 should not be making outbound connections to a random IP on port 8080. Hunt for any unexpected egress traffic from the network interfaces attached to your functions.
    2. Scrutinize Execution Logs: Dive into the CloudWatch Logs for your functions. Look for error messages that indicate unexpected behavior, like trying to connect to a host that doesn't exist or failing to import a library. Also, look for suspicious output. A function that suddenly starts printing out environment variables could be a sign of a recon attempt.
    3. Monitor for Code Changes: Use CloudTrail to monitor for UpdateFunctionCode API calls. Who is updating your Lambda functions, and when? Any update made outside of your normal CI/CD pipeline or by an unexpected user is a high-priority event to investigate.

Use Case #6: Beyond the GuardDuty Alert—Connecting the Dots

This is less of a specific hunt and more of a critical methodology. Never treat a security alert as an isolated event.

  • Hypothesis: A single GuardDuty finding is just one piece of a larger attack chain.
  • Data Sources: GuardDuty, CloudTrail, VPC Flow Logs.
  • The Hunt:
    1. Start with the Finding: Let's say GuardDuty alerts you to: Recon:IAMUser/UserPermissions. The finding gives you an IAM user name and a source IP.
    2. Pivot to CloudTrail: Your first step is to filter CloudTrail for *everything* that IAM user has done, and *everything* that has originated from that source IP, in the 24 hours before and after the alert. Don't just look at the one API call that triggered the alert.
    3. Expand the Timeline: Did the reconnaissance succeed? Look for follow-on activity. Did the user who performed the recon then access S3 or try to launch an EC2 instance? You're looking for the story of the attack.
    4. Check Network Logs: Pivot to VPC Flow Logs. What other traffic came from that attacker's IP? Were they scanning other hosts in your VPC? Did they successfully connect to anything?
    5. The Goal: By correlating these different data sources, you move from "We had a recon alert" to "An attacker from 1.2.3.4 used compromised credentials for user 'Bob' to map our IAM policies, then attempted to access a sensitive data bucket, and also port-scanned our database server." This level of detail is critical for effective remediation.

Use Case #7: Data Exfiltration via DNS Tunneling

This is a more advanced technique, but it’s devastating when it works. Attackers can smuggle data out of your network by encoding it in a series of DNS queries.

  • Hypothesis: An attacker is exfiltrating data by hiding it in DNS queries to a malicious server.
  • Data Source: Route 53 Resolver Query Logs.
  • The Hunt:
    1. Enable Resolver Query Logging: Like S3 access logs, if you don't turn this on, you can't see anything.
    2. Look for High Query Volume: A single EC2 instance making thousands of DNS queries to the same domain (or subdomains of the same domain) in a short period is highly suspicious. Legitimate traffic is usually more varied.
    3. Analyze Domain Name Entropy: DNS tunneling queries often look like garbage. Instead of `api.google.com`, you'll see queries for `a1b2c3d4e5f6.malicious-domain.com`, where the subdomain is the encoded data. Hunt for queries with unusually long or high-entropy (random-looking) subdomains.
    4. Check Record Types: Look for an abnormally high number of TXT or CNAME record queries. While legitimate, they can also be used to exfiltrate larger chunks of data than standard A records.

Common Mistakes That Will Get You Hacked (Or at Least Confused)

Knowing what to do is half the battle. Knowing what *not* to do is the other half. Here are a few traps I’ve fallen into myself.

  • Ignoring the Baseline: If you don't know what "normal" looks like, you'll never be able to spot "abnormal." Spend a week just observing your logs. What are the top 10 most common API calls? Which IAM roles are the chattiest? This baseline is your superpower.
  • Analysis Paralysis: There is a *sea* of log data. Don't try to boil the ocean. Start with a single, clear hypothesis (like one of the use cases above) and focus your hunt on answering that one question.
  • Forgetting about Timezones: All AWS logs are in UTC. Your brain is probably not. When correlating events, make sure you're comparing apples to apples. Mismatched timezones can send you on a wild goose chase.
  • Not Having Logs Enabled: It sounds obvious, but you'd be shocked how many accounts don't have CloudTrail, VPC Flow Logs, or S3 access logs turned on everywhere. You can't hunt what you don't log. It's the digital equivalent of trying to investigate a crime scene where all the evidence has been wiped clean.

Your First AWS Threat Hunt: A Simple Checklist

Feeling overwhelmed? Don't be. Here’s a dead-simple way to run your first hunt tomorrow morning.

The "Daily Morning Coffee" Hunt Checklist

  1. [ ] Review GuardDuty: Any new High or Medium severity findings in the last 24 hours? If yes, pick one and start your investigation there.
  2. [ ] Check for IAM Changes: In CloudTrail, run a quick query for any of these events in the last 24 hours: CreateUser, CreateAccessKey, AttachUserPolicy, UpdateLoginProfile. Did you expect these changes?
  3. [ ] Look for Console Login Failures: Filter CloudTrail for ConsoleLogin events with the field responseElements.ConsoleLogin equal to `Failure`. A handful is normal. A flood from a single IP is a brute-force attack.
  4. [ ] Identify New EC2 Instances: Filter CloudTrail for RunInstances. Are there any new instances, especially in unusual regions or of unusually large sizes?
  5. [ ] Find the Chattiest Server: In your VPC Flow Log query tool, find the top 5 internal IP addresses by total outbound bytes. Do you know what these servers are and why they're so chatty?

That's it. This 15-minute routine can uncover a surprising amount of suspicious activity.


Frequently Asked Questions (FAQ)

What is cloud threat hunting in AWS?
Cloud threat hunting in AWS is the proactive process of searching through your AWS logs and service data to find malicious activity that has bypassed your automated security defenses. Instead of waiting for an alert, you form a hypothesis (e.g., "An attacker is using a compromised EC2 instance to mine crypto") and search for evidence. Learn more in our introduction.
How do I start threat hunting in AWS with no budget?
You can start for free! The core services are built-in. Enable AWS CloudTrail (the first copy is free), VPC Flow Logs (data transfer costs apply but are minimal to start), and use Amazon Athena or CloudWatch Logs Insights, which have generous free tiers for querying. Your primary cost is time, not tools. Check out the essential toolkit.
Is AWS GuardDuty enough for threat detection?
No. GuardDuty is an excellent threat *detection* service, but it's not a substitute for threat *hunting*. It finds known patterns of attack. Threat hunting is for finding the unknown or novel attacks. Use GuardDuty findings as the starting point for your hunts, not the end of your security monitoring. See how to use GuardDuty for hunting.
What are the most important logs for AWS threat hunting?
The three most critical log sources are: 1) AWS CloudTrail for API activity, 2) VPC Flow Logs for network traffic, and 3) S3 Server Access Logs for data access patterns. Mastering these three gives you visibility into the vast majority of malicious activity.
How does the CySA+ certification help with cloud security?
The CySA+ certification provides the analytical framework for threat hunting. It teaches you to analyze data, identify vulnerabilities, and respond to incidents—skills that are directly applicable to hunting in cloud environments like AWS. It shifts your mindset from just managing tools to actively analyzing threat intelligence. Read the CySA+ perspective here.
Can you automate AWS threat hunting?
Yes, to an extent. You can automate the "known" parts of a hunt. For example, you can write a Lambda function that automatically runs a specific Athena query every hour and alerts you to suspicious results. This blurs the line between detection and hunting but is a powerful way to scale your efforts.
What are common mistakes in cloud threat hunting?
The biggest mistakes are failing to enable logs in the first place, not establishing a baseline of "normal" activity, and getting lost in the data without a clear hypothesis. Starting small and focused is key. See more common mistakes here.

Conclusion: Stop Detecting, Start Hunting

The cloud isn't a scarier place to be, it's just a different one. The old rules of perimeter security don't apply, but the principles of good detective work are more important than ever. Relying on your automated alerts alone is a recipe for a very bad day. That sinking feeling I had when I saw that billing alert taught me that passivity is the enemy.

Proactive threat hunting is how you take back control. It's about cultivating a healthy paranoia and the skills to act on it. By diving into your logs, asking the right questions, and relentlessly following your curiosity, you transform from a target into a formidable defender. The use cases we walked through aren't just academic exercises; they are your new playbook. Pick one, just one, and run it this week.

Don't wait for the alarm. Grab your flashlight and start hunting. The peace of mind that comes from knowing you're actively searching for threats—not just waiting for them to announce themselves—is worth every second you invest.


CySA+ cloud threat hunting, AWS threat hunting, cloud security, cybersecurity analyst, AWS security use cases

🔗 CISA Audit of AI Fairness: 7 Brutally Honest Lessons I Learned the Hard Way Posted October 07, 2025
Previous Post Next Post