Path: blob/master/scenario-notebooks/UserSecurityMetadata/Guided Analysis - User Security Metadata.ipynb
3253 views
Guided Analysis - User Security Metadata (Public Preview)
Notebook Version: 1.0 Python Version: Python 3.6 Required Packages: kqlmagic, validate_email, jsonpickle, azure-cli-core, Azure-Sentinel-Utilities
Platforms Supported:
Azure Notebooks Free Compute
Azure Notebooks DSVM
OS Independent
Data Sources Required:
Log Analytics : UserPeerAnalytics, UserAccessAnalytics
Permissions Required:
Log Analytics Read Permissions: To connect and query the workspace you need to be assigned at least Reader or Microsoft Sentinel Reader role on the workspace.
Directory Basic Read Permissions : If you are a user who is a native member of the tenant, then by default you have permissions to read user, group and serviceprincipal information. If you are a guest user in the tenant, then you need to be assigned Directory Reader role.
Description: This notebook introduces the concept of contextual security metadata that are gathered for AAD users. Here are the security metadata that are available* today
UserAccessAnalytics: The most important step of a security incident is to identify the blast radius of the user under investigation. This enrichment data calculates for a given user, the direct or transitive access/permission to resources. In Public Preview, we calculate the blast radius access graph only limited to RBAC access to subscriptions. For example, if the user under investigation is Jane Smith, Access Graph displays all the Azure subscriptions that she either can access directly, via groups or serviceprincipals.
UserPeerAnalytics: Analysts frequently use the peers of a user under investigation to scope the security incident. This enrichment data, for a given user, provides a ranked list of peers. For example, if the user is Jane Smith, Peer Enrichment calculates all of Jane’s peers based on her mailing list, security groups, etc and provides the top 20 of her peers. Specifically, this information is calculated using Natural Language Processing algorithms using group membership information from Azure Active Directory.
This is a Microsoft Sentinel Public Preview feature. If you are interested in the above analytics data please contact ramk at microsoft com.
Contents:
Setup
Install Packages
The first time this cell runs for a new Azure Notebooks project or local Python environment it will take several minutes to download and install the packages. In subsequent runs it should run quickly and confirm that package dependencies are already installed. Unless you want to upgrade the packages you can feel free to skip execution of the next cell.
Enter Tenant and Workspace Ids
You can configure your TenantId and WorskpaceId in config.json file next to the notebook, see sample here. If config.json file is missing then you will be prompted to enter TenantId and WorkspaceId manually. To find your WorkspaceId go to Log Analytics, and look at the workspace properties to find the ID.