Graph Tables
Query
No standalone KQL detected in this source
View source on GitHubAbout this query
Explanation
This query script is designed to analyze security-related data over two different time frames (7 days and 30 days) and create a graph-based representation of identity attacks and security incidents. Here's a simplified breakdown of what each part of the script does:
Identity Attack Graph (7 days)
-
ia_edge_signsinfrom: Collects sign-in data from two tables (
SigninLogsandAADNonInteractiveUserSignInLogs) for the past 7 days. It summarizes the number of sign-ins, failures, and successes for each user and IP address, along with the first and last time they were seen and their location. -
ia_edge_usesapp: Similar to the above, but focuses on the applications used during sign-ins. It summarizes sign-in attempts, failures, and the last time an app was used by each user.
-
ia_node_app: Extracts a distinct list of applications used in sign-ins.
-
ia_edge_attacked: Analyzes brute force attack data to identify users targeted in the past 7 days, summarizing attack patterns, severity, and whether the user was compromised.
-
ia_node_ipaddress: Combines data from sign-ins and attacks to create a list of IP addresses, summarizing user activity, attack attempts, and geographical information.
-
ia_node_country: Extracts a distinct list of countries from the IP address data.
-
ia_edge_locatedin: Maps IP addresses to their respective countries.
-
ia_node_user: Compiles user information from sign-in data, including the number of sign-ins, failures, distinct IPs used, and user identity details like display name and job title.
Incident Entity Graph (30 days)
-
ie_node_incident: Gathers security incident data from the past 30 days, summarizing details like incident number, title, severity, status, and associated risk scores.
-
ie_node_alert: Collects alert data from the past 30 days, summarizing alert details like name, severity, tactics, and product name.
-
ie_edge_hasalert: Links incidents to their associated alerts.
-
ie_stage_entities: Extracts and categorizes entities involved in alerts, such as users, hosts, and IP addresses.
-
ie_edge_involvesuser: Maps alerts to involved users.
-
ie_edge_involveshost: Maps alerts to involved hosts.
-
ie_edge_involvesip: Maps alerts to involved IP addresses.
-
ie_node_user: Summarizes the number of alerts associated with each user.
-
ie_node_host: Summarizes the number of alerts associated with each host.
-
ie_node_ipaddress: Summarizes the number of alerts associated with each IP address, combining it with identity attack data to determine if the IP is linked to an attacker.
Overall, this script is used to build a comprehensive view of identity attacks and security incidents, helping to identify patterns, compromised users, and potential threats based on sign-in and security alert data.