Amazon GuardDuty and Security Hub: Threat Detection on AWS Explained
CCTV does not replace a security guard who understands patterns. CloudTrail is the CCTV tape. Amazon GuardDuty is the guard who watches tapes for weird behaviour. Security Hub is the control room wall that collects alarms from many cameras.
In this chapter
- Why detection must sit on top of logs
- What GuardDuty findings mean
- What Security Hub and CSPM standards do
- Enablement, triage, and multi-account
- Lab, errors, FAQ, interview
1. Everyday example first
A startup IAM key leaked on GitHub. Nobody watched. Bitcoin miners launched in a region they never used. GuardDuty would have raised UnauthorizedAccess findings within minutes if enabled with fresh findings feed.
Amazon GuardDuty is intelligent threat detection using CloudTrail, VPC Flow Logs, DNS logs (and optional EKS/S3/Malware/RDS protections). It emits findings with severity. AWS Security Hub aggregates findings from GuardDuty, Inspector, Macie, Partner tools and checks against standards like AWS Foundational Security Best Practices.
2. Findings you will actually see
A finding is a structured record that explains a detection, not a diagnosis by itself. A GuardDuty finding can point to unusual activity involving a particular resource and identity. Read its type, Region, account, resource, time and severity. For a fictional alert about unexpected credential use, compare the time and affected identity with a known deployment before deciding whether to investigate further. Security Hub CSPM can collect findings and run security checks against a standard. A finding from another service identifies its original source so you can follow the underlying evidence.
- UnauthorizedAccess / TorIPCaller — credentials used from odd places.
- Recon:EC2 PortProbe — someone scanning your instances.
- CryptoCurrency:EC2 Mining — classic stolen-key symptom.
- Exfiltration behaviours on S3 when S3 protection is on.
- Security Hub failed controls: open SG 0.0.0.0/0, root without MFA.
3. Multi-account reality
In a company with several AWS accounts, someone needs to answer which account owns the finding and who will handle it. A delegated administration account can organise the view, while the affected resource remains in its original account. Draw three fields on your case note: source account, person responsible and time checked. Add the Region as well, because the details you need may be in a different Region than your first console view. That makes it easier for the receiving team to find the same event.
In Organizations, enable GuardDuty and Security Hub with a delegated administrator security account. Member accounts send findings up. Do not leave 40 accounts on default with nobody watching.
Ravindra Bagale's Tip
Severity High/Critical should page a human. Low/Medium go to a weekly triage board.
4. Industries
- Banks & fintech: mandatory detection + SIEM export.
- Healthcare: HIPAA-minded logging + GuardDuty.
- SaaS: protect customer data planes across accounts.
- Edtech: stop crypto-mining on student lab accounts.
- Agencies: Security Hub score as client report card.
5. Mini lab: enable and read one finding
Use the sample-finding option if it is already available in a training account. Record the finding type, severity and resource from one sample and check its sample marker. Compare the original detection view with Security Hub CSPM only if integration is enabled. The goal is to read the same source and affected resource in both views. Keep the sample label in your notes so it never becomes evidence of a real incident.
Do this in ap-south-1 (Mumbai) unless your org forbids it. Set a budget alert first.
- In a sandbox account, open GuardDuty → Enable.
- Enable Security Hub and AWS Foundational Security Best Practices.
- Generate or wait for sample findings (GuardDuty supports sample).
- Open one finding; read severity, resource, remediation text.
- Optional: create EventBridge rule on GuardDuty finding → SNS email.
Cleanup (stop billing)
- If this is a throwaway sandbox, you may disable GuardDuty to stop the small fee — know that prod should stay on.
- Remove the SNS test subscription.
6. Common errors and fixes
Each row is a real mistake students and juniors hit. Read the fix before you panic.
| Error / symptom | Fix |
|---|---|
| GuardDuty enabled but silent | Wrong region; findings are regional. Check all active regions. |
| No CloudTrail → weaker detection | Ensure org CloudTrail / sufficient trails. |
| Alert fatigue | Suppress rules for known safe scanners; do not ignore Critical. |
| Security Hub standards skipped | Enable FSBP; assign owners to failed controls. |
| Member account not linked | Delegated admin invite/auto-enable config. |
| Sample findings confused with real | Label samples; filter them in tickets. |
| Auto-remediation loops | Lambda that opens then triggers same control — add guards. |
| Cost surprise on Malware Protection | Know which optional protections bill extra. |
| Finding JSON unread | Always expand resource.instanceDetails etc. |
| Root user findings ignored | Treat root activity as a fire drill. |
7. Troubleshooting checklist
- Confirm GuardDuty Administrator account in Organizations.
- Check the region of the resource in the finding.
- Verify CloudTrail and DNS logs availability.
- See Security Hub → Findings filters.
- Map finding type to AWS remediation runbook.
8. FAQ
Q. Is GuardDuty an antivirus?
No — threat detection on AWS telemetry, plus optional malware scan features.
Q. GuardDuty vs Security Hub?
GuardDuty detects threats; Security Hub aggregates and scores controls.
Q. Do I still need CloudTrail?
Yes — foundational audit log.
Q. Can findings go to Slack?
Yes — EventBridge → Lambda/SNS/chatbot patterns.
Q. Free tier?
GuardDuty has a pricing model with free trial periods — check current AWS pricing page.
9. Interview Q&A
Q. What inputs does GuardDuty use?
CloudTrail, VPC Flow, DNS, and optional specialty protections.
Q. What is a finding?
A scored security signal about a resource or account behaviour.
Q. Delegated administrator?
Central security account that manages GuardDuty/Hub for the org.
Q. How do you respond?
Triage severity → contain (disable key, isolate SG) → eradicate → review.
Q. Security Hub standards?
Automated CIS/FSBP-style checks with pass/fail controls.
Q. False positive handling?
Document, suppress with reason, never silently drop Critical without review.
10. Tips in English, Marathi and Hindi
Ravindra Bagale's Tip (EN)
Enable GuardDuty the same day you create the account — before the first leak.
Ravindra Bagale's Tip (MR)
Account बनवल्या दिवशी GuardDuty — पहिल्या leak आधी.
Tip (HI)
अकाउंट बनाते ही दिन GuardDuty ऑन करो — पहले leak से पहले।
Try at home
- Enable GuardDuty in sandbox; screenshot the summary dashboard.
- List 5 failed Security Hub controls and who should own each.
- Write a 5-line playbook for CryptoCurrency mining finding.
In short
- GuardDuty watches AWS telemetry for threats.
- Security Hub aggregates findings and standard controls.
- Use delegated admin across Organizations.
- Triage by severity; practice response.
Revision, interview and comparison cards
Revise this lesson in a few minutes. Save the cards on your phone or download them as PNG files. The QR code on each card opens this lesson.











