AWS GuardDuty Security
When to Use
- Enabling and configuring AWS GuardDuty for threat detection
- Understanding and triaging GuardDuty finding types
- Automating incident response to GuardDuty findings via EventBridge + Lambda
- Managing GuardDuty across multiple AWS accounts (Organization integration)
- Distinguishing GuardDuty from Inspector, Macie, and Security Hub
- Preparing for AWS Certified Security Specialty (SCS-C02) exam
Core Jobs
1. GuardDuty Data Sources
GuardDuty continuously analyzes these sources for threats:
| Data Source |
What It Detects |
Enabled By Default |
| AWS CloudTrail management events |
API call anomalies, suspicious CLI/console activity |
Yes |
| AWS CloudTrail S3 data events |
Suspicious S3 object access patterns |
Optional (S3 Protection) |
| VPC Flow Logs |
Network anomalies, port scanning, crypto mining traffic |
Yes |
| DNS logs |
DNS-based data exfiltration, C2 communication |
Yes (EC2 only, via AWS DNS resolver) |
| EKS audit logs |
Suspicious Kubernetes API activity, privilege escalation |
Optional (EKS Protection) |
| ECS runtime |
Container-level threat detection |
Optional (ECS Runtime Monitoring) |
| Lambda network activity |
Suspicious outbound network calls from Lambda |
Optional (Lambda Protection) |
| RDS login events |
Brute force, anomalous authentication |
Optional (RDS Protection) |
| Malware Protection |
Malware in EC2 EBS volumes or uploaded S3 objects |
Optional |
GuardDuty does NOT require you to enable VPC Flow Logs or CloudTrail separately — it accesses these directly without storing logs in your account.
2. Finding Types
Format: ThreatPurpose:ResourceAffected/ThreatFamilyName.DetectionMechanism!Artifact
| Category |
Example Finding |
Meaning |
| Reconnaissance |
Recon:EC2/PortProbeUnprotectedPort |
Port scanning on EC2 |
| Backdoor |
Backdoor:EC2/C&CActivity.B |
EC2 communicating with known C2 server |
| CryptoCurrency |
CryptoCurrency:EC2/BitcoinTool.B |
EC2 mining cryptocurrency |
| UnauthorizedAccess |
UnauthorizedAccess:EC2/SSHBruteForce |
SSH brute force attempts |
| UnauthorizedAccess |
UnauthorizedAccess:IAMUser/TorIPCaller |
API calls from Tor exit node |
| Stealth |
Stealth:IAMUser/CloudTrailLoggingDisabled |
CloudTrail disabled (cover tracks) |
| Policy |
Policy:S3/BucketPublicAccessGranted |
S3 bucket made public |
| Execution |
Execution:EC2/MaliciousFile |
Malware detected on EC2 |
| Exfiltration |
Exfiltration:S3/ObjectRead.Unusual |
Unusual volume of S3 reads |
| PenTest |
PenTest:IAMUser/KaliLinux |
API calls from Kali Linux machine |
Finding severity:
- 🔴 High (7.0–8.9): Active threat, immediate action required
- 🟡 Medium (4.0–6.9): Suspicious activity, investigate
- 🟢 Low (1.0–3.9): Informational, monitor
3. Multi-Account Management
Administrator account = central visibility and control:
- Sees findings from ALL member accounts
- Can enable/disable GuardDuty for member accounts
- Member accounts CANNOT disable GuardDuty themselves
- Single GuardDuty administrator account across Organization
Setup via AWS Organizations (recommended):
- Designate GuardDuty administrator account (Security/Audit account)
- Auto-enable for all current + future member accounts
- All findings flow to administrator account
Manual invitation method (non-Organizations):
- Administrator sends invitation to member account; member accepts
Suppression rules: Filter known-safe findings by account, region, resource type, or finding type. Suppressions apply to future findings. Suppressed findings still stored but not active.
4. Automated Incident Response
Pattern: GuardDuty finding → EventBridge rule → Lambda/SNS/SQS → automated action
GuardDuty finding
↓
EventBridge rule (filter by severity, finding type)
↓
SNS topic → email/Slack notification
Lambda function → automated remediation
↓
Actions: block IP via NACL, isolate SG, disable IAM key, snapshot EBS
EventBridge rule for high-severity findings:
{
"source": ["aws.guardduty"],
"detail-type": ["GuardDuty Finding"],
"detail": {
"severity": [{"numeric": [">=", 7.0]}]
}
}
Common automated responses:
- Crypto mining finding → block outbound traffic to mining pool IPs via NACL
- Compromised IAM key → disable access key via
iam:UpdateAccessKey
- Malicious EC2 → isolate by replacing SG with deny-all forensic SG
- C2 communication → isolate EC2 to forensic VPC, take EBS snapshot for analysis
5. S3 Protection and Malware Protection
S3 Protection:
- Analyzes CloudTrail S3 data events for unusual access patterns
- Detects: unusual API callers, access from new geographic locations, high-volume data exfiltration
- Enable per-account (not enabled by default even when GuardDuty is enabled)
Malware Protection for EC2:
- Scans EBS volumes attached to EC2 when GuardDuty detects suspicious activity
- Creates EBS snapshot, attaches to GuardDuty-managed scanner instance
- Does not impact running instance performance
Malware Protection for S3:
- Scans objects uploaded to S3 (on new object uploads)
- Creates prefixed/tagged findings for malicious objects
6. Suppression vs Archiving
| Action |
Effect |
Use When |
| Suppress |
Future matching findings not shown in active list |
Known-safe activity that generates noise |
| Archive |
Mark individual finding as reviewed/resolved |
Investigated finding; not a real threat |
| Trust IP list |
IP addresses that GuardDuty never generates findings for |
Your pen test IP ranges, internal scanners |
| Threat IP list |
IP addresses that GuardDuty always flags |
Known bad IPs specific to your environment |
Key Concepts
- Threat intelligence feeds — GuardDuty uses AWS-curated threat intelligence (known bad IPs, domains, hashes) + custom lists
- Anomaly detection — ML-based baselines; alerts on deviations from normal behavior (new geographic access, unusual API patterns)
- Finding retention — findings retained for 90 days by default; archive to S3 via EventBridge for longer retention
- GuardDuty delegated administrator — in AWS Organizations, designate specific account to manage GuardDuty for all accounts
- Runtime Monitoring — installs lightweight security agent on EC2/ECS/EKS to detect runtime threats (file access, process execution, network activity)
- Cross-region — GuardDuty is regional; enable in every region where you have resources; aggregate via Security Hub
Checklist
Output Format
- 🔴 Critical — GuardDuty disabled in active regions; high-severity finding (CryptoCurrency, Backdoor, UnauthorizedAccess) with no response; member accounts able to disable GuardDuty (not using Organizations)
- 🟡 Warning — S3 Protection not enabled (S3 threats not detected); no automated response for medium/high findings; suppression rules too broad (hiding real threats)
- 🟢 Suggestion — Security Hub integration to aggregate GuardDuty + Inspector + Macie findings; Runtime Monitoring for deep container/EC2 threat visibility; Detective for investigation of GuardDuty findings
Exam Tips
- GuardDuty = threat detection (behavioral anomalies); Inspector = vulnerability scanning (CVEs, network exposure); Macie = PII/sensitive data discovery in S3 — different tools, different purposes
- GuardDuty does NOT block traffic; use Lambda + NACL/SG for automated blocking in response to findings
- Multi-account: administrator account sees all member account findings; members cannot disable GuardDuty (when enrolled via Organizations)
- CryptoCurrency finding = EC2 communicating with known cryptocurrency mining infrastructure (one of the most common exam questions)
- EventBridge integration = route findings to SIEM, ticketing system (Jira), Slack, or Lambda automation — this is the standard response pattern
- Suppression rules ≠ fixing the threat — only suppress after confirming finding is definitely not a real threat (e.g., authorized pen test activity)
- S3 Protection must be enabled separately — enabling GuardDuty does NOT automatically enable S3 data event analysis
- DNS logs: GuardDuty only analyzes DNS queries going through AWS DNS resolver (Route 53 Resolver); custom DNS servers on EC2 bypass this
1---2name: guardduty-security3description: Use when setting up AWS GuardDuty threat detection, managing findings, automating incident response, configuring multi-account setups, or understanding GuardDuty vs Inspector vs Security Hub. Covers AWS SCS-C02 detection and response domain.4---56# AWS GuardDuty Security78## When to Use9- Enabling and configuring AWS GuardDuty for threat detection10- Understanding and triaging GuardDuty finding types11- Automating incident response to GuardDuty findings via EventBridge + Lambda12- Managing GuardDuty across multiple AWS accounts (Organization integration)13- Distinguishing GuardDuty from Inspector, Macie, and Security Hub14- Preparing for AWS Certified Security Specialty (SCS-C02) exam1516## Core Jobs1718### 1. GuardDuty Data Sources1920GuardDuty continuously analyzes these sources for threats:2122| Data Source | What It Detects | Enabled By Default |23|-------------|----------------|-------------------|24| **AWS CloudTrail management events** | API call anomalies, suspicious CLI/console activity | Yes |25| **AWS CloudTrail S3 data events** | Suspicious S3 object access patterns | Optional (S3 Protection) |26| **VPC Flow Logs** | Network anomalies, port scanning, crypto mining traffic | Yes |27| **DNS logs** | DNS-based data exfiltration, C2 communication | Yes (EC2 only, via AWS DNS resolver) |28| **EKS audit logs** | Suspicious Kubernetes API activity, privilege escalation | Optional (EKS Protection) |29| **ECS runtime** | Container-level threat detection | Optional (ECS Runtime Monitoring) |30| **Lambda network activity** | Suspicious outbound network calls from Lambda | Optional (Lambda Protection) |31| **RDS login events** | Brute force, anomalous authentication | Optional (RDS Protection) |32| **Malware Protection** | Malware in EC2 EBS volumes or uploaded S3 objects | Optional |3334GuardDuty does NOT require you to enable VPC Flow Logs or CloudTrail separately — it accesses these directly without storing logs in your account.3536### 2. Finding Types3738**Format**: `ThreatPurpose:ResourceAffected/ThreatFamilyName.DetectionMechanism!Artifact`3940| Category | Example Finding | Meaning |41|----------|----------------|---------|42| **Reconnaissance** | `Recon:EC2/PortProbeUnprotectedPort` | Port scanning on EC2 |43| **Backdoor** | `Backdoor:EC2/C&CActivity.B` | EC2 communicating with known C2 server |44| **CryptoCurrency** | `CryptoCurrency:EC2/BitcoinTool.B` | EC2 mining cryptocurrency |45| **UnauthorizedAccess** | `UnauthorizedAccess:EC2/SSHBruteForce` | SSH brute force attempts |46| **UnauthorizedAccess** | `UnauthorizedAccess:IAMUser/TorIPCaller` | API calls from Tor exit node |47| **Stealth** | `Stealth:IAMUser/CloudTrailLoggingDisabled` | CloudTrail disabled (cover tracks) |48| **Policy** | `Policy:S3/BucketPublicAccessGranted` | S3 bucket made public |49| **Execution** | `Execution:EC2/MaliciousFile` | Malware detected on EC2 |50| **Exfiltration** | `Exfiltration:S3/ObjectRead.Unusual` | Unusual volume of S3 reads |51| **PenTest** | `PenTest:IAMUser/KaliLinux` | API calls from Kali Linux machine |5253**Finding severity**:54- 🔴 **High (7.0–8.9)**: Active threat, immediate action required55- 🟡 **Medium (4.0–6.9)**: Suspicious activity, investigate56- 🟢 **Low (1.0–3.9)**: Informational, monitor5758### 3. Multi-Account Management5960**Administrator account** = central visibility and control:61- Sees findings from ALL member accounts62- Can enable/disable GuardDuty for member accounts63- Member accounts CANNOT disable GuardDuty themselves64- Single GuardDuty administrator account across Organization6566**Setup via AWS Organizations (recommended)**:671. Designate GuardDuty administrator account (Security/Audit account)682. Auto-enable for all current + future member accounts693. All findings flow to administrator account7071**Manual invitation method** (non-Organizations):72- Administrator sends invitation to member account; member accepts7374**Suppression rules**: Filter known-safe findings by account, region, resource type, or finding type. Suppressions apply to future findings. Suppressed findings still stored but not active.7576### 4. Automated Incident Response7778**Pattern**: GuardDuty finding → EventBridge rule → Lambda/SNS/SQS → automated action7980```81GuardDuty finding82 ↓83EventBridge rule (filter by severity, finding type)84 ↓85SNS topic → email/Slack notification86Lambda function → automated remediation87 ↓88Actions: block IP via NACL, isolate SG, disable IAM key, snapshot EBS89```9091**EventBridge rule for high-severity findings**:92```json93{94 "source": ["aws.guardduty"],95 "detail-type": ["GuardDuty Finding"],96 "detail": {97 "severity": [{"numeric": [">=", 7.0]}]98 }99}100```101102**Common automated responses**:103- Crypto mining finding → block outbound traffic to mining pool IPs via NACL104- Compromised IAM key → disable access key via `iam:UpdateAccessKey`105- Malicious EC2 → isolate by replacing SG with deny-all forensic SG106- C2 communication → isolate EC2 to forensic VPC, take EBS snapshot for analysis107108### 5. S3 Protection and Malware Protection109110**S3 Protection**:111- Analyzes CloudTrail S3 data events for unusual access patterns112- Detects: unusual API callers, access from new geographic locations, high-volume data exfiltration113- Enable per-account (not enabled by default even when GuardDuty is enabled)114115**Malware Protection for EC2**:116- Scans EBS volumes attached to EC2 when GuardDuty detects suspicious activity117- Creates EBS snapshot, attaches to GuardDuty-managed scanner instance118- Does not impact running instance performance119120**Malware Protection for S3**:121- Scans objects uploaded to S3 (on new object uploads)122- Creates prefixed/tagged findings for malicious objects123124### 6. Suppression vs Archiving125126| Action | Effect | Use When |127|--------|--------|---------|128| **Suppress** | Future matching findings not shown in active list | Known-safe activity that generates noise |129| **Archive** | Mark individual finding as reviewed/resolved | Investigated finding; not a real threat |130| **Trust IP list** | IP addresses that GuardDuty never generates findings for | Your pen test IP ranges, internal scanners |131| **Threat IP list** | IP addresses that GuardDuty always flags | Known bad IPs specific to your environment |132133## Key Concepts134135- **Threat intelligence feeds** — GuardDuty uses AWS-curated threat intelligence (known bad IPs, domains, hashes) + custom lists136- **Anomaly detection** — ML-based baselines; alerts on deviations from normal behavior (new geographic access, unusual API patterns)137- **Finding retention** — findings retained for 90 days by default; archive to S3 via EventBridge for longer retention138- **GuardDuty delegated administrator** — in AWS Organizations, designate specific account to manage GuardDuty for all accounts139- **Runtime Monitoring** — installs lightweight security agent on EC2/ECS/EKS to detect runtime threats (file access, process execution, network activity)140- **Cross-region** — GuardDuty is regional; enable in every region where you have resources; aggregate via Security Hub141142## Checklist143144- [ ] GuardDuty enabled in ALL AWS regions (threats don't respect regional boundaries)?145- [ ] Multi-account: GuardDuty administrator account designated in AWS Organizations?146- [ ] S3 Protection enabled (not on by default)?147- [ ] EKS Protection enabled for Kubernetes workloads?148- [ ] EventBridge rules configured to route high-severity findings to incident response?149- [ ] Suppression rules documented and reviewed (know what you're filtering out)?150- [ ] Custom threat IP list added for known external threat feeds?151- [ ] Trust IP list includes pen test IP ranges (to avoid false positives during authorized tests)?152153## Output Format154155- 🔴 **Critical** — GuardDuty disabled in active regions; high-severity finding (CryptoCurrency, Backdoor, UnauthorizedAccess) with no response; member accounts able to disable GuardDuty (not using Organizations)156- 🟡 **Warning** — S3 Protection not enabled (S3 threats not detected); no automated response for medium/high findings; suppression rules too broad (hiding real threats)157- 🟢 **Suggestion** — Security Hub integration to aggregate GuardDuty + Inspector + Macie findings; Runtime Monitoring for deep container/EC2 threat visibility; Detective for investigation of GuardDuty findings158159## Exam Tips160161- **GuardDuty = threat detection (behavioral anomalies)**; **Inspector = vulnerability scanning (CVEs, network exposure)**; **Macie = PII/sensitive data discovery in S3** — different tools, different purposes162- **GuardDuty does NOT block traffic**; use Lambda + NACL/SG for automated blocking in response to findings163- **Multi-account**: administrator account sees all member account findings; members cannot disable GuardDuty (when enrolled via Organizations)164- **CryptoCurrency finding** = EC2 communicating with known cryptocurrency mining infrastructure (one of the most common exam questions)165- **EventBridge integration** = route findings to SIEM, ticketing system (Jira), Slack, or Lambda automation — this is the standard response pattern166- **Suppression rules ≠ fixing the threat** — only suppress after confirming finding is definitely not a real threat (e.g., authorized pen test activity)167- **S3 Protection must be enabled separately** — enabling GuardDuty does NOT automatically enable S3 data event analysis168- **DNS logs**: GuardDuty only analyzes DNS queries going through AWS DNS resolver (Route 53 Resolver); custom DNS servers on EC2 bypass this