gcp_multiple_service_apis_disabled
Description
Detect when multiple GCP Service APIs are disabled in a short period of time.
Query · yara_l
events:
$gcp.metadata.event_type = "USER_RESOURCE_UPDATE_CONTENT"
$gcp.metadata.log_type = "GCP_CLOUDAUDIT"
$gcp.metadata.product_event_type = "google.api.serviceusage.v1.ServiceUsage.DisableService"
$gcp.security_result.action = "ALLOW"
$gcp.target.application = "serviceusage.googleapis.com"
$gcp.principal.user.userid = $userid
match:
$userid over 1h
outcome:
$risk_score = max(75)
$mitre_attack_tactic = "Impact"
$mitre_attack_technique = "Service Stop"
$mitre_attack_technique_id = "T1489"
$event_count = count_distinct($gcp.metadata.id)
$network_http_user_agent = array_distinct($gcp.network.http.user_agent)
$principal_ip = array_distinct($gcp.principal.ip)
$principal_ip_country = array_distinct($gcp.principal.ip_geo_artifact.location.country_or_region)
$principal_ip_state = array_distinct($gcp.principal.ip_geo_artifact.location.state)
$principal_user_id = array_distinct($gcp.principal.user.userid)
$principal_user_display_name = array_distinct($gcp.principal.user.user_display_name)
$target_resource_name = array_distinct($gcp.target.resource.name)
$dc_target_resource_name = count_distinct($gcp.target.resource.name)
condition:
$gcp and $dc_target_resource_name > 5