Detection rules › YARA-L
OneLogin Super User Privileges Assigned
Detects when a user is assigned super user privileges.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation | T1078.004 Valid Accounts: Cloud Accounts |
References
Rule body yaral
/*
* Copyright 2024 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 onelogin_super_user_privileges_assigned {
meta:
author = "Google Cloud Security"
description = "Detects when a user is assigned super user privileges."
rule_id = "mr_5a2dc2cc-a66a-413c-83de-99e0ed698849"
rule_name = "OneLogin Super User Privileges Assigned"
reference = "https://onelogin.service-now.com/kb_view_customer.do?sysparm_article=KB0010391"
mitre_attack_tactic = "Privilege Escalation"
mitre_attack_technique = "Valid Accounts: Cloud Accounts"
mitre_attack_url = "https://attack.mitre.org/techniques/T1078/004/"
mitre_attack_version = "v15.1"
type = "Alert"
data_source = "OneLogin"
severity = "High"
priority = "High"
events:
$user.metadata.event_type = "USER_CHANGE_PERMISSIONS"
$user.metadata.product_name = "ONELOGIN_SSO"
$user.metadata.vendor_name = "ONELOGIN"
$user.metadata.product_event_type = "72" //user granted permission to a specific privilege
$user.target.resource.name = "Super user"
outcome:
$risk_score = max(35)
$mitre_attack_tactic = "Privilege Escalation"
$mitre_attack_technique = "Valid Accounts: Cloud Accounts"
$principal_user_userid = array_distinct($user.principal.user.userid)
$principal_user_user_display_name = array_distinct($user.principal.user.user_display_name)
$principal_ip = array_distinct($user.principal.ip)
$principal_ip_country = array_distinct($user.principal.ip_geo_artifact.location.country_or_region)
$principal_ip_state = array_distinct($user.principal.ip_geo_artifact.location.state)
$target_user_userid = array_distinct($user.target.user.userid)
condition:
$user
}
Detection logic
Fires when at least one $user event.
Events
$user
metadata.product_event_type = "72"target.resource.name = "Super user"
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) |
principal_user_userid | array_distinct($user.principal.user.userid) |
principal_user_user_display_name | array_distinct($user.principal.user.user_display_name) |
principal_ip | array_distinct($user.principal.ip) |
principal_ip_country | array_distinct($user.principal.ip_geo_artifact.location.country_or_region) |
principal_ip_state | array_distinct($user.principal.ip_geo_artifact.location.state) |
target_user_userid | array_distinct($user.target.user.userid) |