Security and Compliance · Topic 5 of 6
Threat Detection and Security Findings
Monitor security with GuardDuty, Security Hub, Inspector, Macie, Detective and Access Analyzer, aggregate findings across accounts and route them.
- 5 min
- GuardDuty detects threats from CloudTrail, flow logs and DNS logs with no agent or log setup.
- Inspector finds vulnerabilities in EC2, ECR images and Lambda functions.
- Macie finds sensitive data in S3.
What it is
Security monitoring finds threats and weaknesses early. AWS offers several detection services, each looking at a different data source, plus a hub that collects their findings in one place.
For a multi account organization the design goal is the same for every service: turn it on everywhere, send findings to one security account, and route them to people or automation.
How it works
The detection services
| Service | What it detects | Data sources |
|---|---|---|
| Amazon GuardDuty | Threats such as compromised credentials, crypto mining and unusual API calls | CloudTrail events, VPC Flow Logs and DNS logs, plus optional protection plans |
| Amazon Inspector | Software vulnerabilities and unintended network exposure | EC2 instances, ECR images, Lambda functions |
| Amazon Macie | Sensitive data and risky settings in S3 | S3 buckets and objects |
| IAM Access Analyzer | Resources shared outside the account or organization, unused access | Resource policies and IAM |
| AWS Config | Noncompliant configuration | Configuration items |
| Amazon Detective | Root cause investigation of a finding | CloudTrail, flow logs, GuardDuty findings |
For its core data sources GuardDuty needs no agent and reads these logs independently, so you do not have to enable the logs yourself. Optional protection plans add coverage for S3 data events, EKS audit logs, runtime monitoring, malware scanning of EBS volumes and RDS login activity.
Detective builds a behavior graph over time, so an analyst can pivot from a finding to the related IP address, user or instance and see what else it did.
AWS Security Hub
Security Hub collects findings from AWS services and partner products and normalizes them to one format. It also runs automated checks against security standards, such as AWS Foundational Security Best Practices and the CIS AWS Foundations Benchmark, and computes a score. The checks rely on AWS Config recording being on.
| Feature | Purpose |
|---|---|
| Standards and controls | Automated compliance checks |
| Aggregation | Findings from all accounts and linked Regions in one place |
| Automation rules | Change or suppress findings, for example raise severity for production |
| Custom actions | A button in the console that sends selected findings to EventBridge |
| Insights | Saved groupings of findings |
Organization wide setup
Each service supports Organizations integration. A delegated administrator account, often the security tooling account, enables the service, auto enables new member accounts and sees all findings. A Security Hub administrator also aggregates across Regions by choosing a home Region.
Use CloudFormation StackSets or Control Tower to enable the required services and settings in new accounts automatically, so there is no gap on day one.
Routing findings
All of these services publish findings to EventBridge. A rule can filter by severity or type and call a target.
{
"source": ["aws.securityhub"],
"detail-type": ["Security Hub Findings - Imported"],
"detail": {"findings": {"Severity": {"Label": ["CRITICAL", "HIGH"]}}}
}
Targets include an SNS topic that notifies the security team, a Lambda function or Automation runbook that contains the issue, and a ticketing integration. Suppression rules, trusted IP lists and threat lists tune GuardDuty to reduce noise.
Alarms from log data
Not every signal is a managed finding. A CloudTrail trail delivered to CloudWatch Logs allows metric filters and alarms for events such as use of the root user.
{ $.userIdentity.type = "Root" && $.userIdentity.invokedBy NOT EXISTS && $.eventType != "AwsServiceEvent" }
Pair such a filter with a metric, an alarm and an SNS topic, so the security team is told whenever the root user signs in or changes critical settings.
Network and DNS visibility
VPC Flow Logs, Route 53 Resolver query logs and load balancer logs add network evidence for investigation. Send them to a central bucket or log group for correlation.
Choosing
| Question | Service |
|---|---|
| Is someone using stolen credentials or mining crypto? | GuardDuty |
| Which instances have a known vulnerable package? | Inspector |
| Which buckets hold personal data? | Macie |
| Which resources are public or shared externally? | Access Analyzer |
| What is our overall compliance score and all findings? | Security Hub |
| What else did this compromised role do? | Detective |
What to remember for the exam
- GuardDuty detects threats from CloudTrail, flow logs and DNS logs with no agent or log setup.
- Inspector finds vulnerabilities in EC2, ECR images and Lambda functions.
- Macie finds sensitive data in S3.
- Access Analyzer finds external sharing and unused access.
- Security Hub aggregates findings, runs standards checks and needs Config recording.
- Use a delegated administrator and auto enable for all member accounts.
- Security Hub aggregation can include multiple Regions through a home Region.
- All findings reach EventBridge for notification or automated response.
- Detective investigates; it does not detect new threats by itself.
- Metric filters on CloudTrail logs can alarm on root user activity.
A question about "a single pane for security findings from many accounts and services" is Security Hub with a delegated administrator.
Common mistakes
Enabling services only in one Region. Attackers use unused Regions, so enable detection in all Regions.
Treating Security Hub as a detector. It collects and checks; the detection comes from the other services.
Forgetting new accounts. Without auto enable, new accounts have no protection.
Ignoring noise. Without tuning, teams stop reading findings.
Findings can contain sensitive details about your resources, so restrict who may read them in the central security account.
Check yourself
Which service detects suspicious API activity from compromised credentials without agents?
Amazon GuardDuty, which analyzes CloudTrail, flow logs and DNS logs.
What do you need so Security Hub standards checks work?
AWS Config recording turned on in the accounts and Regions.
How do you cover every new account in an organization automatically?
Enable the service with a delegated administrator and turn on auto enable for member accounts.
Topic 5 of 6 in Security and Compliance
Test yourself on Security and Compliance
The full AWS DOP-C02 question bank has 844 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by AWS. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.