[New Rule] Google Workspace New OAuth Login from Third-Party Application (#2677)
* adding new rule 'Google Workspace New OAuth Login from Custom Application' * changed name and 'custom' to 'third-party' * Update rules/integrations/google_workspace/defense_evasion_google_workspace_new_oauth_login_from_third_party_application.toml * Update rules/integrations/google_workspace/defense_evasion_google_workspace_new_oauth_login_from_third_party_application.toml * updated non-ecs
This commit is contained in:
@@ -119,6 +119,7 @@
|
||||
"google_workspace.drive.copy_type": "keyword",
|
||||
"google_workspace.drive.file.type": "keyword",
|
||||
"google_workspace.drive.visibility": "keyword",
|
||||
"google_workspace.token.client.id": "keyword"
|
||||
"google_workspace.token.client.id": "keyword",
|
||||
"google_workspace.token.scope.data.scope_name": "keyword"
|
||||
}
|
||||
}
|
||||
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
[metadata]
|
||||
creation_date = "2023/03/30"
|
||||
integration = ["google_workspace"]
|
||||
maturity = "production"
|
||||
min_stack_comments = "Breaking changes for Google Workspace integration. New Terms rule type note available until 8.4"
|
||||
min_stack_version = "8.4.0"
|
||||
updated_date = "2023/03/30"
|
||||
|
||||
[rule]
|
||||
author = ["Elastic"]
|
||||
description = """
|
||||
Detects the first time a third-party application logs in and authenticated with OAuth. OAuth is used to grant permissions to specific resources and services in Google Workspace. Compromised credentials or service accounts could allow an adversary to authenticate to Google Workspace as a valid user and inherit their privileges.
|
||||
"""
|
||||
false_positives = [
|
||||
"""
|
||||
Developers may leverage third-party applications for legitimate purposes in Google Workspace such as for administrative tasks.
|
||||
""",
|
||||
]
|
||||
from = "now-130m"
|
||||
index = ["filebeat-*", "logs-google_workspace*"]
|
||||
interval = "10m"
|
||||
language = "kuery"
|
||||
license = "Elastic License v2"
|
||||
name = "First Time Seen Google Workspace OAuth Login from Third-Party Application"
|
||||
note = """## Setup
|
||||
The Google Workspace Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.
|
||||
### Important Information Regarding Google Workspace Event Lag Times
|
||||
- As per Google's documentation, Google Workspace administrators may observe lag times ranging from minutes up to 3 days between the time of an event's occurrence and the event being visible in the Google Workspace admin/audit logs.
|
||||
- This rule is configured to run every 10 minutes with a lookback time of 130 minutes.
|
||||
- To reduce the risk of false negatives, consider reducing the interval that the Google Workspace (formerly G Suite) Filebeat module polls Google's reporting API for new events.
|
||||
- By default, `var.interval` is set to 2 hours (2h). Consider changing this interval to a lower value, such as 10 minutes (10m).
|
||||
- See the following references for further information:
|
||||
- https://support.google.com/a/answer/7061566
|
||||
- https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-google_workspace.html"""
|
||||
references = [
|
||||
"https://www.elastic.co/security-labs/google-workspace-attack-surface-part-one",
|
||||
"https://developers.google.com/apps-script/guides/bound",
|
||||
"https://developers.google.com/identity/protocols/oauth2",
|
||||
]
|
||||
risk_score = 47
|
||||
rule_id = "21bafdf0-cf17-11ed-bd57-f661ea17fbcc"
|
||||
severity = "medium"
|
||||
tags = ["Elastic", "Cloud", "Google Workspace", "Continuous Monitoring", "SecOps", "Defense Evasion", "Initial Access"]
|
||||
timestamp_override = "event.ingested"
|
||||
type = "new_terms"
|
||||
|
||||
query = '''
|
||||
event.dataset: "google_workspace.token" and event.action: "authorize" and
|
||||
google_workspace.token.scope.data.scope_name: *Login and google_workspace.token.client.id: *apps.googleusercontent.com
|
||||
'''
|
||||
|
||||
|
||||
[[rule.threat]]
|
||||
framework = "MITRE ATT&CK"
|
||||
[[rule.threat.technique]]
|
||||
id = "T1550"
|
||||
name = "Use Alternate Authentication Material"
|
||||
reference = "https://attack.mitre.org/techniques/T1550/"
|
||||
[[rule.threat.technique.subtechnique]]
|
||||
id = "T1550.001"
|
||||
name = "Application Access Token"
|
||||
reference = "https://attack.mitre.org/techniques/T1550/001/"
|
||||
|
||||
|
||||
|
||||
[rule.threat.tactic]
|
||||
id = "TA0005"
|
||||
name = "Defense Evasion"
|
||||
reference = "https://attack.mitre.org/tactics/TA0005/"
|
||||
|
||||
[[rule.threat]]
|
||||
framework = "MITRE ATT&CK"
|
||||
[[rule.threat.technique]]
|
||||
id = "T1078"
|
||||
name = "Valid Accounts"
|
||||
reference = "https://attack.mitre.org/techniques/T1078/"
|
||||
[[rule.threat.technique.subtechnique]]
|
||||
id = "T1078.004"
|
||||
name = "Cloud Accounts"
|
||||
reference = "https://attack.mitre.org/techniques/T1078/004/"
|
||||
|
||||
|
||||
|
||||
[rule.threat.tactic]
|
||||
id = "TA0001"
|
||||
name = "Initial Access"
|
||||
reference = "https://attack.mitre.org/tactics/TA0001/"
|
||||
|
||||
[rule.new_terms]
|
||||
field = "new_terms_fields"
|
||||
value = ["google_workspace.token.client.id"]
|
||||
|
||||
[[rule.new_terms.history_window_start]]
|
||||
field = "history_window_start"
|
||||
value = "now-15d"
|
||||
Reference in New Issue
Block a user