Query Details

Rule : Unusual Cloud Application API Activity Burst

Discovery Cloud App High Velocity Activity

Query

CloudAppEvents
| where Timestamp > ago(24h)
| where isnotempty(AccountId)
| summarize Events=count(), Operations=dcount(ActionType), Objects=dcount(ObjectId), Actions=make_set(ActionType,12), Examples=make_set(ObjectName,8), FirstSeen=min(Timestamp), LastSeen=max(Timestamp) by AccountId, Application, IPAddress, bin(Timestamp,5m)
| where Events >= 80 and Operations >= 4
| order by Events desc

About this query

Explanation

This query is designed to detect unusual activity in cloud applications by identifying accounts or IP addresses that perform a large number of different actions in a short period. Here's a simplified breakdown:

  • Purpose: The query aims to spot potential security threats by looking for bursts of activity that might indicate automated or malicious behavior, such as a script or tool rapidly accessing various parts of a cloud service.

  • How it Works:

    • It examines events from the CloudAppEvents table over the past 24 hours.
    • It groups these events by account, application, and IP address in 5-minute intervals.
    • It flags any group with 80 or more events involving at least 4 different types of actions.
  • Outcome: If such a pattern is detected, it suggests that there might be an automated process or a potential security threat, prompting further investigation.

  • Considerations:

    • The rule is initially set to a medium severity level, meaning it's important but not critical.
    • It includes steps to reduce false positives by excluding known automation tools and services.
    • Analysts are advised to review the types of actions and check for unusual sign-in patterns, like new locations or networks.
  • Usage: This query is a starting point for threat hunting and should be adjusted based on the specific environment and typical activity patterns.