More cards: Ravi Sir's Cards.
Practise this chapter
Interview questions and answers
How would you explain an event sent to Security Hub CSPM by GuardDuty?
Identify GuardDuty as the finding source, then read the affected account, Region, resource, time and finding type. Verify whether it is a sample or real evidence before opening an incident. Security Hub CSPM consolidates findings and also evaluates security controls, which answer a different question from an activity detection.
Check your understanding
Choose an answer, then compare your reasoning with the explanation.
Practice Tasks
Practice checks run in your browser. They check the answer for this exercise; they do not create resources or connect to your AWS account.
About this scenarioMilan Furniture is a furniture business in Milan. Giulia Rossi looks after its IT and cloud work. They count money in EUR and run their AWS resources in the eu-south-1 Region. In the tasks below you do real jobs for them using what this lesson teaches. All names, account IDs, IP addresses and numbers are made up for practice.
0 / 16
Easy List GuardDuty detectors
One detector per region usual.
List GuardDuty detectors in eu-south-1.
- Read the task and decide which AWS service it is about.
- Write aws, then the service name, then the operation (the action word).
- Add each needed flag (--name) followed by its value from the task.
- Flags can be in any order. Click Check answer.
Easy Get detector
Confirm status.
Get detector milanfurnituredet.
- Read the task and decide which AWS service it is about.
- Write aws, then the service name, then the operation (the action word).
- Add each needed flag (--name) followed by its value from the task.
- Flags can be in any order. Click Check answer.
Easy Get Security Hub hub
Confirm hub enabled.
Get the Security Hub hub in eu-south-1.
- Read the task and decide which AWS service it is about.
- Write aws, then the service name, then the operation (the action word).
- Add each needed flag (--name) followed by its value from the task.
- Flags can be in any order. Click Check answer.
Easy List enabled standards
CIS / FSBP coverage.
List enabled Security Hub standards.
- Read the task and decide which AWS service it is about.
- Write aws, then the service name, then the operation (the action word).
- Add each needed flag (--name) followed by its value from the task.
- Flags can be in any order. Click Check answer.
Easy High severity example score
Severity helps priority.
A finding with severity score 8 is in which numeric band start often taught as 7+? Enter 7.
- Write down the numbers the task gives you.
- Work it out step by step on paper.
- Type only the final answer in the box.
- Click Check answer.
Easy Enable GuardDuty in N regions example
Multi-region coverage.
If you enable GuardDuty in 3 regions, how many detectors do you typically create?
- Write down the numbers the task gives you.
- Work it out step by step on paper.
- Type only the final answer in the box.
- Click Check answer.
Medium List findings
Triage threats.
List findings for detector milanfurnituredet.
- Read the task and decide which AWS service it is about.
- Write aws, then the service name, then the operation (the action word).
- Add each needed flag (--name) followed by its value from the task.
- Flags can be in any order. Click Check answer.
Medium Get findings detail
Read severity and type.
Get findings f1 for detector milanfurnituredet.
- Read the task and decide which AWS service it is about.
- Write aws, then the service name, then the operation (the action word).
- Add each needed flag (--name) followed by its value from the task.
- Flags can be in any order. Click Check answer.
Medium Update detector enable
Re-enable after pause.
Update detector milanfurnituredet with enable true.
- Read the task and decide which AWS service it is about.
- Write aws, then the service name, then the operation (the action word).
- Add each needed flag (--name) followed by its value from the task.
- Flags can be in any order. Click Check answer.
Medium Get Security Hub findings
Aggregate across products.
Get Security Hub findings.
- Read the task and decide which AWS service it is about.
- Write aws, then the service name, then the operation (the action word).
- Add each needed flag (--name) followed by its value from the task.
- Flags can be in any order. Click Check answer.
Medium Allow reading GuardDuty findings
SOC role needs read.
Allow guardduty:ListFindings and guardduty:GetFindings on *.
- Start with { "Version": "2012-10-17", "Statement": [ ... ] }.
- In each statement write Effect, Action and Resource.
- Give only what the task needs (least privilege).
- Use double quotes and commas correctly. Click Check answer.
Medium CIS controls count example
Standards have many controls.
If a quiz says review 5 failed CIS controls, what number is that?
- Write down the numbers the task gives you.
- Work it out step by step on paper.
- Type only the final answer in the box.
- Click Check answer.
Hard Create detector
Enable GuardDuty.
Create a GuardDuty detector with enable true.
- Read the task and decide which AWS service it is about.
- Write aws, then the service name, then the operation (the action word).
- Add each needed flag (--name) followed by its value from the task.
- Flags can be in any order. Click Check answer.
Hard Enable Security Hub
Turn on the hub.
Enable Security Hub.
- Read the task and decide which AWS service it is about.
- Write aws, then the service name, then the operation (the action word).
- Add each needed flag (--name) followed by its value from the task.
- Flags can be in any order. Click Check answer.
Hard Finding criteria JSON
Filter CRITICAL severity.
JSON with SeverityLabel CRITICAL under a Filter key.
- Start from the top-level keys the task names.
- Indent child keys with 2 spaces (no tabs).
- Fill in each property with the value from the task.
- Click Check answer. Key order does not matter.
Hard Security Hub severity filter
Focus on HIGH.
Filters SeverityLabel with Value HIGH Comparison EQUALS.
- Start from the top-level keys the task names.
- Indent child keys with 2 spaces (no tabs).
- Fill in each property with the value from the task.
- Click Check answer. Key order does not matter.