google_workspace_multiple_files_copied_from_google_drive
Description
Identifies when a user copies multiple files from Google Drive, which may indicate data exfiltration.
Query · yara_l
events:
$ws.metadata.vendor_name = "Google Workspace"
$ws.metadata.product_name = "drive"
(
$ws.metadata.product_event_type = "copy" or
$ws.metadata.product_event_type = "source_copy"
)
$ws.principal.user.userid = $user_id
match:
$user_id over 1h
outcome:
$risk_score = max(75)
$mitre_attack_tactic = "Exfiltration"
$mitre_attack_technique = "Exfiltration Over Web Service"
$mitre_attack_technique_id = "T1567"
$event_count = count_distinct($ws.metadata.id)
$product_event_type = array_distinct($ws.metadata.product_event_type)
$userid = array_distinct($ws.principal.user.userid)
$doc_type = array_distinct($ws.src.resource.attribute.labels["doc_type"])
$owner = array_distinct($ws.target.resource.attribute.labels["owner"])
$doc_name = array_distinct($ws.target.resource.name)
$doc_id = array_distinct($ws.target.resource.product_object_id)
$count_docs = count_distinct($ws.target.resource.product_object_id)
condition:
// Customize the value of $count_docs to set the alerting threshold for your environment
$ws and $count_docs > 10