What’s new: Detect credential leaks using built-in Azure Sentinel notebooks!

Published 06-01-2021 04:08 PM 7,535 Views
Microsoft

Special thanks to @ZhipengZhao , @JulianGonzalez@Lars_Mohr, and Microsoft CredScanCore team for making these notebooks happen.

Thanks to @Tiander Turpijn and Batami Gold for reviewing this blog and for their valuable feedback.

 

In this blog post, I’m going to walk you through three cool and easy-to-use Azure Sentinel notebooks that can scan logs across your entire Azure Sentinel workspace, Azure Blob storage, and Azure Data Explorer environment to detect credential leaks (which can save you from some serious potential cyberattacks!). These are the built-in templates that you can instantly use without writing any line of code!

 

Why is there a need?

According to Verizon's 2020 Data Breach Investigation Report, the use of credentials in cyberattacks has been on a meteoric rise. Over 80% of hacking-related breaches involve the use of stolen or lost credentials.

 

It’s common sense to protect sensitive data such as passwords, API keys, database credentials, etc. by properly storing them. Unfortunately, storing data safely is not an easy task, and human error will continue to happen. This makes credential leaks high risks to many organizations. For that reason, it’s crucial to perform regular log scans to catch potential leaked credentials and take actions before they get in the wrong hands.

 

In the Azure Sentinel context, collected log messages are stored in a Log Analytics workspace. Many organizations also store their data in Azure Blob Storage or Azure Data Explorer, especially for long-term retention purpose. You might have an Azure Storage account Shared Access Signature used in a KQL query or an Azure Active Directory client access token used to authorize an application that has been hard-coded, logged and saved in a storage location. The storage becomes a gold mine for bad actors waiting to readily access, excavate, and exploit your organizations’ assets.

 

To help solve this problem, we’ve recently released three new Azure Sentinel notebooks that can scan across these environments – your Azure Sentinel workspace, Azure Blob Storage, and Azure Data Explorer - to uncover credential leaks in your data!

 

How do the notebooks work?

Each notebook scans logs in each respective environment.

  • The Credential Scan on Azure Log Analytics notebook enables you to pick any Azure Sentinel log table in your Log Analytics workspace and scan all or one specific column in the selected table.
  • The Credential Scan on Azure Data Explorer (ADX) notebook enables you to pick and scan a table in a database from a specific ADX cluster.
  • The Credential Scan on Azure Blob Storage notebook enables you to pick and scan a file in a blob container from your Blob storage account.

If any sensitive credentials are found, the results will be exported into a csv file. This file is saved in the same location as your notebook, where you can access and view the details of the leaked credentials. The file can also be downloaded and shared with relevant members in your team to validate the findings and apply appropriate remediation actions.

 

If no leaked credentials are found, no csv file is generated.

 

What types of credentials can the notebooks detect? The notebooks use regular expression patterns to identify the most common types of credentials, including passwords, Azure SQL connection strings, etc.  

For a full list of credential categories, please click on the following Spoiler section. 

Spoiler
  1. User login credentials
  2. Azure SQL connection string
  3. Azure IoT Shared Access Key
  4. Azure Storage Account Shared Access Signature
  5. Azure Storage Account Shared Access Signature for High-Risk Resources
  6. Azure Active Directory access token
  7. Amazon S3 client secret access key
  8. Azure Service Bus Shared Access Signature
  9. Azure Redis Cache Connection String Password
  10. Azure COSMOS DB Account Access Key
  11. Azure App Service Deployment Password
  12. Azure DevOps Personal Access Token
  13. Azure Function Master-API Key
  14. Azure Shared Access Key
  15. Azure AD Client Access Token
  16. X.509 Certificate Private Key
  17. ASP.NET Machine Key
  18. General Password
  19. Http Authorization Header
  20. Client Secret – API Key
  21. General Symmetric Key
  22. Ansible Vault
  23. Moniker Agent Storage Account Key
  24. Legacy Geneva Resource Access Key
  25. Domain User Password

