Cloud-native SIEM for intelligent security analytics for your entire enterprise.
Перейти к файлу
Ofer Shezaf 758f2a8c51
Update ASim_DnsCustom.json
2022-08-08 17:10:52 +03:00
.azure-pipelines Update sampleDataValidator.yaml 2021-12-07 16:52:56 +05:30
.github Update codeql-analysis.yml 2022-06-27 10:33:28 +05:30
.script OneLogin: first_commit_27.06.2022 (#5463) 2022-08-08 10:10:16 +05:30
.vscode Rename product 2021-11-03 10:40:18 +02:00
ASIM Update ASim_DnsCustom.json 2022-08-08 17:10:52 +03:00
BYOML Update README.md 2021-11-24 11:46:19 -08:00
Dashboards Thycotic update logos (#1358) 2020-11-25 13:51:51 -08:00
DataConnectors Merge pull request #5819 from Azure/v-manoj/Package-creation-for-ESET-Enterprise 2022-08-08 13:48:01 +05:30
Detections Update PortScan.yaml 2022-08-04 15:10:20 +03:00
Exploration Queries _Im_Dns Expansions (#4154) 2022-03-08 18:53:37 +02:00
Functions replacing deprecated parsejson with parse_json 2021-08-17 12:26:48 -07:00
Hunting Queries Merge pull request #5453 from Azure/shainw-improveInactive 2022-08-01 13:16:24 -06:00
Logos Merge pull request #5533 from SaadatAbid-snx/slashnext-dev 2022-08-04 09:59:09 +05:30
MasterPlaybooks Removed bugs from Remediation IP azuredeploy.json 2022-06-28 14:02:10 +05:30
Notebooks Replacing Notebooks submodule with README.md with redirection to notebooks repo 2022-03-09 15:04:16 -08:00
Parsers Merge pull request #5851 from Azure/asim/fix-dns-aug2022 2022-08-08 14:57:02 +03:00
Playbooks Playbook bug fixes (#5813) 2022-08-04 13:08:35 +05:30
QueryLanguageSamples Adding current items (#11) 2019-01-18 14:20:01 +00:00
Sample Data OneLogin: first_commit_27.06.2022 (#5463) 2022-08-08 10:10:16 +05:30
Solutions Merge pull request #5846 from Azure/v-ntripathi/CrowdStrikeFalconSolutionPackage2.0.3 2022-08-08 18:25:27 +05:30
Tools Updated duplicate entries in PlaybookMigrated.json (#5854) 2022-08-08 19:06:04 +05:30
Tutorials/Microsoft 365 Defender/Webcasts M365D tutorials and tools (#3186) 2022-01-19 11:29:05 -08:00
Watchlists Merge pull request #4627 from swiftsolves-msft/riskuserwatchlist-nates 2022-08-03 14:40:25 +05:30
Workbooks Microsoft Defender for Office 365 Temp spec--DO NOT MERGE AS 1P (#4970) 2022-08-04 14:47:29 +05:30
docs Update "Password Spray" Alert to template name 2022-07-26 10:53:11 +02:00
.gitignore Updating the Gitignore on request of the SAP solution team. It seems the extension was just part of the default config when the repo was setup 2022-06-10 02:08:53 -07:00
.gitmodules Replacing Notebooks submodule with README.md with redirection to notebooks repo 2022-03-09 15:04:16 -08:00
CODEOWNERS Migrate to Teams as code owners 2022-05-17 16:48:40 -07:00
Excessive login attempts.json Analytics+Playbooks 2021-10-25 18:32:23 -04:00
GettingStarted.md updated formatting 2021-05-04 10:12:08 -04:00
LICENSE Initial commit 2018-08-17 19:25:18 -07:00
README.md Updated Typos in README.md 2022-06-10 10:51:42 -06:00
SECURITY.md Create SECURITY.md 2022-04-07 19:17:34 +05:30
azure-pipelines.yml Sample data and email validation. 2021-08-11 15:07:38 +05:30
deploy.json Create deploy.json 2021-08-24 13:15:45 +03:00
logic_app_logo.png Add files via upload 2020-10-21 16:33:38 +13:00
package-lock.json Merge pull request #4507 from Azure/dependabot/npm_and_yarn/minimist-1.2.6 2022-04-13 16:25:25 +05:30
package.json Bump simple-git from 3.3.0 to 3.5.0 2022-04-12 22:43:45 +00:00
tsconfig.json Reverted tsconfig file 2022-08-03 00:03:07 +05:30

README.md

Microsoft Sentinel and Microsoft 365 Defender

Welcome to the unified Microsoft Sentinel and Microsoft 365 Defender repository! This repository contains out of the box detections, exploration queries, hunting queries, workbooks, playbooks and much more to help you get ramped up with Microsoft Sentinel and provide you security content to secure your environment and hunt for threats. The hunting queries also include Microsoft 365 Defender hunting queries for advanced hunting scenarios in both Microsoft 365 Defender and Microsoft Sentinel. You can also submit to issues for any samples or resources you would like to see here as you onboard to Microsoft Sentinel. This repository welcomes contributions and refer to this repository's wiki to get started. For questions and feedback, please contact AzureSentinel@microsoft.com

Resources

We value your feedback. Here are some channels to help surface your questions or feedback:

  1. General product specific Q&A for SIEM and SOAR - Join in the Microsoft Sentinel Tech Community conversations
  2. General product specific Q&A for XDR - Join in the Microsoft 365 Defender Tech Community conversations
  3. Product specific feature requests - Upvote or post new on Microsoft Sentinel feedback forums
  4. Report product or contribution bugs - File a GitHub Issue using Bug template
  5. General feedback on community and contribution process - File a GitHub Issue using Feature Request template

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

Add in your new or updated contributions to GitHub

Note: If you are a first time contributor to this repository, General GitHub Fork the repo guidance before cloning or Specific steps for the Sentinel repo.

General Steps

Brand new or update to a contribution via these methods:

Pull Request

  • After you push your changes, you will need to submit the Pull Request (PR)
  • Details about the Proposed Changes are required, be sure to include a minimal level of detail so a review can clearly understand the reason for the change and what he change is related to in the code.
  • After submission, check the Pull Request for comments
  • Make changes as suggested and update your branch or explain why no change is needed. Resolve the comment when done.

Pull Request Detection Template Structure Validation Check

As part of the PR checks we run a structure validation to make sure all required parts of the YAML structure are included. For Detections, there is a new section that must be included. See the contribution guidelines for more information. If this section or any other required section is not included, then a validation error will occur similar to the below. The example is specifically if the YAML is missing the entityMappings section:

A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:00.95]     Kqlvalidations.Tests.DetectionTemplateStructureValidationTests.Validate_DetectionTemplates_HaveValidTemplateStructure(detectionsYamlFileName: "ExcessiveBlockedTrafficGeneratedbyUser.yaml") [FAIL]
  X Kqlvalidations.Tests.DetectionTemplateStructureValidationTests.Validate_DetectionTemplates_HaveValidTemplateStructure(detectionsYamlFileName: "ExcessiveBlockedTrafficGeneratedbyUser.yaml") [104ms]
  Error Message:
   Expected object to be <null>, but found System.ComponentModel.DataAnnotations.ValidationException with message "An old mapping for entity 'AccountCustomEntity' does not have a matching new mapping entry."

Pull Request Kql Validation Check

As part of the PR checks we run a syntax validation of the kql queries defined in the template. If this check fails go to Azure Pipeline (by pressing on the errors link on the checks tab in your PR) Azurepipeline In the pipeline you can see which test failed and what is the cause: Pipeline Tests Tab

Example error message:

A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:01.81]     Kqlvalidations.Tests.KqlValidationTests.Validate_DetectionQueries_HaveValidKql(detectionsYamlFileName: "ExcessiveBlockedTrafficGeneratedbyUser.yaml") [FAIL]
  X Kqlvalidations.Tests.KqlValidationTests.Validate_DetectionQueries_HaveValidKql(detectionsYamlFileName: "ExcessiveBlockedTrafficGeneratedbyUser.yaml") [21ms]
  Error Message:
   Template Id:fa0ab69c-7124-4f62-acdd-61017cf6ce89 is not valid Errors:The name 'SymantecEndpointProtection' does not refer to any known table, tabular variable or function., Code: 'KS204', Severity: 'Error', Location: '67..93',The name 'SymantecEndpointProtection' does not refer to any known table, tabular variable or function., Code: 'KS204', Severity: 'Error', Location: '289..315'

If you are using custom logs table (a table which is not defined on all workspaces by default) you should verify your table schema is defined in json file in the folder Azure-Sentinel\.script\tests\KqlvalidationsTests\CustomTables

Example for table tablexyz.json

{
  "Name": "tablexyz",
  "Properties": [
    {
      "Name": "SomeDateTimeColumn",
      "Type": "DateTime"
    },
    {
      "Name": "SomeStringColumn",
      "Type": "String"
    },
    {
      "Name": "SomeDynamicColumn",
      "Type": "Dynamic"
    }
  ]
}

Run Kql Validation Locally

In order to run the kql validation before submitting Pull Request in you local machine:

  • You need to have .Net Core 3.1 SDK installed How to download .Net (Supports all platforms)
  • Open Shell and navigate to Azure-Sentinel\\.script\tests\KqlvalidationsTests\
  • Execute dotnet test

Example of output (in Ubuntu):

Welcome to .NET Core 3.1!
---------------------
SDK Version: 3.1.403

Telemetry
---------
The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry

----------------
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Find out what's new: https://aka.ms/dotnet-whats-new
Learn about the installed HTTPS developer cert: https://aka.ms/aspnet-core-https
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs
Write your first app: https://aka.ms/first-net-core-app
--------------------------------------------------------------------------------------
Test run for /mnt/c/git/Azure-Sentinel/.script/tests/KqlvalidationsTests/bin/Debug/netcoreapp3.1/Kqlvalidations.Tests.dll(.NETCoreApp,Version=v3.1)
Microsoft (R) Test Execution Command Line Tool Version 16.7.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...

A total of 1 test files matched the specified pattern.

Test Run Successful.
Total tests: 171
     Passed: 171
 Total time: 25.7973 Seconds

Detection schema validation tests

Similarly to KQL Validation, there is an automatic validation of the schema of a detection. The schema validation includes the detection's frequency and period, the detection's trigger type and threshold, validity of connectors Ids (valid connectors Ids list), etc. A wrong format or missing attributes will result with an informative check failure, which should guide you through the resolution of the issue, but make sure to look into the format of already approved detection.

Run Detection Schema Validation Locally

In order to run the kql validation before submitting Pull Request in you local machine:

  • You need to have .Net Core 3.1 SDK installed How to download .Net (Supports all platforms)
  • Open Shell and navigate to Azure-Sentinel\\.script\tests\DetectionTemplateSchemaValidation\
  • Execute dotnet test

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

For information on what you can contribute and further details, refer to the "get started" section on the project's wiki.