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
In a nutshell
  • 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.

Detection servicesGuardDuty, Inspector, MacieSecurity Hubone finding formatEventBridgeroute by severityResponseticket or automation

How it works

The detection services

ServiceWhat it detectsData sources
Amazon GuardDutyThreats such as compromised credentials, crypto mining and unusual API callsCloudTrail events, VPC Flow Logs and DNS logs, plus optional protection plans
Amazon InspectorSoftware vulnerabilities and unintended network exposureEC2 instances, ECR images, Lambda functions
Amazon MacieSensitive data and risky settings in S3S3 buckets and objects
IAM Access AnalyzerResources shared outside the account or organization, unused accessResource policies and IAM
AWS ConfigNoncompliant configurationConfiguration items
Amazon DetectiveRoot cause investigation of a findingCloudTrail, 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.

FeaturePurpose
Standards and controlsAutomated compliance checks
AggregationFindings from all accounts and linked Regions in one place
Automation rulesChange or suppress findings, for example raise severity for production
Custom actionsA button in the console that sends selected findings to EventBridge
InsightsSaved 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.

Member accountsGuardDuty onDelegated adminsecurity accountSecurity Hubcentral viewResponseEventBridge

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

QuestionService
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.
Exam tip

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.

Watch out

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.