Let’s look at a notebook example in detail. While these notebooks are simple to use, there are some basic pre-requisites and important instructions for them to work.

 

Pre-requisites

  • Data in at least one of these locations: Azure Sentinel workspace, Azure Blob storage, Azure Data Explorer.
  • An Azure Sentinel workspace to use Azure Sentinel notebooks.
  • An Azure Machine Learning (AML) workspace. Create an Azure Machine Learning workspace. You can set a default AML workspace from Azure Sentinel portal if you have more than one AML workspaces. Make sure to have at least Contributor permissions to the AML workspace to launch and execute the notebooks.
  • At least a Azure Sentinel or Azure Data Explorer or Azure Blob Storage Reader role to query logs on these data locations.

 

Deployment

  1. From the Azure Sentinel portal, navigate to the Threat Management section and open the Notebooks blade.
  2. Go to the Templates tab.
  3. Search for Credential Scan and you should see three notebooks in the result.
  4. Select one notebook. For this example, I’m going to use Credential Scan on Azure Data Explorer.
  5. On the right panel, select Save notebook. You can rename the selected notebook or keep the default name and save it to a default AML workspace. Then select OK.
  6. The notebook is now accessible to your AML workspace. From the same panel, select Launch notebook. Then you are prompted to log into the AML workspace.
  7. In the AML workspace, notice that a Credential Scan on Azure Data Explorer.ipynb file and a config.json file have been automatically generated from step 6 above.
    • The Credential Scan on Azure Data Explorer.ipynb file has the main content of the notebook.
    • The config.json file has configuration information about your Azure Sentinel environment where your notebook was launched from. It contains tenant_id, subscription_id, resource_group, workspace_id, and workspace_name, which are used for Azure Authentication (see step 9 below).
  8. Select a compute instance for your notebook server. If you don’t have a compute instance, create one by following step 5 in Launch a notebook using your Azure ML workspace.
 

create computecreate compute

 

  1. There are three main sections in this specific notebook: Warm-up, Azure Authentication, and Azure Data Explorer Queries. Each notebook cell contains instructions and/or the sample code using Azure SDK for Python and KQL. To avoid common errors, it’s important to not skip these instructions.
    • The Warm-up cells load Python libraries, parameters, and functions that will be used in the notebook.
    • The Azure Authentication section allows the notebook access to your Azure Resource Group where your ADX environment is located.
    • The Azure Data Explorer Queries section enables you to choose an ADX cluster, a database from the cluster, then a table that you want to scan.
  2.  After you finish running the notebook, if you don’t see the results in a newly created csv file, refresh the notebooks file explorer on the left navigation panel. Note that the name of the csv file is different for each notebook, and no csv file is created if no credentials are found.

csv filecsv file

 

11. If you need to download the csv file, select the three dots next to the file name, right click and hit Download option.

12. All scripts and output files are stored in a default storage account of your AML workspace.

  1. Go to the storage account.
  2. Open File Shares -> Users.
  3. Select your user’s folder.

Important notes:

  • It’s crucial to execute the cells sequentially instead of running all cells at once. Each code cell depends on the output of its previous cells.
  • Depending on your data volume, some cell execution may take a few minutes, so please be patient.
  • If you run into an issue, follow these preliminary steps:
    1. Sign off from AML workspace and sign in again.
    2. Restart the kernel.

Restart kernelRestart kernel

3. Rerun the notebook.

4. If that still doesn’t work, send me a direct message and make sure to tag me. Or you can always create a Support ticket and our team will assist you.

 

Check out the video below for a live demo!

 

 

Summary

I hope you find these notebooks useful. Give them a try and let us know what you think!

Got more scenarios where you would like to use a notebook for? We’d love to hear! You can reach us by sending me a direct message, or posting a comment below, or posting your feedback on Azure Sentinel feedback forums.

 

 

 

