本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
更新中的禁止规则 GuardDuty
本节提供了在特定版本 Amazon Web Services 账户 中更新禁止规则的步骤 Amazon Web Services 区域。
您可以从 GuardDuty 控制台的禁止规则页面更新现有的抑制规则。 GuardDuty 支持通过 GuardDuty 控制台或使用 GuardDuty CLI/API 更新抑制过滤器描述、等级和筛选条件。更新禁止规则遵循与描述、等级和标准字段值相同的限制创建抑制规则。
如果您是成员账户,则您的管理员账户可以代表您执行此操作。有关更多信息,请参阅 管理员账户和成员账户的关系。
选择您的首选访问方法来删除 GuardDuty 查找类型的禁止规则。
- Console
-
打开 GuardDuty 控制台,网址为https://console.aws.amazon.com/guardduty/
。 -
在禁止规则页面上,选择要更新的禁止规则。
-
从 “操作” 下拉列表中,选择 “更新抑制规则”。
-
这将打开现有的抑制规则表单。
-
根据需要对 “描述”、“等级” 和 “属性” 部分进行更改。
-
选择 “更新抑制规则” 以更新禁止规则。
- API/CLI
-
要使用 API 更新禁止规则,请执行以下操作:
-
您可以通过 UpdateFilter API 更新禁止规则。只能使用 UpdateFilter API 更新描述、等级和标准。这三个字段都是可选的。
- To update an existing filter, you will need the name of the filter that you are planning to update.
-
If you want to update the existing criteria, create a JSON file with the updated criteria similar to how you first created the filter. An example criteria to suppress any unarchived low-severity findings that has a DNS request to the test.example.com domain. For medium severity findings, the input list will be ["4", "5", "7"]. For high severity findings, the input list will be ["6", "7", "8"]. For critical severity findings, the input list will be ["9", "10"]. You can also filter on the basis of any one value in the list. The following example adds a filter for low severity findings.
{ "Criterion": { "service.action.dnsRequestAction.domain": { "Equals": [ "test.example.com" ] }, "severity": { "Equals": [ "1", "2", "3" ] } } }有关 JSON 字段名及其控制台等效项的列表,请参阅中的属性筛选器 GuardDuty。
要测试筛选条件,请在 ListFindings API 中使用相同的 JSON 条件,并确认已选择正确的调查发现。要使用您自己的 detectorID 和.json 文件来测试您的筛选条件, Amazon CLI 请按照示例进行操作。
要查找您的账户和当前区域的,请查看https://console.aws.amazon.com/guardduty/
控制台中的 “设置” 页面,或者运行 ListDetectorsAPI。 detectorIdaws guardduty list-detectors --regionus-east-1 -
如果要更新描述,可以在 CLI 调用中包含描述参数。
-
如果要更新排名,可以在 CLI 调用中加入等级参数。
-
如果要从抑制过滤器更新为常规过滤器,请在 CLI 调用中使用操作参数和值作为 AR CHIVE。
-
更新您现有的过滤器 API,或者使用 Amazon CLI 以下示例,使用您自己的检测器 ID、抑制规则的名称和.json 文件。
-
以下是更新上述所有参数的 CLI 示例。您可以从命令中选择要针对您的用例更新的特定参数-
aws guardduty update-filter \ --detector-id12abc34d567e8fa901bc2d34e56789f0\ --regionus-east-1\ --actionARCHIVE\ --rank1\ --description"Updated description"\ --finding-criteriafile://criteria.json
-