Sub topic 6
Reducing noise with suppression rules and IP lists
This chapter assumes you have a running GuardDuty detector, can read a finding's type and severity, and can read JSON. You should also be comfortable with the AWS CLI and with how IAM and Regions scope resources.
Why tune GuardDuty
GuardDuty reports what looks suspicious. Some of it is expected in your environment, such as a vulnerability scanner that probes your instances every night. If those findings pile up, real threats get lost among them. You have two tools for this: suppression rules and IP lists.
Suppression rules
A suppression rule is a saved filter with the action ARCHIVE. When a new finding matches the filter, GuardDuty archives it automatically. Archived findings stay in GuardDuty and you can still view them, but they leave the list of active findings. They are also not sent to Security Hub or EventBridge, so a suppression rule cuts noise in every downstream tool.
The CLI command is create-filter. A filter has a name, an action, a rank, and criteria:
DETECTOR_ID=$(aws guardduty list-detectors --query 'DetectorIds[0]' --output text)
aws guardduty create-filter --detector-id "$DETECTOR_ID" --name suppress-port-probe-sample --action ARCHIVE --rank 1 --finding-criteria '{"Criterion":{"type":{"Eq":["Recon:EC2/PortProbeUnprotectedPort"]}}}'This rule archives every new finding of type Recon:EC2/PortProbeUnprotectedPort. The rank sets the order in which GuardDuty evaluates your rules.
A rule that matches on type alone is broad. It hides that finding type for every resource in the Region. Add more criteria to narrow it, for example the account, a resource tag, or the scanner's IP address. Criteria are combined with AND.
Trusted and threat IP lists
IP lists change how GuardDuty treats specific addresses. You upload them as plain text files, one address or CIDR range per line, stored in Amazon S3.
| List | Purpose | Effect |
|---|---|---|
| Trusted IP list | Addresses you know are safe, such as your office or a security scanner | GuardDuty does not generate findings based on traffic from these addresses |
| Threat IP list | Addresses you know are malicious | GuardDuty generates findings when your resources communicate with these addresses |
Each list is attached to one detector in one Region. GuardDuty allows one trusted list and a limited number of threat lists per detector, and the limits apply per Region. Check the current quotas before planning a large list.
The command to register a trusted list looks like this:
aws guardduty create-ip-set --detector-id "$DETECTOR_ID" --name office-and-scanner --format TXT --location s3://example-bucket/trusted-ips.txt --activateReplace the bucket name with your own. The --format option also accepts other formats, such as STIX and OTX_CSV, which suit threat lists.
Trusted IP lists have a limit. They suppress findings tied to traffic from the listed address. They do not suppress findings that come from other sources, such as CloudTrail activity. Use a suppression rule when you need to silence a finding type in a more general way.
Choosing between the two
Prefer a trusted IP list when the cause is a known address. Prefer a suppression rule when the cause is a behavior on specific resources. If you cannot explain why the finding is harmless, investigate it instead.
Common mistakes
- Writing a rule on finding type only, which hides real threats of the same type.
- Expecting a new rule to clean up existing findings. Archive those manually.
- Creating the list or rule in one Region and expecting it to apply in others. Repeat the setup in each Region.
- Forgetting the
--activateflag, so the IP list exists but has no effect.
Exercise
Your internal vulnerability scanner at 203.0.113.25 triggers many port probe findings. Name two ways to reduce this noise, and say which one is safer for hiding the fewest real threats.
Show answer
You can add 203.0.113.25 to a trusted IP list, or create a suppression rule for the port probe finding type. The trusted IP list is safer here because it only affects traffic from that one address. A suppression rule on type alone would also hide port probes from real attackers, unless you add more criteria to narrow it.