AnalysisType: rule
Filename: gsuite_mobile_device_suspicious_activity.py
RuleID: "GSuite.DeviceSuspiciousActivity"
DisplayName: "GSuite Device Suspicious Activity"
Enabled: true
LogTypes:
- GSuite.ActivityEvent
Tags:
- GSuite
Severity: Low
Description: >
GSuite reported a suspicious activity on a user's device.
Reference: https://support.google.com/a/answer/7562460?hl=en&sjid=864417124752637253-EU
Runbook: >
Validate that the suspicious activity was expected by the user.
SummaryAttributes:
- actor:email
Tests:
- Name: Normal Mobile Event
ExpectedResult: false
Log:
{
"id": { "applicationName": "mobile" },
"actor": { "callerType": "USER", "email": "homer.simpson@example.io" },
"type": "device_updates",
"name": "DEVICE_SYNC_EVENT",
"parameters": { "USER_EMAIL": "homer.simpson@example.io" },
}
- Name: Suspicious Activity
ExpectedResult: true
Log:
{
"id": { "applicationName": "mobile" },
"actor": { "callerType": "USER", "email": "homer.simpson@example.io" },
"type": "device_updates",
"name": "SUSPICIOUS_ACTIVITY_EVENT",
"parameters": { "USER_EMAIL": "homer.simpson@example.io" },
}
# ------ paired body: gsuite_mobile_device_suspicious_activity.py ------
def rule(event):
if event.deep_get("id", "applicationName") != "mobile":
return False
return bool(event.get("name") == "SUSPICIOUS_ACTIVITY_EVENT")
def title(event):
return (
f"User [{event.deep_get('actor', 'email', default='<UNKNOWN_USER>')}]"
f"'s device was compromised"
)