Lesson 2 of 3 Security Findings and Remediation

Detecting Threats and Vulnerabilities with GuardDuty and Inspector

This lesson explains how Amazon GuardDuty detects active threats and Amazon Inspector finds exploitable vulnerabilities, and how operations teams route and remediate their findings.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe GuardDuty data sources and protection plans.
  • Describe what Inspector scans.
  • Choose remediation for common findings.

Amazon GuardDuty

Amazon GuardDuty continuously analyses CloudTrail management events, VPC Flow Logs and Route 53 Resolver DNS logs, without you enabling those logs, using threat intelligence and machine learning. Protection plans add S3 data events, EKS audit logs, runtime monitoring for EC2, ECS and EKS, malware scanning of EBS volumes and S3 uploads, RDS login activity and Lambda network activity. Extended Threat Detection correlates related signals into attack sequence findings. Findings have a type such as CryptoCurrency:EC2/BitcoinTool.B, UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.OutsideAWS or Recon:EC2/PortProbeUnprotectedPort, and a severity. A delegated administrator enables GuardDuty in all accounts and Regions with auto-enable; trusted IP lists, threat lists and suppression rules tune results.

True or false

GuardDuty

Exam skills 4.2.5

Check facts about Amazon GuardDuty.

Log in to try this activity Interactive activities are free with an account.

Amazon Inspector

Amazon Inspector continuously scans EC2 instances (with the SSM Agent, or agentless using EBS snapshots), ECR container images on push and continuously, and Lambda functions and their code for software vulnerabilities (CVEs), and reports network reachability findings for instances exposed through open paths. Each finding has an Inspector score that adjusts the CVSS score for the environment, for example lowering it when the port is not reachable. Findings are rescanned automatically when new CVEs are published or software changes. Inspector can export a software bill of materials (SBOM), and Inspector Classic, which used assessment templates, has reached end of support.

Remediating findings

Remediation depends on the finding. The following table lists common cases.

FindingRemediation
GuardDuty: instance mining cryptocurrency or contacting command-and-controlIsolate the instance (isolation security group), snapshot for forensics, replace from a clean AMI
GuardDuty: instance credentials used outside AWSRevoke the role's active sessions, require IMDSv2, investigate the instance
GuardDuty: unusual S3 accessReview CloudTrail data events, restrict the bucket policy, rotate credentials
Inspector: critical CVE on EC2Patch with Patch Manager or rebuild the AMI with Image Builder
Inspector: vulnerable package in a container imageRebuild the image on a patched base and redeploy
Inspector: network reachability to port 22 from the internetRestrict the security group; use Session Manager

The following diagram shows the remediation for three of the findings in the table.

Remediation for common findings. A GuardDuty finding of cryptocurrency mining or command-and-control traffic isolates the instance, snapshots it for forensics and replaces it from a clean AMI. Instance credentials used outside AWS revoke the role's active sessions and require IMDSv2. An Inspector vulnerability triggers patching with Patch Manager.
Snapshot before replacing, so evidence survives the clean-up.
Sort into groups

Which service found it?

Exam skills 4.2.5

Decide which service reports each finding.

Log in to try this activity Interactive activities are free with an account.
Worked example

Automatic patching from Inspector

Inspector reports critical OS vulnerabilities on 80 EC2 instances across accounts. An EventBridge rule on Inspector findings with severity CRITICAL and resource type AWS_EC2_INSTANCE adds the instance ID to a queue; a nightly maintenance window runs AWS-RunPatchBaseline with Install on the listed instances. Inspector rescans after the software inventory changes and closes the findings. Instances in Auto Scaling groups are instead refreshed with the latest Image Builder AMI, because patching them in place would be lost when they are replaced.

Check yourself

Does GuardDuty block malicious traffic?

Show answer

No. It detects threats; responses are automated with EventBridge.

Exam Tips

Remember for the exam

  • GuardDuty analyses CloudTrail, VPC Flow Logs and DNS logs without you enabling them.
  • GuardDuty detects; it does not block. Automate responses with EventBridge.
  • Inspector scans EC2, ECR images and Lambda continuously and reports network reachability.
  • Patch EC2 findings with Patch Manager; fix immutable instances by rebuilding AMIs.
  • Suppression rules archive expected GuardDuty findings.