%3CLINGO-SUB%20id%3D%22lingo-sub-2406042%22%20slang%3D%22en-US%22%3EWhat%E2%80%99s%20new%3A%20Detect%20credential%20leaks%20using%20built-in%20Azure%20Sentinel%20notebooks!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2406042%22%20slang%3D%22en-US%22%3E%3CP%3E%3CFONT%20size%3D%223%22%3ESpecial%20thanks%20to%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F804254%22%20target%3D%22_blank%22%3E%40ZhipengZhao%3C%2FA%3E%26nbsp%3B%2C%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F301871%22%20target%3D%22_blank%22%3E%40JulianGonzalez%3C%2FA%3E%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1050289%22%20target%3D%22_blank%22%3E%40Lars_Mohr%3C%2FA%3E%2C%26nbsp%3Band%20Microsoft%20CredScanCore%20team%20for%20making%20these%20notebooks%20happen.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3EThanks%20to%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F214230%22%20target%3D%22_blank%22%3E%40Tiander%20Turpijn%3C%2FA%3E%26nbsp%3Bfor%20reviewing%20this%20blog%20and%20for%20his%20valuable%20feedback.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3EIn%20this%20blog%20post%2C%20I%E2%80%99m%20going%20to%20walk%20you%20through%20three%20cool%20and%3CEM%3E%20easy-to-use%3C%2FEM%3E%20Azure%20Sentinel%20notebooks%20that%20can%20scan%20logs%20across%20your%20entire%20Azure%20Sentinel%20workspace%2C%20Azure%20Blob%20storage%2C%20and%20Azure%20Data%20Explorer%20environment%20to%20detect%20credential%20leaks%20(which%20can%20save%20you%20from%20some%20serious%20potential%20cyberattacks!).%20These%20are%20the%20built-in%20templates%20that%20you%20can%20instantly%20use%20without%20writing%20any%20line%20of%20code!%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%20color%3D%22%230000FF%22%3E%3CSTRONG%3EWhy%20is%20there%20a%20need%3F%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3EAccording%20to%20%3CA%20href%3D%22https%3A%2F%2Fwww.verizon.com%2Fbusiness%2Fresources%2Freports%2Fdbir%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EVerizon's%202020%20Data%20Breach%20Investigation%20Report%3C%2FA%3E%2C%20the%20use%20of%20credentials%20in%20cyberattacks%20has%20been%20on%20a%20meteoric%20rise.%20Over%2080%25%20of%20hacking-related%20breaches%20involve%20the%20use%20of%20stolen%20or%20lost%20credentials.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3EIt%E2%80%99s%20common%20sense%20to%20protect%20sensitive%20data%20such%20as%20passwords%2C%20API%20keys%2C%20database%20credentials%2C%26nbsp%3Betc.%20by%20properly%20storing%20them.%20Unfortunately%2C%20storing%20data%20safely%20is%20not%20an%20easy%20task%2C%20and%20human%20error%20will%20continue%20to%20happen.%20This%20makes%20credential%20leaks%20high%20risks%20to%20many%20organizations.%20For%20that%20reason%2C%20it%E2%80%99s%20crucial%20to%20perform%20regular%20log%20scans%20to%20catch%20potential%20leaked%20credentials%20and%20take%20actions%20before%20they%20get%20in%20the%20wrong%20hands.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3EIn%20the%20Azure%20Sentinel%20context%2C%20collected%20log%20messages%20are%20stored%20in%20a%20Log%20Analytics%20workspace.%20Many%20organizations%20also%20store%20their%20data%20in%20Azure%20Blob%20Storage%20or%20Azure%20Data%20Explorer%2C%20especially%20for%20long-term%20retention%20purpose.%20%3CEM%3EYou%20might%20have%20an%20Azure%20Storage%20account%20Shared%20Access%20Signature%20used%20in%20a%20KQL%20query%20or%20an%20Azure%20%3C%2FEM%3E%3CEM%3EActive%20Directory%20client%20access%20token%20used%20to%20authorize%20an%20application%20that%20has%20been%20hard-coded%2C%20logged%20and%20saved%20in%20a%20storage%20location%3C%2FEM%3E.%20The%20storage%20becomes%20a%20gold%20mine%20for%20bad%20actors%20waiting%20to%20readily%20access%2C%20excavate%2C%20and%20exploit%20your%20organizations%E2%80%99%20assets.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3ETo%20help%20solve%20this%20problem%2C%20we%E2%80%99ve%20recently%20released%20three%20new%20Azure%20Sentinel%20notebooks%20that%20can%20scan%20across%20these%20environments%20%E2%80%93%20your%20Azure%20Sentinel%20workspace%2C%20Azure%20Blob%20Storage%2C%20and%20Azure%20Data%20Explorer%20-%20to%20uncover%20credential%20leaks%20in%20your%20data!%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%20color%3D%22%230000FF%22%3E%3CSTRONG%3EHow%20do%20the%20notebooks%20work%3F%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3EEach%20notebook%20scans%20logs%20in%20each%20respective%20environment.%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EThe%20%3CSTRONG%3ECredential%20Scan%20on%20Azure%20Log%20Analytics%3C%2FSTRONG%3E%20notebook%20enables%20you%20to%20pick%20any%20Azure%20Sentinel%20log%20table%20in%20your%20Log%20Analytics%20workspace%20and%20scan%20all%20or%20one%20specific%20column%20in%20the%20selected%20table.%3C%2FLI%3E%0A%3CLI%3EThe%20%3CSTRONG%3ECredential%20Scan%20on%20Azure%20Data%20Explorer%20%3C%2FSTRONG%3E(ADX)%20notebook%20enables%20you%20to%20pick%20and%20scan%20a%20table%20in%20a%20database%20from%20a%20specific%20ADX%20cluster.%3C%2FLI%3E%0A%3CLI%3EThe%20%3CSTRONG%3ECredential%20Scan%20on%20Azure%20Blob%20Storage%3C%2FSTRONG%3E%20notebook%20enables%20you%20to%20pick%20and%20scan%20a%20file%20in%20a%20blob%20container%20from%20your%20Blob%20storage%20account.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3EIf%20any%20sensitive%20credentials%20are%20found%2C%20the%20results%20will%20be%20exported%20into%20a%20csv%20file.%20This%20file%20is%20saved%20in%20the%20same%20location%20as%20your%20notebook%2C%20where%20you%20can%20access%20and%20view%20the%20details%20of%20the%20leaked%20credentials.%20The%20file%20can%20also%20be%20downloaded%20and%20shared%20with%20relevant%20members%20in%20your%20team%20to%20validate%20the%20findings%20and%20apply%20appropriate%20remediation%20actions.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3EIf%20no%20leaked%20credentials%20are%20found%2C%20no%20csv%20file%20is%20generated.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3EWhat%20types%20of%20credentials%20can%20the%20notebooks%20detect%3F%20The%20notebooks%20use%20regular%20expression%20patterns%20to%20identify%20the%20most%20common%20types%20of%20credentials%2C%20including%20passwords%2C%20Azure%20SQL%20connection%20strings%2C%20etc.%20%26nbsp%3B%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3EFor%20a%20full%20list%20of%20credential%20categories%2C%20please%20click%20on%20the%20following%20Spoiler%20section.%26nbsp%3B%3C%2FFONT%3E%3C%2FP%3E%0A%3CDIV%20class%3D%22lia-spoiler-container%22%3E%3CA%20class%3D%22lia-spoiler-link%22%20href%3D%22%23%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ESpoiler%3C%2FA%3E%3CNOSCRIPT%3E(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3E%0A%3COL%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EUser%20login%20credentials%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EAzure%20SQL%20connection%20string%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EAzure%20IoT%20Shared%20Access%20Key%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EAzure%20Storage%20Account%20Shared%20Access%20Signature%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EAzure%20Storage%20Account%20Shared%20Access%20Signature%20for%20High-Risk%20Resources%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EAzure%20Active%20Directory%20access%20token%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EAmazon%20S3%20client%20secret%20access%20key%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EAzure%20Service%20Bus%20Shared%20Access%20Signature%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EAzure%20Redis%20Cache%20Connection%20String%20Password%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EAzure%20COSMOS%20DB%20Account%20Access%20Key%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EAzure%20App%20Service%20Deployment%20Password%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EAzure%20DevOps%20Personal%20Access%20Token%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EAzure%20Function%20Master-API%20Key%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EAzure%20Shared%20Access%20Key%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EAzure%20AD%20Client%20Access%20Token%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EX.509%20Certificate%20Private%20Key%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EASP.NET%20Machine%20Key%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EGeneral%20Password%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EHttp%20Authorization%20Header%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EClient%20Secret%20%E2%80%93%20API%20Key%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EGeneral%20Symmetric%20Key%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EAnsible%20Vault%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EMoniker%20Agent%20Storage%20Account%20Key%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3ELegacy%20Geneva%20Resource%20Access%20Key%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EDomain%20User%20Password%3C%2FFONT%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3EUser%20login%20credentials%20Azure%20SQL%20connection%20string%20Azure%20IoT%20Shared%20Access%20Key%20Azure%20Storage%20Account%20Shared%20Access%20Signature%20Azure%20Storage%20Account%20Shared%20Access%20Signature%20for%20High-Risk%20Resources%20Azure%20Active%20Directory%20access%20token%20Amazon%20S3%20client%20secret%20access%20key%20Azure%20Service%20Bus%20Shared%20Access%20Signature%20Azure%20Redis%20Cache%20Connection%20String%20Password%20Azure%20COSMOS%20DB%20Account%20Access%20Key%20Azure%20App%20Service%20Deployment%20Password%20Azure%20DevOps%20Personal%20Access%20Token%20Azure%20Function%20Master-API%20Key%20Azure%20Shared%20Access%20Key%20Azure%20AD%20Client%20Access%20Token%20X.509%20Certificate%20Private%20Key%20ASP.NET%20Machine%20Key%20General%20Password%20Http%20Authorization%20Header%20Client%20Secret%20%E2%80%93%20API%20Key%20General%20Symmetric%20Key%20Ansible%20Vault%20Moniker%20Agent%20Storage%20Account%20Key%20Legacy%20Geneva%20Resource%20Access%20Key%20Domain%20User%20Password%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3ELet%E2%80%99s%20look%20at%20a%20notebook%20example%20in%20detail.%20While%20these%20notebooks%20are%20simple%20to%20use%2C%20there%20are%20some%20basic%20pre-requisites%20and%20important%20instructions%20for%20them%20to%20work.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%224%22%20color%3D%22%230000FF%22%3E%3CSTRONG%3EPre-requisites%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EData%20in%20at%20least%20one%20of%20these%20locations%3A%20Azure%20Sentinel%20workspace%2C%20Azure%20Blob%20storage%2C%20Azure%20Data%20Explorer.%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EAn%20Azure%20Sentinel%20workspace%20to%20use%20Azure%20Sentinel%20notebooks.%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EAn%20%3CSTRONG%3EAzure%20Machine%20Learning%3C%2FSTRONG%3E%20%3CSTRONG%3E(AML)%20workspace%3C%2FSTRONG%3E.%20Create%20an%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fmachine-learning%2Fhow-to-manage-workspace%3Ftabs%3Dazure-portal%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Machine%20Learning%20workspace%3C%2FA%3E.%20You%20can%20set%20a%20default%20AML%20workspace%20from%20Azure%20Sentinel%20portal%20if%20you%20have%20more%20than%20one%20AML%20workspaces.%20Make%20sure%20to%20have%20at%20least%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fmachine-learning%2Fhow-to-assign-roles%23default-roles%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EContributor%20permissions%20to%20the%20AML%20workspace%3C%2FA%3E%20to%20launch%20and%20execute%20the%20notebooks.%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EAt%20least%20a%20%3CSTRONG%3EAzure%20Sentinel%20%3C%2FSTRONG%3Eor%26nbsp%3B%3CSTRONG%3EAzure%20Data%20Explorer%20%3C%2FSTRONG%3Eor%26nbsp%3B%3CSTRONG%3EAzure%20Blob%20Storage%20Reader%20%3C%2FSTRONG%3Erole%20to%20query%20logs%20on%20these%20data%20locations.%3C%2FFONT%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%224%22%20color%3D%22%230000FF%22%3E%3CSTRONG%3EDeployment%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EFrom%20the%20Azure%20Sentinel%20portal%2C%20navigate%20to%20the%20%3CSTRONG%3EThreat%20Management%3C%2FSTRONG%3E%20section%20and%20open%20the%20%3CSTRONG%3ENotebooks%3C%2FSTRONG%3E%20blade.%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EGo%20to%20the%20%3CSTRONG%3ETemplates%3C%2FSTRONG%3E%20tab.%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3ESearch%20for%20%3CSTRONG%3ECredential%20Scan%20%3C%2FSTRONG%3Eand%20you%20should%20see%20three%20notebooks%20in%20the%20result.%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3ESelect%20one%20notebook.%20For%20this%20example%2C%20I%E2%80%99m%20going%20to%20use%20%3CSTRONG%3ECredential%20Scan%20on%20Azure%20Data%20Explorer%3C%2FSTRONG%3E.%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EOn%20the%20right%20panel%2C%20select%20%3CSTRONG%3ESave%20notebook.%20%3C%2FSTRONG%3EYou%20can%20rename%20the%20selected%20notebook%20or%20keep%20the%20default%20name%20and%20save%20it%20to%20a%20default%20AML%20workspace.%20Then%20select%20%3CSTRONG%3EOK.%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EThe%20notebook%20is%20now%20accessible%20to%20your%20AML%20workspace.%20From%20the%20same%20panel%2C%20select%20%3CSTRONG%3ELaunch%20notebook%3C%2FSTRONG%3E.%20Then%20you%20are%20prompted%20to%20log%20into%20the%20AML%20workspace.%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EIn%20the%20AML%20workspace%2C%20notice%20that%20a%20%3CSTRONG%3ECredential%20Scan%20on%20Azure%20Data%20Explorer.ipynb%20%3C%2FSTRONG%3Efile%20and%20a%20%3CSTRONG%3Econfig.json%3C%2FSTRONG%3E%20file%20have%20been%20automatically%20generated%20from%20step%206%20above.%3C%2FFONT%3E%3CUL%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EThe%3CSTRONG%3E%20Credential%20Scan%20on%20Azure%20Data%20Explorer.ipynb%20%3C%2FSTRONG%3Efile%20has%20the%20main%20content%20of%20the%20notebook.%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EThe%3CSTRONG%3E%20config.json%3C%2FSTRONG%3E%20file%20has%20configuration%20information%20about%20your%20Azure%20Sentinel%20environment%20where%20your%20notebook%20was%20launched%20from.%20It%20contains%20%3CSTRONG%3Etenant_id%2C%20subscription_id%2C%20resource_group%2C%20workspace_id%2C%20and%20workspace_name%3C%2FSTRONG%3E%2C%20which%20are%20used%20for%20Azure%20Authentication%20(see%20step%209%20below).%3C%2FFONT%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3ESelect%20a%20compute%20instance%20for%20your%20notebook%20server.%20If%20you%20don%E2%80%99t%20have%20a%20compute%20instance%2C%20create%20one%20by%20following%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsentinel%2Fnotebooks%23launch-a-notebook-using-your-azure-ml-workspace%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Estep%205%20in%20%3CEM%3ELaunch%20a%20notebook%20using%20your%20Azure%20ML%3C%2FEM%3E%20%3CEM%3Eworkspace%3C%2FEM%3E%3C%2FA%3E.%3C%2FFONT%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CDIV%20id%3D%22tinyMceEditorChi_Nguyen_2%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22select%20compute.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F285490i2B2E38F65DD7F677%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22select%20compute.png%22%20alt%3D%22create%20compute%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3Ecreate%20compute%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20start%3D%229%22%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EThere%20are%20three%20main%20sections%20in%20this%20specific%20notebook%3A%20Warm-up%2C%20Azure%20Authentication%2C%20and%20Azure%20Data%20Explorer%20Queries.%20Each%20notebook%20cell%20contains%20instructions%20and%2For%20the%20sample%20code%20using%20Azure%20SDK%20for%20Python%20and%20KQL.%20%3CEM%3ETo%20avoid%20common%20errors%2C%20it%E2%80%99s%20important%20to%20not%20skip%20these%20instructions.%3C%2FEM%3E%3C%2FFONT%3E%3CUL%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EThe%20%3CSTRONG%3EWarm-up%3C%2FSTRONG%3E%20cells%20load%20Python%20libraries%2C%20parameters%2C%20and%20functions%20that%20will%20be%20used%20in%20the%20notebook.%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EThe%20%3CSTRONG%3EAzure%20Authentication%3C%2FSTRONG%3E%20section%20allows%20the%20notebook%20access%20to%20your%20Azure%20Resource%20Group%20where%20your%20ADX%20environment%20is%20located.%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EThe%20%3CSTRONG%3EAzure%20Data%20Explorer%20Queries%3C%2FSTRONG%3E%20section%20enables%20you%20to%20choose%20an%20ADX%20cluster%2C%20a%20database%20from%20the%20cluster%2C%20then%20a%20table%20that%20you%20want%20to%20scan.%3C%2FFONT%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3E%26nbsp%3BAfter%20you%20finish%20running%20the%20notebook%2C%20if%20you%20don%E2%80%99t%20see%20the%20results%20in%20a%20newly%20created%20csv%20file%2C%26nbsp%3Brefresh%20the%20notebooks%20file%20explorer%20on%20the%20left%20navigation%20panel.%20Note%20that%20the%20name%20of%20the%20csv%20file%20is%20different%20for%20each%20notebook%2C%20and%20no%20csv%20file%20is%20created%20if%20no%20credentials%20are%20found.%3C%2FFONT%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22csvfile-adx.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F285452i183CA876C48DACCC%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22csvfile-adx.png%22%20alt%3D%22csv%20file%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3Ecsv%20file%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3E11.%20If%20you%20need%20to%20download%20the%20csv%20file%2C%20select%20the%20three%20dots%20next%20to%20the%20file%20name%2C%20right%20click%20and%20hit%20%3CSTRONG%3EDownload%3C%2FSTRONG%3E%20option.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3E12.%20All%20scripts%20and%20output%20files%20are%20stored%20in%20a%20default%20storage%20account%20of%20your%20AML%20workspace.%3C%2FFONT%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EGo%20to%20the%20storage%20account.%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EOpen%20%3CSTRONG%3EFile%20Shares%20-%26gt%3B%20Users.%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3ESelect%20your%20user%E2%80%99s%20folder.%3C%2FFONT%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CFONT%20size%3D%224%22%20color%3D%22%23FF0000%22%3E%3CSTRONG%3EImportant%20notes%3A%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EIt%E2%80%99s%20crucial%20to%20execute%20the%20cells%20%3CSTRONG%3E%3CEM%3Esequentially%20%3C%2FEM%3E%3C%2FSTRONG%3Einstead%20of%20running%20all%20cells%20at%20once.%20Each%20code%20cell%20depends%20on%20the%20output%20of%20its%20previous%20cells.%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EDepending%20on%20your%20data%20volume%2C%20some%20cell%20execution%20may%20take%20a%20few%20minutes%2C%20so%20please%20be%20patient.%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EIf%20you%20run%20into%20an%20issue%2C%20follow%20these%20preliminary%20steps%3A%3C%2FFONT%3E%3COL%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3ESign%20off%20from%20AML%20workspace%20and%20sign%20in%20again.%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3ERestart%20the%20kernel.%3C%2FFONT%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Restart%20kernel%20for%20Notebooks.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F285455iCC9064F32256D077%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Restart%20kernel%20for%20Notebooks.png%22%20alt%3D%22Restart%20kernel%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ERestart%20kernel%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E%3CFONT%20size%3D%223%22%3E3.%20Rerun%20the%20notebook.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E%3CFONT%20size%3D%223%22%3E4.%20If%20that%20still%20doesn%E2%80%99t%20work%2C%20send%20me%20a%20direct%20message%20and%20make%20sure%20to%20tag%20me.%20Or%20you%20can%20always%20create%20a%20Support%20ticket%20and%20our%20team%20will%20assist%20you.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3ECheck%20out%20the%20video%20below%20for%20a%20live%20demo!%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3C%2FP%3E%3CDIV%20class%3D%22video-embed-center%20video-embed%22%3E%3CIFRAME%20class%3D%22embedly-embed%22%20src%3D%22https%3A%2F%2Fcdn.embedly.com%2Fwidgets%2Fmedia.html%3Fsrc%3Dhttps%253A%252F%252Fwww.youtube.com%252Fembed%252FOWjXee8o04M%26amp%3Bdisplay_name%3DYouTube%26amp%3Burl%3Dhttps%253A%252F%252Fwww.youtube.com%252Fwatch%253Fv%253DOWjXee8o04M%26amp%3Bimage%3Dhttp%253A%252F%252Fi.ytimg.com%252Fvi%252FOWjXee8o04M%252Fhqdefault.jpg%26amp%3Bkey%3Db0d40caa4f094c68be7c29880b16f56e%26amp%3Btype%3Dtext%252Fhtml%26amp%3Bschema%3Dyoutube%22%20width%3D%22400%22%20height%3D%22225%22%20scrolling%3D%22no%22%20title%3D%22YouTube%20embed%22%20frameborder%3D%220%22%20allow%3D%22autoplay%3B%20fullscreen%22%20allowfullscreen%3D%22true%22%3E%3C%2FIFRAME%3E%3C%2FDIV%3E%3CP%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%20color%3D%22%230000FF%22%3E%3CSTRONG%3ESummary%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3EI%20hope%20you%20find%20these%20notebooks%20useful.%20Give%20them%20a%20try%20and%20let%20us%20know%20what%20you%20think!%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3EGot%20more%20scenarios%20where%20you%20would%20like%20to%20use%20a%20notebook%20for%3F%20We%E2%80%99d%20love%20to%20hear!%20You%20can%20reach%20us%20by%20sending%20me%20a%20direct%20message%2C%20or%20posting%20a%20comment%20below%2C%20or%20posting%20your%20feedback%20on%20%3CA%20href%3D%22https%3A%2F%2Ffeedback.azure.com%2Fforums%2F920458-azure-sentinel%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EAzure%20Sentinel%20feedback%20forums%3C%2FA%3E.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2406042%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Sentinel%20Notebooks.PNG%22%20style%3D%22width%3A%20402px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F285496i98E2A1F904AF6B27%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Sentinel%20Notebooks.PNG%22%20alt%3D%22Sentinel%20Notebooks.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EEasily%20scan%20your%20logs%20in%20Azure%20Log%20Analytics%2C%20Azure%20Data%20Explorer%2C%20and%20Azure%20Blob%20Storage%20environments%20to%20uncover%20credential%20leaks!%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2406042%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Sentinel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDetection%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EHunting%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWhat's%20new%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Jun 20 2021 04:11 PM
Updated by: