Detection rules › YARA-L
AWS GuardDuty Black Hole Traffic Detected
Amazon GuardDuty detects an Amazon EC2 instance or a container attempting to communicate with a black hole IP address.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Command & Control | T1071 Application Layer Protocol |
Rule body yaral
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
rule aws_guardduty_black_hole_traffic_detected {
meta:
author = "Google Cloud Security"
description = "Amazon GuardDuty detects an Amazon EC2 instance or a container attempting to communicate with a black hole IP address."
rule_id = "mr_8ac55f38-9c11-4f51-89cd-c40e9b6238b3"
rule_name = "AWS GuardDuty Black Hole Traffic Detected"
mitre_attack_tactic = "Command and Control"
mitre_attack_technique = "Application Layer Protocol"
mitre_attack_url = "https://attack.mitre.org/techniques/T1071/"
mitre_attack_version = "v13.1"
type = "Alert"
data_source = "AWS GuardDuty"
platform = "AWS"
severity = "High"
priority = "High"
events:
$guardduty.metadata.vendor_name = "AMAZON"
$guardduty.metadata.product_name = "AWS GuardDuty"
$guardduty.metadata.product_event_type = /BlackholeTraffic/
//Filter out sample findings
$guardduty.security_result.about.labels["Sample"] != "true"
outcome:
$risk_score = max(35)
$mitre_attack_tactic = "Command and Control"
$mitre_attack_technique = "Application Layer Protocol"
$mitre_attack_technique_id = "T1071"
$event_count = count_distinct($guardduty.metadata.id)
$principal_ip = array_distinct($guardduty.principal.ip)
$principal_ip_country = array_distinct($guardduty.principal.ip_geo_artifact.location.country_or_region)
$principal_ip_state = array_distinct($guardduty.principal.ip_geo_artifact.location.state)
$principal_user_display_name = $guardduty.principal.user.user_display_name
$aws_region = $guardduty.target.location.name
$target_resource_name = $guardduty.target.resource.name
$target_resource_product_object_id = $guardduty.target.resource.product_object_id
$security_result_summary = array_distinct($guardduty.security_result.summary)
$security_result_description = array_distinct($guardduty.security_result.description)
$security_result_severity = array_distinct($guardduty.security_result.severity)
$security_result_severity_details = array_distinct($guardduty.security_result.severity_details)
$metadata_product_event_type = array_distinct($guardduty.metadata.product_event_type)
condition:
$guardduty
}
Detection logic
Fires when at least one $guardduty event.
Events
$guardduty
metadata.product_event_type matches "BlackholeTraffic"security_result.about.labels["Sample"] != "true"
Outcome
Fields the detection emits on a match. $risk_score drives alerting; Chronicle surfaces the rest on the detection.
| Field | Expression |
|---|---|
risk_score | max(35) |
event_count | count_distinct($guardduty.metadata.id) |
principal_ip | array_distinct($guardduty.principal.ip) |
principal_ip_country | array_distinct($guardduty.principal.ip_geo_artifact.location.country_or_region) |
principal_ip_state | array_distinct($guardduty.principal.ip_geo_artifact.location.state) |
principal_user_display_name | $guardduty.principal.user.user_display_name |
aws_region | $guardduty.target.location.name |
target_resource_name | $guardduty.target.resource.name |
target_resource_product_object_id | $guardduty.target.resource.product_object_id |
security_result_summary | array_distinct($guardduty.security_result.summary) |
security_result_description | array_distinct($guardduty.security_result.description) |
security_result_severity | array_distinct($guardduty.security_result.severity) |
security_result_severity_details | array_distinct($guardduty.security_result.severity_details) |
metadata_product_event_type | array_distinct($guardduty.metadata.product_event_type) |