[metadata]
creation_date = "2020/09/21"
maturity = "production"
updated_date = "2020/12/16"

[rule]
author = ["Elastic"]
description = """
Identifies when a firewall rule is modified in Google Cloud Platform (GCP). Virtual Private Cloud (VPC) firewall rules
can be configured to allow or deny connections to or from virtual machine (VM) instances. An adversary may modify a
firewall rule in order to weaken their target's security controls.
"""
false_positives = [
    """
    Firewall rules may be modified by system administrators. Verify that the firewall configuration change was expected.
    Exceptions can be added to this rule to filter expected behavior.
    """,
]
index = ["filebeat-*", "logs-gcp*"]
language = "kuery"
license = "Elastic License"
name = "GCP Firewall Rule Modification"
note = "The GCP Filebeat module must be enabled to use this rule."
references = ["https://cloud.google.com/vpc/docs/firewalls"]
risk_score = 47
rule_id = "2783d84f-5091-4d7d-9319-9fceda8fa71b"
severity = "medium"
tags = ["Elastic", "Cloud", "GCP", "Continuous Monitoring", "SecOps", "Configuration Audit"]
type = "query"

query = '''
event.dataset:(googlecloud.audit or gcp.audit) and event.action:v*.compute.firewalls.patch
'''


[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1562"
name = "Impair Defenses"
reference = "https://attack.mitre.org/techniques/T1562/"


[rule.threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"

