/security-analytics

Community Security Analytics provides a set of community-driven audit & threat queries for Google Cloud

Primary LanguageRubyApache License 2.0Apache-2.0

Community Security Analytics (CSA)

As organizations go through the Autonomic Security modernization journey, this repository serves as a community-driven list of sample security analytics for auditing cloud usage and for detecting threats to your data & workloads in Google Cloud. These may assist detection engineers, threat hunters and data governance analysts.

Security Monitoring

CSA is a set of foundational security analytics designed to provide organizations with a rich baseline of pre-built queries and rules that they can readily use to start analyzing their Google Cloud logs including Cloud Audit logs, VPC Flow logs, DNS logs, and more using cloud-native or third-party analytics tools. The source code is provided as is, without warranty. See Copyright & License below.

Current release include:

The security use cases below are grouped in 6 categories depending on underlying activity type and log sources:

  1. 🚦 Login & Access Patterns
  2. πŸ”‘ IAM, Keys & Secrets Admin Activity
  3. πŸ—οΈ Cloud Provisoning Activity
  4. ☁️ Cloud Workload Usage
  5. πŸ’§ Data Usage
  6. ⚑ Network Activity

To learn more about the variety of Google Cloud logs, how to enable and natively export these logs to destinations like Chronicle or BigQuery for in-depth analytics, refer to Google Cloud Security and access analytics solution guide.

Caution: CSA is not meant to be a comprehensive set of threat detections, but a collection of community-contributed samples to get you started with detective controls. Use CSA in your threat detection and response capabilities (e.g. Security Command Center, Chronicle, BigQuery, Siemplify, or third-party SIEM) in conjunction with threat prevention capabilities (e.g. Security Command Center, Cloud Armor, BeyondCorp). To learn more about Google’s approach to modern Security Operations, check out the Autonomic Security Operations whitepaper.

Security Analytics Use Cases

# Cloud Security Threat Log Source Audit Detect Respond
1 🚦 Login & Access Patterns
1.01 Login occured from a highly-privileged account Cloud Identity Logs
(Google Workspace Login)
βœ…
1.02 Suspicious login attempts flagged by Google Workspace Cloud Identity Logs
(Google Workspace Login)
βœ…
1.03 Excessive login failures from any user identity Cloud Identity Logs
(Google Workspace Login)
βœ…
1.10 Access attempts violating VPC service controls Audit Logs - Policy βœ… βœ…
1.20 Access attempts violating Identity-Aware Proxy (IAP) access controls HTTP(S) LB Logs βœ… βœ…
2 πŸ”‘ IAM, Keys & Secrets Admin Activity
2.01 Super admin or Admin permissions granted Audit Logs - Admin Activity
(Google Workspace Admin)
βœ… βœ…
2.10 Organization admin permissions granted Audit Logs - Admin Activity βœ… βœ…
2.11 Permissions granted to a user from a non-allowed domain Audit Logs - Admin Activity βœ… βœ…
2.20 Permissions granted over a Service Account Audit Logs - Admin Activity βœ… βœ…
2.21 Permissions granted to impersonate Service Account Audit Logs - Admin Activity βœ… βœ…
2.22 Permissions granted to create or manage Service Account keys Audit Logs - Admin Activity βœ… βœ…
2.30 Service accounts or keys created by non-approved identity Audit Logs - Admin Activity βœ… βœ…
2.40 User access added (or removed) from IAP-protected HTTPS services Audit Logs - Admin Activity βœ… βœ…
3 πŸ—οΈ Cloud Provisioning Activity
3.01 Changes made to logging settings Audit Logs - Admin Activity βœ… βœ…
3.10 Unusual admin activity by user & country in the last 7 days Audit Logs - Admin Activity βœ…
3.11 Unusual number of firewall rules modified in the last 7 days Audit Logs - Admin Activity βœ…
3.12 Firewall rules modified or deleted in the last 24 hrs Audit Logs - Admin Activity βœ… βœ…
3.13 VPN tunnels created or deleted Audit Logs - Admin Activity βœ… βœ…
3.14 DNS zones modified or deleted Audit Logs - Admin Activity βœ… βœ…
3.15 Storage buckets modified or deleted by unfamiliar user identities Audit Logs - Admin Activity βœ… βœ…
3.20 VMs deleted in the last 7 days Audit Logs - Admin Activity βœ…
3.21 SQL databases created, modified or deleted in the last 7 days Audit Logs - Admin Activity βœ…
4 ☁️ Cloud Workload Usage
4.01 Unusually high API usage by any user identity Audit Logs βœ… βœ…
4.10 Autoscaling usage in the past month Audit Logs - Admin Activity βœ…
4.11 Autoscaling usage in the past month broken by day Audit Logs - Admin Activity βœ…
5 πŸ’§ Data Usage
5.01 Which users most frequently accessed data in the past week? Audit Logs - Data Access βœ…
5.02 Which users accessed most amount of data in the past week? Audit Logs - Data Access βœ…
5.03 How much data was accessed by each user per day in the past week? Audit Logs - Data Access βœ…
5.04 Which users accessed data in the "accounts" table in the past month? Audit Logs - Data Access βœ… βœ…
5.05 What tables are most frequently accessed and by whom? Audit Logs - Data Access βœ…
5.06 Top 10 queries against BigQuery in the past week Audit Logs - Data Access βœ…
5.07 Any queries doing very large scans? Audit Logs - Data Access βœ… βœ…
5.08 Any destructive queries or jobs (i.e. update or delete)? Audit Logs βœ… βœ…
5.09 Any exfiltration queries or jobs (i.e. copy or extract)? Audit Logs - Data Access βœ… βœ…
5.20 Most common data (and metadata) access actions in the past month Audit Logs - Data Access βœ… βœ…
5.30 Cloud Storage buckets enumerated by unfamiliar users Audit Logs - Data Access βœ… βœ…
5.31 Cloud Storage objects accessed from a new IP Audit Logs - Data Access βœ… βœ…
6 ⚑ Network Activity
6.01 Hosts reaching out to many other hosts or ports per hour VPC Flow Logs βœ… βœ…
6.10 Connections from a new IP to an in-scope network (GDPR, PCI, etc.) VPC Flow Logs βœ… βœ…
6.11 Connections to a malicious IP VPC Flow Logs βœ… βœ…
6.20 Connections blocked by Cloud Armor HTTP(S) LB Logs βœ… βœ…
6.21 "Log4j 2" vulnerability exploit attempts HTTP(S) LB Logs βœ…
6.22 List remote IP addresses attemting to exploit "Log4j 2" vulnerability HTTP(S) LB Logs βœ…
6.30 Virus or malware detected by Cloud IDS Cloud IDS Logs βœ…
6.31 Traffic sessions correlated to high severity threats detected by Cloud IDS Cloud IDS Logs βœ…
6.40 Top 10 DNS queried domains Cloud DNS Logs βœ… βœ…

Copyright & License

Copyright 2022 Google LLC

Threat detection queries & rules under Threat Detections As Code are licensed under the Apache license, v2.0. Details can be found in LICENSE file.