Sub topic 6
Reducing noise with suppression rules and IP lists
This chapter assumes you have a working GuardDuty detector and have read a few findings. You should know the finding anatomy (type, severity, resource, actor) and be comfortable with the AWS CLI and JSON. By the end you will be able to cut known-benign findings without hiding real threats.
Why tuning matters
GuardDuty reports what looks suspicious, not what is malicious in your context. A vulnerability scanner you run on purpose produces Recon:EC2/PortProbeUnprotectedPort. A bastion host that gets many SSH attempts produces UnauthorizedAccess:EC2/SSHBruteForce. If these findings pile up, responders learn to ignore the queue, and the one real finding gets missed.
GuardDuty gives you three tools for this:
| Tool | What it does | Effect on findings |
|---|---|---|
| Suppression rule | Archives findings that match criteria you define | Finding is still stored, but marked archived |
| Trusted IP list | Lists IP addresses you consider safe | GuardDuty does not generate findings for activity from those addresses |
| Threat IP list | Lists IP addresses you consider hostile | GuardDuty generates findings when your resources talk to them |
The first two reduce noise. The third adds detection coverage, and it is covered at the end because it works in the opposite direction.
Suppression rules
A suppression rule is a saved filter whose action is ARCHIVE. When a new finding matches the criteria, GuardDuty sets it to archived instead of leaving it active. Archived findings stay available in GuardDuty for 90 days. They disappear from the default active view, so they do not appear in your daily triage.
The API calls this object a filter. A filter with action NOOP is only a saved search. A filter with action ARCHIVE is a suppression rule.
flowchart TDIgnore the line above. The diagram follows.
Creating a rule
This command archives one finding type. It is the same rule you may have used with sample findings.
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 is too broad for production. It hides every port-probe finding in the Region, including ones against instances that should never be probed. Good suppression rules are narrow, and they combine several conditions.
Writing narrow criteria
Criteria are a JSON object. Each key is a finding field, and each value is a condition such as Eq, Neq, Gt, Gte, Lt, Lte, Equals, or NotEquals. When you list several fields, all of them must match (logical AND). When you list several values inside one condition, any of them can match (logical OR).
Here is a rule that archives SSH brute force findings, but only for instances you tagged as scanner targets:
aws guardduty create-filter \
--detector-id "$DETECTOR_ID" \
--name suppress-bastion-ssh-bruteforce \
--description "Bastion hosts are expected to see SSH attempts" \
--action ARCHIVE \
--rank 2 \
--finding-criteria '{
"Criterion": {
"type": {"Eq": ["UnauthorizedAccess:EC2/SSHBruteForce"]},
"resource.instanceDetails.tags.key": {"Eq": ["Role"]},
"resource.instanceDetails.tags.value": {"Eq": ["bastion"]}
}
}'Fields you will use most often:
typeto pick one finding type.accountIdandregionto scope a rule to part of the organization.resource.instanceDetails.instanceIdor its tags to scope to specific hosts.service.action.networkConnectionAction.remoteIpDetails.ipAddressV4to match a known remote address.
Tags are a good scoping field because they follow the instance. When a bastion is replaced, the new instance carries the same tag and the rule still applies. An instance ID rule silently stops working.
Managing rules
Review your rules on a schedule. These commands cover the lifecycle:
aws guardduty list-filters --detector-id "$DETECTOR_ID"
aws guardduty get-filter --detector-id "$DETECTOR_ID" --filter-name suppress-bastion-ssh-bruteforce
aws guardduty update-filter \
--detector-id "$DETECTOR_ID" \
--filter-name suppress-bastion-ssh-bruteforce \
--rank 3
aws guardduty delete-filter --detector-id "$DETECTOR_ID" --filter-name suppress-port-probe-sampleDeleting a rule stops future suppression. It does not restore findings that were already archived. To bring them back, list them with list-findings (including archived ones in your criteria) and then run aws guardduty unarchive-findings --detector-id "$DETECTOR_ID" --finding-ids <id>.
Check a rule before you trust it
Because the criteria of a suppression rule and the criteria of a list-findings query use the same syntax, you can test a rule first. Run the same criteria as a query against your current findings and read what comes back:
aws guardduty list-findings \
--detector-id "$DETECTOR_ID" \
--finding-criteria '{"Criterion":{"type":{"Eq":["UnauthorizedAccess:EC2/SSHBruteForce"]},"resource.instanceDetails.tags.value":{"Eq":["bastion"]}}}'Pass the returned IDs to get-findings and confirm that every result is one you intend to hide. If one is a surprise, tighten the criteria before you create the rule.
Trusted IP lists
A trusted IP list names addresses that GuardDuty should treat as safe, for example the egress addresses of your corporate network or of an approved penetration-testing vendor. GuardDuty does not generate findings for activity involving those addresses.
The list is a plain text file in Amazon S3, one IP address or CIDR range per line:
203.0.113.10
198.51.100.0/24Upload it, then register it with GuardDuty:
aws s3 cp trusted-ips.txt s3://my-guardduty-lists/trusted-ips.txt
aws guardduty create-ip-set \
--detector-id "$DETECTOR_ID" \
--name corp-egress \
--format TXT \
--location s3://my-guardduty-lists/trusted-ips.txt \
--activatePoints to remember:
- Each list is scoped to one Region and one detector. Repeat the registration in every Region you use.
- GuardDuty reads the file through its service-linked role, so the bucket policy and any KMS key must allow that read. A list that cannot be read stays in an error state and has no effect.
- Editing the S3 object does not update GuardDuty automatically. Call
update-ip-setwith the same--locationafter each change. - Each account has a limited number of lists and entries per list. Check the current GuardDuty quotas before you plan large lists.
Choosing between a rule and a list
The two features overlap, but they behave differently. A trusted IP list stops GuardDuty from creating findings at all for those addresses. A suppression rule lets GuardDuty create the finding and then archives it, so you keep a record. Use that difference to decide:
- Use a trusted IP list when the address is one you control and you never want findings from it.
- Use a suppression rule when you want to hide a pattern but keep the evidence, or when the condition is not an IP address (a tag, an account, a finding type).
- Prefer the narrowest tool. A broad trusted CIDR range can hide a compromised host inside it.
Threat IP lists
A threat IP list works the other way. You supply addresses you know are hostile, such as indicators from your own intelligence feed, and GuardDuty raises findings when your resources communicate with them. GuardDuty already uses its own AWS and partner intelligence, so a custom list only adds your private indicators.
aws guardduty create-threat-intel-set \
--detector-id "$DETECTOR_ID" \
--name internal-intel \
--format TXT \
--location s3://my-guardduty-lists/threat-ips.txt \
--activateBesides TXT, the supported formats include STIX, OTX_CSV, ALIEN_VAULT, PROOF_POINT, and FIRE_EYE. Choose the format your feed already produces.
A tuning routine
Tuning is ongoing work, not a one-time task. A workable routine:
- Group active findings by type and count them each week.
- For the top few types, decide whether the activity is expected.
- If it is, write the narrowest rule or list entry that covers it, and record the reason in
--description. - Re-run the matching
list-findingsquery a week later to confirm that the volume dropped. - Review all rules quarterly and delete the ones whose reason no longer applies.
Common mistakes
- Suppressing on a field that changes, such as an instance ID in an autoscaling group.
- Adding a whole corporate CIDR block to a trusted list when only a few addresses need it.
- Forgetting to call
update-ip-setafter editing the S3 file. - Creating lists in one Region and expecting them to apply in others.
- Suppressing findings that your EventBridge rules were meant to respond to, then wondering why the automation never fires.
Exercise
Your scheduled vulnerability scanner runs from instances tagged Role=scanner, and it triggers Recon:EC2/PortProbeUnprotectedPort findings against other hosts. A teammate proposes a suppression rule on that finding type alone. What is the problem, and what would you do instead?
Show answer
A rule on the type alone hides every port-probe finding in the Region, including real probes against hosts that should not be probed. Instead, write criteria that combine the type with a condition that identifies the scanner activity, such as the remote IP address of the scanner. If the scanner has fixed egress addresses you control, a trusted IP list is also an option. Test the criteria with list-findings first, add a description, and review the rule on a schedule.
Exercise
You edited trusted-ips.txt in S3 to add a new address, but GuardDuty still creates findings for that address. What step is missing?
Show answer
GuardDuty does not re-read the S3 object on its own. Run aws guardduty update-ip-set with the detector ID, the IP set ID, and the same --location, and keep the list activated, so GuardDuty reloads the file. Also confirm that the list is in the same Region as the findings.