Sub topic 1
Where GuardDuty and Security Hub Fit in AWS Security
Prerequisites
Assume you understand AWS accounts, Regions, IAM roles and policies, and basic JSON. You should also know that CloudTrail records API activity, VPC Flow Logs record network traffic, and Route 53 Resolver DNS query logs record DNS requests.
Security roles
Amazon GuardDuty is a threat detection service. It analyzes AWS activity and log data, then creates findings when behavior resembles an attack.
AWS Security Hub is a central security service. It collects findings from GuardDuty and other services, evaluates security standards, and presents a common view across accounts and Regions.
GuardDuty answers, “What might be attacking this environment?” Security Hub helps answer, “Which security issues need attention first?”
How GuardDuty detects threats
GuardDuty continuously analyzes foundational data sources without requiring you to manage log pipelines. It compares activity with threat intelligence, machine-learning models, and known attack patterns. Examples include stolen credentials, unusual API calls, port probing, cryptocurrency mining, and communication with malicious domains.
A finding is an alert, not proof that an intrusion succeeded. Confirm the affected resource, identity, network context, and timeline before responding.
Protection plans
GuardDuty has optional protection plans that extend detection beyond its foundational analysis.
| Protection plan | Focus |
|---|---|
| S3 Protection | Suspicious activity involving S3 data |
| EKS Protection | Kubernetes control-plane and workload activity |
| Malware Protection | Malware scanning for selected resources |
| RDS Protection | Suspicious database login activity |
| Lambda Protection | Threats involving Lambda network activity |
| Runtime Monitoring | Runtime behavior on supported workloads |
Enable only plans that match your resources and response capacity. More coverage can increase cost and finding volume.
Reading findings
Inspect the finding type, severity, affected resource, actor, and evidence. Severity helps prioritize work, but context determines urgency. For example, a high-severity finding involving a production instance and an unfamiliar identity deserves immediate investigation.
Enabling GuardDuty and testing
Run this command in each Region where you want protection:
aws guardduty create-detector --enable --finding-publishing-frequency FIFTEEN_MINUTESGenerate safe test findings:
DETECTOR_ID=$(aws guardduty list-detectors --query 'DetectorIds[0]' --output text)
aws guardduty create-sample-findings --detector-id "$DETECTOR_ID" \
--finding-types Recon:EC2/PortProbeUnprotectedPort UnauthorizedAccess:EC2/SSHBruteForceSample findings validate dashboards and response workflows. They do not represent real threats.
Exercise
Why might an organization use both GuardDuty and Security Hub?
Show answer
GuardDuty detects suspicious activity, while Security Hub centralizes findings and evaluates security controls.