Ravindra BagaleCourses & study guides मराठी Track your progress

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.

What you'll learn 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

Why do we need this?

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.

What is it?

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.

Detection pathAWS logs & telemetryGuardDuty ML + rulesFinding → Security HubTicket / Lambda response
Detection without response playbooks is only noise.

2. Findings you will actually see

  • 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 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

Do this in ap-south-1 (Mumbai) unless your org forbids it. Set a budget alert first.

How to do it (step by step)

  1. In a sandbox account, open GuardDuty → Enable.
  2. Enable Security Hub and AWS Foundational Security Best Practices.
  3. Generate or wait for sample findings (GuardDuty supports sample).
  4. Open one finding; read severity, resource, remediation text.
  5. Optional: create EventBridge rule on GuardDuty finding → SNS email.

Cleanup (stop billing)

  1. If this is a throwaway sandbox, you may disable GuardDuty to stop the small fee — know that prod should stay on.
  2. 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 / symptomFix
GuardDuty enabled but silentWrong region; findings are regional. Check all active regions.
No CloudTrail → weaker detectionEnsure org CloudTrail / sufficient trails.
Alert fatigueSuppress rules for known safe scanners; do not ignore Critical.
Security Hub standards skippedEnable FSBP; assign owners to failed controls.
Member account not linkedDelegated admin invite/auto-enable config.
Sample findings confused with realLabel samples; filter them in tickets.
Auto-remediation loopsLambda that opens then triggers same control — add guards.
Cost surprise on Malware ProtectionKnow which optional protections bill extra.
Finding JSON unreadAlways expand resource.instanceDetails etc.
Root user findings ignoredTreat root activity as a fire drill.

7. Troubleshooting checklist

  1. Confirm GuardDuty Administrator account in Organizations.
  2. Check the region of the resource in the finding.
  3. Verify CloudTrail and DNS logs availability.
  4. See Security Hub → Findings filters.
  5. 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

  1. Enable GuardDuty in sandbox; screenshot the summary dashboard.
  2. List 5 failed Security Hub controls and who should own each.
  3. Write a 5-line playbook for CryptoCurrency mining finding.

In short

  1. GuardDuty watches AWS telemetry for threats.
  2. Security Hub aggregates findings and standard controls.
  3. Use delegated admin across Organizations.
  4. 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.

Revision card: What is Amazon GuardDuty?. Attackers probe keys and dig into unusual API calls while you sleep. GuardDuty is threat detection: it watches CloudTrail, VPC Flow, DNS (and more) and raises findings with severity. Enable GuardDuty in the account/region → review findings → send high severity to a ticket or Lambda. A finding like CredentialAccess:IAMUser/AnomalousBehavior appears with severity and affected resource.
Revision card: What is Amazon GuardDuty? · Download PNG · Open card page
Revision card: What is AWS Security Hub?. Security tools each have their own console; leadership wants one score and one queue. Security Hub aggregates findings (GuardDuty, Inspector, Config…) and checks against standards like FSBP or CIS. Enable Security Hub → enable standards → turn on integrations → triage failed controls. Controls show failed S3 public access; you fix the bucket and the control goes green after refresh.
Revision card: What is AWS Security Hub? · Download PNG · Open card page
Revision card: Triage by severity. Treating every LOW finding like an outage burns the team out. Prioritize HIGH/CRITICAL first. Suppress known lab noise with filters; never ignore CRITICAL crypto mining style findings. Create an EventBridge rule on GuardDuty findings with severity >= 7 to page on-call. On-call gets SNS only for high severity; LOW stays in the console dashboard.
Revision card: Triage by severity · Download PNG · Open card page
Revision card: Org-wide delegated admin. Enabling GuardDuty in one account leaves fifty member accounts blind. In Organizations, set a delegated administrator so GuardDuty/Security Hub cover member accounts centrally. From the management account, designate security-tooling account as admin; auto-enable for new accounts. A new member account shows up in GuardDuty admin with findings within the enable window.
Revision card: Org-wide delegated admin · Download PNG · Open card page
Revision card: Reduce noise safely. Alert fatigue makes real attacks look like more spam. Use suppression rules and trusted IP lists for known scanners in labs; keep production filters tight and reviewed. Document every suppression with owner and expiry; review monthly. After suppressing a noisy lab pen-test IP, CRITICAL findings from other IPs still page.
Revision card: Reduce noise safely · Download PNG · Open card page
Comparison: Amazon GuardDuty vs AWS Security Hub. Amazon GuardDuty: Threat findings from logs/traffic/DNS. AWS Security Hub: Aggregates findings + security standards score.
Comparison: Amazon GuardDuty vs AWS Security Hub · Download PNG · Open card page
Comparison: GuardDuty vs Macie. GuardDuty: Suspicious behaviour and malware-ish signals. Macie: Discovers sensitive data (PII) in S3.
Comparison: GuardDuty vs Macie · Download PNG · Open card page
Interview card: GuardDuty vs Security Hub?. GuardDuty detects threats from logs/traffic. Security Hub aggregates findings and runs security standards. Use both: GuardDuty for threat signal, Hub for posture score and one queue. Crypto-mining finding from GuardDuty appears in Hub for triage with other failed controls.
Interview card: GuardDuty vs Security Hub? · Download PNG · Open card page
Interview card: What do you do on a CRITICAL finding?. Contain (keys/instances), open an incident, preserve evidence, then eradicate and review IAM. Do not only silence the alert. Rotate exposed keys quickly. Compromised access key → disable key, GuardDuty detail, CloudTrail review.
Interview card: What do you do on a CRITICAL finding? · Download PNG · Open card page
Interview card: Which Hub standard first?. Many teams start with AWS Foundational Security Best Practices (FSBP), then add CIS if required. Enable, fix high-weight failed controls, track weekly. S3 Block Public Access failed control is a common first win.
Interview card: Which Hub standard first? · Download PNG · Open card page
Interview card: Multi-account GuardDuty export?. Delegate a GuardDuty admin; member accounts contribute findings to one place / Security Hub. Export findings to S3/EventBridge for SIEM and automation. Org admin sees a crypto finding from a sandbox member within minutes.
Interview card: Multi-account GuardDuty export? · Download PNG · Open card page

More cards: Ravi Sir's Cards.

Practice Tasks

About this scenario

Milan 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

Why: One detector per region usual.

What to do: List GuardDuty detectors in eu-south-1.

How:
  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Easy Get detector

Why: Confirm status.

What to do: Get detector milanfurnituredet.

How:
  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Easy Get Security Hub hub

Why: Confirm hub enabled.

What to do: Get the Security Hub hub in eu-south-1.

How:
  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Easy List enabled standards

Why: CIS / FSBP coverage.

What to do: List enabled Security Hub standards.

How:
  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Easy High severity example score

Why: Severity helps priority.

What to do: A finding with severity score 8 is in which numeric band start often taught as 7+? Enter 7.

How:
  1. Write down the numbers the task gives you.
  2. Work it out step by step on paper.
  3. Type only the final answer in the box.
  4. Click Check answer.

Easy Enable GuardDuty in N regions example

Why: Multi-region coverage.

What to do: If you enable GuardDuty in 3 regions, how many detectors do you typically create?

How:
  1. Write down the numbers the task gives you.
  2. Work it out step by step on paper.
  3. Type only the final answer in the box.
  4. Click Check answer.

Medium List findings

Why: Triage threats.

What to do: List findings for detector milanfurnituredet.

How:
  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Medium Get findings detail

Why: Read severity and type.

What to do: Get findings f1 for detector milanfurnituredet.

How:
  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Medium Update detector enable

Why: Re-enable after pause.

What to do: Update detector milanfurnituredet with enable true.

How:
  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Medium Get Security Hub findings

Why: Aggregate across products.

What to do: Get Security Hub findings.

How:
  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Medium Allow reading GuardDuty findings

Why: SOC role needs read.

What to do: Allow guardduty:ListFindings and guardduty:GetFindings on *.

How:
  1. Start with { "Version": "2012-10-17", "Statement": [ ... ] }.
  2. In each statement write Effect, Action and Resource.
  3. Give only what the task needs (least privilege).
  4. Use double quotes and commas correctly. Click Check answer.

Medium CIS controls count example

Why: Standards have many controls.

What to do: If a quiz says review 5 failed CIS controls, what number is that?

How:
  1. Write down the numbers the task gives you.
  2. Work it out step by step on paper.
  3. Type only the final answer in the box.
  4. Click Check answer.

Hard Create detector

Why: Enable GuardDuty.

What to do: Create a GuardDuty detector with enable true.

How:
  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Hard Enable Security Hub

Why: Turn on the hub.

What to do: Enable Security Hub.

How:
  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Hard Finding criteria JSON

Why: Filter CRITICAL severity.

What to do: JSON with SeverityLabel CRITICAL under a Filter key.

How:
  1. Start from the top-level keys the task names.
  2. Indent child keys with 2 spaces (no tabs).
  3. Fill in each property with the value from the task.
  4. Click Check answer. Key order does not matter.

Hard Security Hub severity filter

Why: Focus on HIGH.

What to do: Filters SeverityLabel with Value HIGH Comparison EQUALS.

How:
  1. Start from the top-level keys the task names.
  2. Indent child keys with 2 spaces (no tabs).
  3. Fill in each property with the value from the task.
  4. Click Check answer. Key order does not matter.