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

AWS Cloud

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.

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

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.

  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.

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.

0 of 3 answered correctly
1. What is the main evidence in a GuardDuty finding?

Answer and explanation

A. A recorded detection about associated activity and resources

GuardDuty provides details to investigate a potential threat. The finding’s resource and time guide the next check.

2. What should you mark before using a generated sample finding in a report?

Answer and explanation

C. That it is a sample fixture

Sample evidence is for verifying a workflow. Label it so readers do not mistake it for a real event.

3. Which fields make a finding traceable across multiple accounts?

Answer and explanation

A. Source account, Region, resource and time

Administrative aggregation does not move the resource. Source details tell a responder where to investigate.

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

One detector per region usual.

List GuardDuty detectors in eu-south-1.

  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

Confirm status.

Get detector milanfurnituredet.

  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

Confirm hub enabled.

Get the Security Hub hub in eu-south-1.

  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

CIS / FSBP coverage.

List enabled Security Hub standards.

  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

Severity helps priority.

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

  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

Multi-region coverage.

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

  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

Triage threats.

List findings for detector milanfurnituredet.

  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

Read severity and type.

Get findings f1 for detector milanfurnituredet.

  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

Re-enable after pause.

Update detector milanfurnituredet with enable true.

  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

Aggregate across products.

Get Security Hub findings.

  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

SOC role needs read.

Allow guardduty:ListFindings and guardduty:GetFindings on *.

  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

Standards have many controls.

If a quiz says review 5 failed CIS controls, what number is that?

  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

Enable GuardDuty.

Create a GuardDuty detector with enable true.

  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

Turn on the hub.

Enable Security Hub.

  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

Filter CRITICAL severity.

JSON with SeverityLabel CRITICAL under a Filter key.

  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

Focus on HIGH.

Filters SeverityLabel with Value HIGH Comparison EQUALS.

  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.