diff --git a/packages/m365_defender/_dev/build/docs/README.md b/packages/m365_defender/_dev/build/docs/README.md index ca035f0df79..1c7d35714d9 100644 --- a/packages/m365_defender/_dev/build/docs/README.md +++ b/packages/m365_defender/_dev/build/docs/README.md @@ -1,24 +1,58 @@ # M365 Defender integration -This integration is for M365 Defender logs, previously known as Threat Protection. +## Overview -## Configuration +The [Microsoft 365 Defender](https://learn.microsoft.com/en-us/microsoft-365/security/defender) integration allows you to monitor Incident Logs. Microsoft 365 Defender is a unified pre and post-breach enterprise defense suite that natively coordinates detection, prevention, investigation, and response across endpoints, identities, email, and applications to provide integrated protection against sophisticated attacks. -To configure access for Elastic Agent to communicate with Microsoft 365 Defender you will have to create a new Azure Application registration, this will again return OAuth tokens with access to the Microsoft 365 Defender API. +Use the Microsoft 365 Defender integration to collect and parse data from the Microsoft Graph Security Beta REST API and Microsoft 365 Defender API. Then visualise that data in Kibana. -The procedure to create an application is found on the below link: +For example, you could use the data from this integration to consolidate and correlate security alerts from multiple sources. Also, by looking into the alert and incident, a user can take an appropriate action in the Microsoft 365 Defender Portal. -[Create a new Azure Application](https://docs.microsoft.com/en-us/microsoft-365/security/mtp/api-create-app-web?view=o365-worldwide#create-an-app) +## Data streams -When giving the application the API permissions described in the documentation (Incident.Read.All) it will only grant access to read Incidents from 365 Defender and nothing else in the Azure Domain. +The Microsoft 365 Defender integration collects logs for two types of events: Incident and Log. -After the application has been created, it should contain 3 values that you need to apply to the module configuration. +**Incident** in Microsoft 365 Defender is a collection of correlated alert instances and associated metadata that reflects the story of an attack in a tenant. It uses the Microsoft Graph Security Beta REST API to collect data. See Example Schema [here](https://learn.microsoft.com/en-us/graph/api/resources/security-incident?view=graph-rest-beta#properties). -These values are: +**Log** incidents API allows you to sort through incidents to create an informed cybersecurity response. It exposes a collection of incidents that were flagged in your network, within the time range you specified in your environmental retention policy. The most recent incidents are displayed at the top of the list. Each incident contains an array of related alerts and their related entities. It uses the Microsoft 365 Defender API to collect data. See Example Schema [here](https://learn.microsoft.com/en-us/microsoft-365/security/defender/api-list-incidents?view=o365-worldwide#schema-mapping). -- Client ID -- Client Secret -- Tenant ID +## Requirements + +You need Elasticsearch for storing and searching your data and Kibana for visualizing and managing it. You can use our hosted Elasticsearch Service on Elastic Cloud, which is recommended, or self-manage the Elastic Stack on your own hardware. + +This module has used **Microsoft Graph Security Beta REST API** and **Microsoft 365 Defender API**. + +## Setup + +### To collect data from Microsoft Graph Security Beta REST API, follow the below steps: + +1. [Register a new Azure Application](https://learn.microsoft.com/en-us/graph/auth-register-app-v2?view=graph-rest-beta). +2. Permission required for accessing Incident API would be **SecurityIncident.Read.All**. See more details [here](https://learn.microsoft.com/en-us/graph/auth-v2-service?view=graph-rest-beta) +3. After the application has been created, it will generate Client ID, Client Secret and Tenant ID values that are required for alert and incident data collection. + +### To collect data from Microsoft 365 Defender REST API, follow the below steps: + +1. [Register a new Azure Application](https://learn.microsoft.com/en-us/microsoft-365/security/defender/api-create-app-web?view=o365-worldwide#create-an-app). +2. Permission required for accessing Log API would be **Incident.Read.All**. +3. After the application has been created, it will generate Client ID, Client Secret and Tenant ID values that are required for log data collection. + +## Logs reference + +### incident + +This is the `incident` dataset. + +#### Example + +{{event "incident"}} + +{{fields "incident"}} + +### log + +This is the `log` dataset. + +#### Example {{event "log"}} diff --git a/packages/m365_defender/_dev/deploy/docker/docker-compose.yml b/packages/m365_defender/_dev/deploy/docker/docker-compose.yml index 625ade1b7fc..921a1f5c2a1 100644 --- a/packages/m365_defender/_dev/deploy/docker/docker-compose.yml +++ b/packages/m365_defender/_dev/deploy/docker/docker-compose.yml @@ -1,7 +1,7 @@ version: '2.3' services: m365-defender-http: - image: docker.elastic.co/observability/stream:v0.6.1 + image: docker.elastic.co/observability/stream:v0.8.0 ports: - 8080 volumes: diff --git a/packages/m365_defender/_dev/deploy/docker/http-mock-config.yml b/packages/m365_defender/_dev/deploy/docker/http-mock-config.yml index aa8e492906d..784ba9aa5b0 100644 --- a/packages/m365_defender/_dev/deploy/docker/http-mock-config.yml +++ b/packages/m365_defender/_dev/deploy/docker/http-mock-config.yml @@ -13,6 +13,18 @@ rules: - "application/json" body: |- {"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6Ilg1ZVhrN","token_type": "Bearer","not_before": 1549647431,"expires_in": 3600} + - path: /beta/security/incidents + methods: [GET] + request_headers: + Authorization: + - "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6Ilg1ZVhrN" + responses: + - status_code: 200 + headers: + Content-Type: + - "application/json" + body: | + {"value":[{"@odata.type":"#microsoft.graph.security.incident","id":"2972395","incidentWebUrl":"https://security.microsoft.com/incidents/2972395?tid=12f988bf-16f1-11af-11ab-1d7cd011db47","redirectIncidentId":null,"tenantId":"b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c","displayName":"Multi-stage incident involving Initial access & Command and control on multiple endpoints reported by multiple sources","createdDateTime":"2021-08-13T08:43:35.5533333Z","lastUpdateDateTime":"2021-09-30T09:35:45.1133333Z","assignedTo":"KaiC@contoso.onmicrosoft.com","classification":"truePositive","determination":"multiStagedAttack","status":"active","severity":"medium","tags":["Demo"],"comments":[{"comment":"Demo incident","createdBy":"DavidS@contoso.onmicrosoft.com","createdTime":"2021-09-30T12:07:37.2756993Z"}],"alerts":[{"@odata.type":"#microsoft.graph.security.alert","id":"da637551227677560813_-961444813","providerAlertId":"da637551227677560813_-961444813","incidentId":"28282","status":"new","severity":"low","classification":"unknown","determination":"unknown","serviceSource":"microsoftDefenderForEndpoint","detectionSource":"antivirus","detectorId":"e0da400f-affd-43ef-b1d5-afc2eb6f2756","tenantId":"b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c","title":"Suspicious execution of hidden file","description":"A hidden file has been launched. This activity could indicate a compromised host. Attackers often hide files associated with malicious tools to evade file system inspection and defenses.","recommendedActions":"Collect artifacts and determine scope\n�\tReview the machine timeline for suspicious activities that may have occurred before and after the time of the alert, and record additional related artifacts (files, IPs/URLs) \n�\tLook for the presence of relevant artifacts on other systems. Identify commonalities and differences between potentially compromised systems.\n�\tSubmit relevant files for deep analysis and review resulting detailed behavioral information.\n�\tSubmit undetected files to the MMPC malware portal\n\nInitiate containment & mitigation \n�\tContact the user to verify intent and initiate local remediation actions as needed.\n�\tUpdate AV signatures and run a full scan. The scan might reveal and remove previously-undetected malware components.\n�\tEnsure that the machine has the latest security updates. In particular, ensure that you have installed the latest software, web browser, and Operating System versions.\n�\tIf credential theft is suspected, reset all relevant users passwords.\n�\tBlock communication with relevant URLs or IPs at the organization�s perimeter.","category":"DefenseEvasion","assignedTo":null,"alertWebUrl":"https://security.microsoft.com/alerts/da637551227677560813_-961444813?tid=b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c","incidentWebUrl":"https://security.microsoft.com/incidents/28282?tid=b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c","actorDisplayName":null,"threatDisplayName":null,"threatFamilyName":null,"mitreTechniques":["T1564.001"],"createdDateTime":"2021-04-27T12:19:27.7211305Z","lastUpdateDateTime":"2021-05-02T14:19:01.3266667Z","resolvedDateTime":null,"firstActivityDateTime":"2021-04-26T07:45:50.116Z","lastActivityDateTime":"2021-05-02T07:56:58.222Z","comments":[],"evidence":[{"@odata.type":"#microsoft.graph.security.deviceEvidence","createdDateTime":"2021-04-27T12:19:27.7211305Z","verdict":"unknown","remediationStatus":"none","remediationStatusDetails":null,"firstSeenDateTime":"2020-09-12T07:28:32.4321753Z","mdeDeviceId":"73e7e2de709dff64ef64b1d0c30e67fab63279db","azureAdDeviceId":null,"deviceDnsName":"tempDns","osPlatform":"Windows10","osBuild":22424,"version":"Other","healthStatus":"active","riskScore":"medium","rbacGroupId":75,"rbacGroupName":"UnassignedGroup","onboardingStatus":"onboarded","defenderAvStatus":"unknown","loggedOnUsers":[],"roles":["compromised"],"tags":["Test Machine"],"vmMetadata":{"vmId":"ca1b0d41-5a3b-4d95-b48b-f220aed11d78","cloudProvider":"azure","resourceId":"/subscriptions/8700d3a3-3bb7-4fbe-a090-488a1ad04161/resourceGroups/WdatpApi-EUS-STG/providers/Microsoft.Compute/virtualMachines/NirLaviTests","subscriptionId":"8700d3a3-3bb7-4fbe-a090-488a1ad04161"}},{"@odata.type":"#microsoft.graph.security.fileEvidence","createdDateTime":"2021-04-27T12:19:27.7211305Z","verdict":"unknown","remediationStatus":"none","remediationStatusDetails":null,"detectionStatus":"detected","mdeDeviceId":"73e7e2de709dff64ef64b1d0c30e67fab63279db","roles":[],"tags":[],"fileDetails":{"sha1":"5f1e8acedc065031aad553b710838eb366cfee9a","sha256":"8963a19fb992ad9a76576c5638fd68292cffb9aaac29eb8285f9abf6196a7dec","fileName":"MsSense.exe","filePath":"C:\\Program Files\\temp","fileSize":6136392,"filePublisher":"Microsoft Corporation","signer":null,"issuer":null}},{"@odata.type":"#microsoft.graph.security.processEvidence","createdDateTime":"2021-04-27T12:19:27.7211305Z","verdict":"unknown","remediationStatus":"none","remediationStatusDetails":null,"processId":4780,"parentProcessId":668,"processCommandLine":"\"MsSense.exe\"","processCreationDateTime":"2021-08-12T12:43:19.0772577Z","parentProcessCreationDateTime":"2021-08-12T07:39:09.0909239Z","detectionStatus":"detected","mdeDeviceId":"73e7e2de709dff64ef64b1d0c30e67fab63279db","roles":[],"tags":[],"imageFile":{"sha1":"5f1e8acedc065031aad553b710838eb366cfee9a","sha256":"8963a19fb992ad9a76576c5638fd68292cffb9aaac29eb8285f9abf6196a7dec","fileName":"MsSense.exe","filePath":"C:\\Program Files\\temp","fileSize":6136392,"filePublisher":"Microsoft Corporation","signer":null,"issuer":null},"parentProcessImageFile":{"sha1":null,"sha256":null,"fileName":"services.exe","filePath":"C:\\Windows\\System32","fileSize":731744,"filePublisher":"Microsoft Corporation","signer":null,"issuer":null},"userAccount":{"accountName":"SYSTEM","domainName":"NT AUTHORITY","userSid":"S-1-5-18","azureAdUserId":null,"userPrincipalName":null}},{"@odata.type":"#microsoft.graph.security.registryKeyEvidence","createdDateTime":"2021-04-27T12:19:27.7211305Z","verdict":"unknown","remediationStatus":"none","remediationStatusDetails":null,"registryKey":"SYSTEM\\CONTROLSET001\\CONTROL\\WMI\\AUTOLOGGER\\SENSEAUDITLOGGER","registryHive":"HKEY_LOCAL_MACHINE","roles":[],"tags":[]}]}]}]} - path: /api/incidents methods: [GET] query_params: diff --git a/packages/m365_defender/changelog.yml b/packages/m365_defender/changelog.yml index 1febff21b7c..914721ed9c1 100644 --- a/packages/m365_defender/changelog.yml +++ b/packages/m365_defender/changelog.yml @@ -1,4 +1,9 @@ # newer versions go on top +- version: "1.4.0" + changes: + - description: Add New Incident Data Stream. + type: enhancement + link: https://github.com/elastic/integrations/pull/4435 - version: "1.3.0" changes: - description: Update package to ECS 8.5.0. diff --git a/packages/m365_defender/data_stream/incident/_dev/test/pipeline/test-common-config.yml b/packages/m365_defender/data_stream/incident/_dev/test/pipeline/test-common-config.yml new file mode 100644 index 00000000000..be41bb0d476 --- /dev/null +++ b/packages/m365_defender/data_stream/incident/_dev/test/pipeline/test-common-config.yml @@ -0,0 +1,4 @@ +fields: + tags: + - preserve_original_event + - preserve_duplicate_custom_fields diff --git a/packages/m365_defender/data_stream/incident/_dev/test/pipeline/test-incident.log b/packages/m365_defender/data_stream/incident/_dev/test/pipeline/test-incident.log new file mode 100644 index 00000000000..ccce7ca555b --- /dev/null +++ b/packages/m365_defender/data_stream/incident/_dev/test/pipeline/test-incident.log @@ -0,0 +1 @@ +{"@odata.type":"#microsoft.graph.security.incident","id":"2972395","incidentWebUrl":"https://security.microsoft.com/incidents/2972395?tid=12f988bf-16f1-11af-11ab-1d7cd011db47","redirectIncidentId":null,"tenantId":"b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c","displayName":"Multi-stage incident involving Initial access & Command and control on multiple endpoints reported by multiple sources","createdDateTime":"2021-08-13T08:43:35.5533333Z","lastUpdateDateTime":"2021-09-30T09:35:45.1133333Z","assignedTo":"KaiC@contoso.onmicrosoft.com","classification":"truePositive","determination":"multiStagedAttack","status":"active","severity":"medium","tags":["Demo"],"comments":[{"comment":"Demo incident","createdBy":"DavidS@contoso.onmicrosoft.com","createdTime":"2021-09-30T12:07:37.2756993Z"}],"alerts":{"@odata.type":"#microsoft.graph.security.alert","id":"da637551227677560813_-961444813","providerAlertId":"da637551227677560813_-961444813","incidentId":"28282","status":"new","severity":"low","classification":"unknown","determination":"unknown","serviceSource":"microsoftDefenderForEndpoint","detectionSource":"antivirus","detectorId":"e0da400f-affd-43ef-b1d5-afc2eb6f2756","tenantId":"b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c","title":"Suspicious execution of hidden file","description":"A hidden file has been launched. This activity could indicate a compromised host. Attackers often hide files associated with malicious tools to evade file system inspection and defenses.","recommendedActions":"Collect artifacts and determine scope\n�\tReview the machine timeline for suspicious activities that may have occurred before and after the time of the alert, and record additional related artifacts (files, IPs/URLs) \n�\tLook for the presence of relevant artifacts on other systems. Identify commonalities and differences between potentially compromised systems.\n�\tSubmit relevant files for deep analysis and review resulting detailed behavioral information.\n�\tSubmit undetected files to the MMPC malware portal\n\nInitiate containment & mitigation \n�\tContact the user to verify intent and initiate local remediation actions as needed.\n�\tUpdate AV signatures and run a full scan. The scan might reveal and remove previously-undetected malware components.\n�\tEnsure that the machine has the latest security updates. In particular, ensure that you have installed the latest software, web browser, and Operating System versions.\n�\tIf credential theft is suspected, reset all relevant users passwords.\n�\tBlock communication with relevant URLs or IPs at the organization�s perimeter.","category":"DefenseEvasion","assignedTo":null,"alertWebUrl":"https://security.microsoft.com/alerts/da637551227677560813_-961444813?tid=b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c","incidentWebUrl":"https://security.microsoft.com/incidents/28282?tid=b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c","actorDisplayName":null,"threatDisplayName":null,"threatFamilyName":null,"mitreTechniques":["T1564.001"],"createdDateTime":"2021-04-27T12:19:27.7211305Z","lastUpdateDateTime":"2021-05-02T14:19:01.3266667Z","resolvedDateTime":null,"firstActivityDateTime":"2021-04-26T07:45:50.116Z","lastActivityDateTime":"2021-05-02T07:56:58.222Z","comments":[],"evidence":[{"@odata.type":"#microsoft.graph.security.deviceEvidence","createdDateTime":"2021-04-27T12:19:27.7211305Z","verdict":"unknown","remediationStatus":"none","remediationStatusDetails":null,"firstSeenDateTime":"2020-09-12T07:28:32.4321753Z","mdeDeviceId":"73e7e2de709dff64ef64b1d0c30e67fab63279db","azureAdDeviceId":null,"deviceDnsName":"tempDns","osPlatform":"Windows10","osBuild":22424,"version":"Other","healthStatus":"active","riskScore":"medium","rbacGroupId":75,"rbacGroupName":"UnassignedGroup","onboardingStatus":"onboarded","defenderAvStatus":"unknown","loggedOnUsers":[],"roles":["compromised"],"tags":["Test Machine"],"vmMetadata":{"vmId":"ca1b0d41-5a3b-4d95-b48b-f220aed11d78","cloudProvider":"azure","resourceId":"/subscriptions/8700d3a3-3bb7-4fbe-a090-488a1ad04161/resourceGroups/WdatpApi-EUS-STG/providers/Microsoft.Compute/virtualMachines/NirLaviTests","subscriptionId":"8700d3a3-3bb7-4fbe-a090-488a1ad04161"}},{"@odata.type":"#microsoft.graph.security.fileEvidence","createdDateTime":"2021-04-27T12:19:27.7211305Z","verdict":"unknown","remediationStatus":"none","remediationStatusDetails":null,"detectionStatus":"detected","mdeDeviceId":"73e7e2de709dff64ef64b1d0c30e67fab63279db","roles":[],"tags":[],"fileDetails":{"sha1":"5f1e8acedc065031aad553b710838eb366cfee9a","sha256":"8963a19fb992ad9a76576c5638fd68292cffb9aaac29eb8285f9abf6196a7dec","fileName":"MsSense.exe","filePath":"C:\\Program Files\\temp","fileSize":6136392,"filePublisher":"Microsoft Corporation","signer":null,"issuer":null}},{"@odata.type":"#microsoft.graph.security.processEvidence","createdDateTime":"2021-04-27T12:19:27.7211305Z","verdict":"unknown","remediationStatus":"none","remediationStatusDetails":null,"processId":4780,"parentProcessId":668,"processCommandLine":"\"MsSense.exe\"","processCreationDateTime":"2021-08-12T12:43:19.0772577Z","parentProcessCreationDateTime":"2021-08-12T07:39:09.0909239Z","detectionStatus":"detected","mdeDeviceId":"73e7e2de709dff64ef64b1d0c30e67fab63279db","roles":[],"tags":[],"imageFile":{"sha1":"5f1e8acedc065031aad553b710838eb366cfee9a","sha256":"8963a19fb992ad9a76576c5638fd68292cffb9aaac29eb8285f9abf6196a7dec","fileName":"MsSense.exe","filePath":"C:\\Program Files\\temp","fileSize":6136392,"filePublisher":"Microsoft Corporation","signer":null,"issuer":null},"parentProcessImageFile":{"sha1":null,"sha256":null,"fileName":"services.exe","filePath":"C:\\Windows\\System32","fileSize":731744,"filePublisher":"Microsoft Corporation","signer":null,"issuer":null},"userAccount":{"accountName":"SYSTEM","domainName":"NT AUTHORITY","userSid":"S-1-5-18","azureAdUserId":null,"userPrincipalName":null}},{"@odata.type":"#microsoft.graph.security.registryKeyEvidence","createdDateTime":"2021-04-27T12:19:27.7211305Z","verdict":"unknown","remediationStatus":"none","remediationStatusDetails":null,"registryKey":"SYSTEM\\CONTROLSET001\\CONTROL\\WMI\\AUTOLOGGER\\SENSEAUDITLOGGER","registryHive":"HKEY_LOCAL_MACHINE","roles":[],"tags":[]}]}} diff --git a/packages/m365_defender/data_stream/incident/_dev/test/pipeline/test-incident.log-expected.json b/packages/m365_defender/data_stream/incident/_dev/test/pipeline/test-incident.log-expected.json new file mode 100644 index 00000000000..d5ddb77f508 --- /dev/null +++ b/packages/m365_defender/data_stream/incident/_dev/test/pipeline/test-incident.log-expected.json @@ -0,0 +1,306 @@ +{ + "expected": [ + { + "@timestamp": "2021-09-30T09:35:45.113Z", + "cloud": { + "account": { + "id": "b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c" + }, + "provider": [ + "azure" + ] + }, + "ecs": { + "version": "8.5.0" + }, + "event": { + "action": [ + "detected" + ], + "created": "2021-08-13T08:43:35.553Z", + "id": "2972395", + "kind": "event", + "original": "{\"@odata.type\":\"#microsoft.graph.security.incident\",\"id\":\"2972395\",\"incidentWebUrl\":\"https://security.microsoft.com/incidents/2972395?tid=12f988bf-16f1-11af-11ab-1d7cd011db47\",\"redirectIncidentId\":null,\"tenantId\":\"b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c\",\"displayName\":\"Multi-stage incident involving Initial access \u0026 Command and control on multiple endpoints reported by multiple sources\",\"createdDateTime\":\"2021-08-13T08:43:35.5533333Z\",\"lastUpdateDateTime\":\"2021-09-30T09:35:45.1133333Z\",\"assignedTo\":\"KaiC@contoso.onmicrosoft.com\",\"classification\":\"truePositive\",\"determination\":\"multiStagedAttack\",\"status\":\"active\",\"severity\":\"medium\",\"tags\":[\"Demo\"],\"comments\":[{\"comment\":\"Demo incident\",\"createdBy\":\"DavidS@contoso.onmicrosoft.com\",\"createdTime\":\"2021-09-30T12:07:37.2756993Z\"}],\"alerts\":{\"@odata.type\":\"#microsoft.graph.security.alert\",\"id\":\"da637551227677560813_-961444813\",\"providerAlertId\":\"da637551227677560813_-961444813\",\"incidentId\":\"28282\",\"status\":\"new\",\"severity\":\"low\",\"classification\":\"unknown\",\"determination\":\"unknown\",\"serviceSource\":\"microsoftDefenderForEndpoint\",\"detectionSource\":\"antivirus\",\"detectorId\":\"e0da400f-affd-43ef-b1d5-afc2eb6f2756\",\"tenantId\":\"b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c\",\"title\":\"Suspicious execution of hidden file\",\"description\":\"A hidden file has been launched. This activity could indicate a compromised host. Attackers often hide files associated with malicious tools to evade file system inspection and defenses.\",\"recommendedActions\":\"Collect artifacts and determine scope\\n�\\tReview the machine timeline for suspicious activities that may have occurred before and after the time of the alert, and record additional related artifacts (files, IPs/URLs) \\n�\\tLook for the presence of relevant artifacts on other systems. Identify commonalities and differences between potentially compromised systems.\\n�\\tSubmit relevant files for deep analysis and review resulting detailed behavioral information.\\n�\\tSubmit undetected files to the MMPC malware portal\\n\\nInitiate containment \u0026 mitigation \\n�\\tContact the user to verify intent and initiate local remediation actions as needed.\\n�\\tUpdate AV signatures and run a full scan. The scan might reveal and remove previously-undetected malware components.\\n�\\tEnsure that the machine has the latest security updates. In particular, ensure that you have installed the latest software, web browser, and Operating System versions.\\n�\\tIf credential theft is suspected, reset all relevant users passwords.\\n�\\tBlock communication with relevant URLs or IPs at the organization�s perimeter.\",\"category\":\"DefenseEvasion\",\"assignedTo\":null,\"alertWebUrl\":\"https://security.microsoft.com/alerts/da637551227677560813_-961444813?tid=b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c\",\"incidentWebUrl\":\"https://security.microsoft.com/incidents/28282?tid=b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c\",\"actorDisplayName\":null,\"threatDisplayName\":null,\"threatFamilyName\":null,\"mitreTechniques\":[\"T1564.001\"],\"createdDateTime\":\"2021-04-27T12:19:27.7211305Z\",\"lastUpdateDateTime\":\"2021-05-02T14:19:01.3266667Z\",\"resolvedDateTime\":null,\"firstActivityDateTime\":\"2021-04-26T07:45:50.116Z\",\"lastActivityDateTime\":\"2021-05-02T07:56:58.222Z\",\"comments\":[],\"evidence\":[{\"@odata.type\":\"#microsoft.graph.security.deviceEvidence\",\"createdDateTime\":\"2021-04-27T12:19:27.7211305Z\",\"verdict\":\"unknown\",\"remediationStatus\":\"none\",\"remediationStatusDetails\":null,\"firstSeenDateTime\":\"2020-09-12T07:28:32.4321753Z\",\"mdeDeviceId\":\"73e7e2de709dff64ef64b1d0c30e67fab63279db\",\"azureAdDeviceId\":null,\"deviceDnsName\":\"tempDns\",\"osPlatform\":\"Windows10\",\"osBuild\":22424,\"version\":\"Other\",\"healthStatus\":\"active\",\"riskScore\":\"medium\",\"rbacGroupId\":75,\"rbacGroupName\":\"UnassignedGroup\",\"onboardingStatus\":\"onboarded\",\"defenderAvStatus\":\"unknown\",\"loggedOnUsers\":[],\"roles\":[\"compromised\"],\"tags\":[\"Test Machine\"],\"vmMetadata\":{\"vmId\":\"ca1b0d41-5a3b-4d95-b48b-f220aed11d78\",\"cloudProvider\":\"azure\",\"resourceId\":\"/subscriptions/8700d3a3-3bb7-4fbe-a090-488a1ad04161/resourceGroups/WdatpApi-EUS-STG/providers/Microsoft.Compute/virtualMachines/NirLaviTests\",\"subscriptionId\":\"8700d3a3-3bb7-4fbe-a090-488a1ad04161\"}},{\"@odata.type\":\"#microsoft.graph.security.fileEvidence\",\"createdDateTime\":\"2021-04-27T12:19:27.7211305Z\",\"verdict\":\"unknown\",\"remediationStatus\":\"none\",\"remediationStatusDetails\":null,\"detectionStatus\":\"detected\",\"mdeDeviceId\":\"73e7e2de709dff64ef64b1d0c30e67fab63279db\",\"roles\":[],\"tags\":[],\"fileDetails\":{\"sha1\":\"5f1e8acedc065031aad553b710838eb366cfee9a\",\"sha256\":\"8963a19fb992ad9a76576c5638fd68292cffb9aaac29eb8285f9abf6196a7dec\",\"fileName\":\"MsSense.exe\",\"filePath\":\"C:\\\\Program Files\\\\temp\",\"fileSize\":6136392,\"filePublisher\":\"Microsoft Corporation\",\"signer\":null,\"issuer\":null}},{\"@odata.type\":\"#microsoft.graph.security.processEvidence\",\"createdDateTime\":\"2021-04-27T12:19:27.7211305Z\",\"verdict\":\"unknown\",\"remediationStatus\":\"none\",\"remediationStatusDetails\":null,\"processId\":4780,\"parentProcessId\":668,\"processCommandLine\":\"\\\"MsSense.exe\\\"\",\"processCreationDateTime\":\"2021-08-12T12:43:19.0772577Z\",\"parentProcessCreationDateTime\":\"2021-08-12T07:39:09.0909239Z\",\"detectionStatus\":\"detected\",\"mdeDeviceId\":\"73e7e2de709dff64ef64b1d0c30e67fab63279db\",\"roles\":[],\"tags\":[],\"imageFile\":{\"sha1\":\"5f1e8acedc065031aad553b710838eb366cfee9a\",\"sha256\":\"8963a19fb992ad9a76576c5638fd68292cffb9aaac29eb8285f9abf6196a7dec\",\"fileName\":\"MsSense.exe\",\"filePath\":\"C:\\\\Program Files\\\\temp\",\"fileSize\":6136392,\"filePublisher\":\"Microsoft Corporation\",\"signer\":null,\"issuer\":null},\"parentProcessImageFile\":{\"sha1\":null,\"sha256\":null,\"fileName\":\"services.exe\",\"filePath\":\"C:\\\\Windows\\\\System32\",\"fileSize\":731744,\"filePublisher\":\"Microsoft Corporation\",\"signer\":null,\"issuer\":null},\"userAccount\":{\"accountName\":\"SYSTEM\",\"domainName\":\"NT AUTHORITY\",\"userSid\":\"S-1-5-18\",\"azureAdUserId\":null,\"userPrincipalName\":null}},{\"@odata.type\":\"#microsoft.graph.security.registryKeyEvidence\",\"createdDateTime\":\"2021-04-27T12:19:27.7211305Z\",\"verdict\":\"unknown\",\"remediationStatus\":\"none\",\"remediationStatusDetails\":null,\"registryKey\":\"SYSTEM\\\\CONTROLSET001\\\\CONTROL\\\\WMI\\\\AUTOLOGGER\\\\SENSEAUDITLOGGER\",\"registryHive\":\"HKEY_LOCAL_MACHINE\",\"roles\":[],\"tags\":[]}]}}", + "provider": "microsoftDefenderForEndpoint", + "severity": 3, + "url": "https://security.microsoft.com/incidents/2972395?tid=12f988bf-16f1-11af-11ab-1d7cd011db47" + }, + "file": { + "hash": { + "sha1": [ + "5f1e8acedc065031aad553b710838eb366cfee9a" + ], + "sha256": [ + "8963a19fb992ad9a76576c5638fd68292cffb9aaac29eb8285f9abf6196a7dec" + ] + }, + "name": [ + "MsSense.exe" + ], + "path": [ + "C:\\Program Files\\temp" + ], + "size": [ + 6136392 + ] + }, + "host": { + "id": [ + "73e7e2de709dff64ef64b1d0c30e67fab63279db" + ], + "os": { + "name": [ + "Windows10" + ], + "version": [ + "Other" + ] + } + }, + "m365_defender": { + "incident": { + "alert": { + "alert_web_url": { + "domain": "security.microsoft.com", + "original": "https://security.microsoft.com/alerts/da637551227677560813_-961444813?tid=b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c", + "path": "/alerts/da637551227677560813_-961444813", + "query": "tid=b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c", + "scheme": "https" + }, + "category": "DefenseEvasion", + "classification": "unknown", + "created_datetime": "2021-04-27T12:19:27.721Z", + "description": "A hidden file has been launched. This activity could indicate a compromised host. Attackers often hide files associated with malicious tools to evade file system inspection and defenses.", + "detection_source": "antivirus", + "detector_id": "e0da400f-affd-43ef-b1d5-afc2eb6f2756", + "determination": "unknown", + "evidence": [ + { + "created_datetime": "2021-04-27T12:19:27.721Z", + "defender_av_status": "unknown", + "device_dns_name": "tempDns", + "first_seen_datetime": "2020-09-12T07:28:32.432Z", + "health_status": "active", + "mde_device_id": "73e7e2de709dff64ef64b1d0c30e67fab63279db", + "odata_type": "#microsoft.graph.security.deviceEvidence", + "onboarding_status": "onboarded", + "os_build": "22424", + "os_platform": "Windows10", + "rbac_group": { + "id": "75", + "name": "UnassignedGroup" + }, + "remediation_status": "none", + "risk_score": "medium", + "roles": [ + "compromised" + ], + "tags": [ + "Test Machine" + ], + "verdict": "unknown", + "version": "Other", + "vm_metadata": { + "cloud_provider": "azure", + "resource_id": "/subscriptions/8700d3a3-3bb7-4fbe-a090-488a1ad04161/resourceGroups/WdatpApi-EUS-STG/providers/Microsoft.Compute/virtualMachines/NirLaviTests", + "subscription_id": "8700d3a3-3bb7-4fbe-a090-488a1ad04161", + "vm_id": "ca1b0d41-5a3b-4d95-b48b-f220aed11d78" + } + }, + { + "created_datetime": "2021-04-27T12:19:27.721Z", + "detection_status": "detected", + "file_details": { + "name": "MsSense.exe", + "path": "C:\\Program Files\\temp", + "publisher": "Microsoft Corporation", + "sha1": "5f1e8acedc065031aad553b710838eb366cfee9a", + "sha256": "8963a19fb992ad9a76576c5638fd68292cffb9aaac29eb8285f9abf6196a7dec", + "size": 6136392 + }, + "mde_device_id": "73e7e2de709dff64ef64b1d0c30e67fab63279db", + "odata_type": "#microsoft.graph.security.fileEvidence", + "remediation_status": "none", + "verdict": "unknown" + }, + { + "created_datetime": "2021-04-27T12:19:27.721Z", + "detection_status": "detected", + "image_file": { + "name": "MsSense.exe", + "path": "C:\\Program Files\\temp", + "publisher": "Microsoft Corporation", + "sha1": "5f1e8acedc065031aad553b710838eb366cfee9a", + "sha256": "8963a19fb992ad9a76576c5638fd68292cffb9aaac29eb8285f9abf6196a7dec", + "size": 6136392 + }, + "mde_device_id": "73e7e2de709dff64ef64b1d0c30e67fab63279db", + "odata_type": "#microsoft.graph.security.processEvidence", + "parent_process": { + "creation_datetime": "2021-08-12T07:39:09.090Z", + "id": 668, + "image_file": { + "name": "services.exe", + "path": "C:\\Windows\\System32", + "publisher": "Microsoft Corporation", + "size": 731744 + } + }, + "process": { + "command_line": "\"MsSense.exe\"", + "creation_datetime": "2021-08-12T12:43:19.077Z", + "id": 4780 + }, + "remediation_status": "none", + "user_account": { + "account_name": "SYSTEM", + "domain_name": "NT AUTHORITY", + "user_sid": "S-1-5-18" + }, + "verdict": "unknown" + }, + { + "created_datetime": "2021-04-27T12:19:27.721Z", + "odata_type": "#microsoft.graph.security.registryKeyEvidence", + "registry_hive": "HKEY_LOCAL_MACHINE", + "registry_key": "SYSTEM\\CONTROLSET001\\CONTROL\\WMI\\AUTOLOGGER\\SENSEAUDITLOGGER", + "remediation_status": "none", + "verdict": "unknown" + } + ], + "first_activity_datetime": "2021-04-26T07:45:50.116Z", + "id": "da637551227677560813_-961444813", + "incident_id": "28282", + "incident_web_url": { + "domain": "security.microsoft.com", + "original": "https://security.microsoft.com/incidents/28282?tid=b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c", + "path": "/incidents/28282", + "query": "tid=b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c", + "scheme": "https" + }, + "last_activity_datetime": "2021-05-02T07:56:58.222Z", + "last_update_datetime": "2021-05-02T14:19:01.326Z", + "mitre_techniques": [ + "T1564.001" + ], + "provider_alert_id": "da637551227677560813_-961444813", + "recommended_actions": "Collect artifacts and determine scope\n�\tReview the machine timeline for suspicious activities that may have occurred before and after the time of the alert, and record additional related artifacts (files, IPs/URLs) \n�\tLook for the presence of relevant artifacts on other systems. Identify commonalities and differences between potentially compromised systems.\n�\tSubmit relevant files for deep analysis and review resulting detailed behavioral information.\n�\tSubmit undetected files to the MMPC malware portal\n\nInitiate containment \u0026 mitigation \n�\tContact the user to verify intent and initiate local remediation actions as needed.\n�\tUpdate AV signatures and run a full scan. The scan might reveal and remove previously-undetected malware components.\n�\tEnsure that the machine has the latest security updates. In particular, ensure that you have installed the latest software, web browser, and Operating System versions.\n�\tIf credential theft is suspected, reset all relevant users passwords.\n�\tBlock communication with relevant URLs or IPs at the organization�s perimeter.", + "service_source": "microsoftDefenderForEndpoint", + "severity": "low", + "status": "new", + "tenant_id": "b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c", + "title": "Suspicious execution of hidden file" + }, + "assigned_to": "KaiC@contoso.onmicrosoft.com", + "classification": "truePositive", + "comments": [ + { + "comment": "Demo incident", + "createdBy": "DavidS@contoso.onmicrosoft.com", + "createdTime": "2021-09-30T12:07:37.2756993Z" + } + ], + "created_datetime": "2021-08-13T08:43:35.553Z", + "determination": "multiStagedAttack", + "display_name": "Multi-stage incident involving Initial access \u0026 Command and control on multiple endpoints reported by multiple sources", + "id": "2972395", + "last_update_datetime": "2021-09-30T09:35:45.113Z", + "odata_type": "#microsoft.graph.security.incident", + "severity": "medium", + "status": "active", + "tags": [ + "Demo" + ], + "tenant_id": "b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c", + "web_url": { + "domain": "security.microsoft.com", + "original": "https://security.microsoft.com/incidents/2972395?tid=12f988bf-16f1-11af-11ab-1d7cd011db47", + "path": "/incidents/2972395", + "query": "tid=12f988bf-16f1-11af-11ab-1d7cd011db47", + "scheme": "https" + } + } + }, + "message": "Multi-stage incident involving Initial access \u0026 Command and control on multiple endpoints reported by multiple sources", + "process": { + "command_line": [ + "\"MsSense.exe\"" + ], + "hash": { + "sha1": [ + "5f1e8acedc065031aad553b710838eb366cfee9a" + ], + "sha256": [ + "8963a19fb992ad9a76576c5638fd68292cffb9aaac29eb8285f9abf6196a7dec" + ] + }, + "parent": { + "pid": [ + 668 + ], + "start": [ + "2021-08-12T07:39:09.090Z" + ] + }, + "pid": [ + 4780 + ], + "start": [ + "2021-08-12T12:43:19.077Z" + ], + "user": { + "name": [ + "SYSTEM" + ] + } + }, + "registry": { + "hive": [ + "HKEY_LOCAL_MACHINE" + ], + "key": [ + "SYSTEM\\CONTROLSET001\\CONTROL\\WMI\\AUTOLOGGER\\SENSEAUDITLOGGER" + ] + }, + "related": { + "hash": [ + "5f1e8acedc065031aad553b710838eb366cfee9a", + "8963a19fb992ad9a76576c5638fd68292cffb9aaac29eb8285f9abf6196a7dec" + ], + "hosts": [ + "tempDns", + "NT AUTHORITY" + ], + "user": [ + "KaiC@contoso.onmicrosoft.com", + "DavidS@contoso.onmicrosoft.com", + "SYSTEM", + "S-1-5-18" + ] + }, + "source": { + "user": { + "name": "KaiC@contoso.onmicrosoft.com" + } + }, + "tags": [ + "preserve_original_event", + "preserve_duplicate_custom_fields" + ], + "threat": { + "tactic": { + "name": [ + "DefenseEvasion" + ] + }, + "technique": { + "subtechnique": { + "id": [ + "T1564.001" + ] + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/m365_defender/data_stream/incident/_dev/test/system/test-default-config.yml b/packages/m365_defender/data_stream/incident/_dev/test/system/test-default-config.yml new file mode 100644 index 00000000000..fe840c5c685 --- /dev/null +++ b/packages/m365_defender/data_stream/incident/_dev/test/system/test-default-config.yml @@ -0,0 +1,12 @@ +input: httpjson +service: m365-defender-http +vars: + login_url: http://{{Hostname}}:{{Port}} + client_id: xxxx + client_secret: xxxx + tenant_id: tenant_id +data_stream: + vars: + request_url: http://{{Hostname}}:{{Port}} + preserve_original_event: true + preserve_duplicate_custom_fields: true diff --git a/packages/m365_defender/data_stream/incident/agent/stream/httpjson.yml.hbs b/packages/m365_defender/data_stream/incident/agent/stream/httpjson.yml.hbs new file mode 100644 index 00000000000..5cbd8a93795 --- /dev/null +++ b/packages/m365_defender/data_stream/incident/agent/stream/httpjson.yml.hbs @@ -0,0 +1,67 @@ +config_version: 2 +interval: {{interval}} +auth.oauth2.client.id: {{client_id}} +auth.oauth2.client.secret: {{client_secret}} +auth.oauth2.token_url: {{login_url}}/{{tenant_id}}/oauth2/v2.0/token +auth.oauth2.scopes: {{request_url}}/.default +request.url: {{request_url}}/beta/security/incidents +{{#if http_client_timeout}} +request.timeout: {{http_client_timeout}} +{{/if}} +{{#if proxy_url}} +request.proxy_url: {{proxy_url}} +{{/if}} +{{#if ssl}} +request.ssl: {{ssl}} +{{/if}} +request.transforms: + - set: + target: url.params.$top + value: {{batch_size}} + - set: + target: url.params.$skip + value: 0 + - set: + target: url.params.$filter + value: 'lastUpdateDateTime ge [[.cursor.last_update_time]]' + default: 'lastUpdateDateTime ge [[formatDate (now (parseDuration "-{{initial_interval}}"))]]' + - set: + target: url.params.$orderby + value: 'lastUpdateDateTime asc' + - set: + target: url.params.$expand + value: 'alerts' +response.pagination: + - set: + target: url.params.$filter + value: '[[.last_response.url.params.Get "$filter"]]' + fail_on_template_error: true + - set: + target: url.params.$skip + value: '[[if (eq (len .last_response.body.value) {{batch_size}})]][[add (toInt (.last_response.url.params.Get "$skip")) {{batch_size}}]][[end]]' + fail_on_template_error: true +response.split: + target: body.value + split: + target: body.alerts + keep_parent: true +cursor: + last_update_time: + value: '[[.last_event.lastUpdateDateTime]]' +tags: +{{#if preserve_original_event}} + - preserve_original_event +{{/if}} +{{#if preserve_duplicate_custom_fields}} + - preserve_duplicate_custom_fields +{{/if}} +{{#each tags as |tag|}} + - {{tag}} +{{/each}} +{{#contains "forwarded" tags}} +publisher_pipeline.disable_host: true +{{/contains}} +{{#if processors}} +processors: +{{processors}} +{{/if}} diff --git a/packages/m365_defender/data_stream/incident/elasticsearch/ingest_pipeline/default.yml b/packages/m365_defender/data_stream/incident/elasticsearch/ingest_pipeline/default.yml new file mode 100644 index 00000000000..fae2cc01ab7 --- /dev/null +++ b/packages/m365_defender/data_stream/incident/elasticsearch/ingest_pipeline/default.yml @@ -0,0 +1,2307 @@ +--- +description: Pipeline for processing Incident logs. +processors: + - set: + field: ecs.version + value: '8.5.0' + - rename: + field: message + target_field: event.original + ignore_missing: true + - json: + field: event.original + target_field: json + - fingerprint: + fields: + - json.id + - json.lastUpdateDateTime + - json.incidentWebUrl + - json.createdDateTime + - json.alerts.id + - json.alerts.lastUpdateDateTime + target_field: _id + ignore_missing: true + - set: + field: event.kind + value: event + - append: + field: event.category + value: malware + if: ctx.json?.determination != null && ['malware','malicioususeractivity'].contains(ctx.json.determination.toLowerCase()) + - append: + field: event.category + value: email + if: ctx.json?.determination != null && ctx.json.determination.toLowerCase() == 'phishing' + - append: + field: event.category + value: threat + if: ctx.json?.determination != null && ctx.json.determination.toLowerCase() == 'apt' + - append: + field: event.type + value: indicator + if: ctx.event?.category != null && (ctx.event.category).contains('threat') + - append: + field: event.type + value: info + if: ctx.event?.category != null && ((ctx.event.category).contains('email') || (ctx.event.category).contains('malware')) + - dot_expander: + field: '@odata.type' + path: json + ignore_failure: true + override: true + - rename: + field: json.@odata.type + target_field: m365_defender.incident.odata_type + ignore_missing: true + - date: + field: json.lastUpdateDateTime + target_field: m365_defender.incident.last_update_datetime + formats: + - ISO8601 + if: ctx.json?.lastUpdateDateTime != null + on_failure: + - remove: + field: json.lastUpdateDateTime + ignore_missing: true + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - set: + field: '@timestamp' + copy_from: m365_defender.incident.last_update_datetime + ignore_failure: true + - rename: + field: json.displayName + target_field: m365_defender.incident.display_name + ignore_missing: true + - set: + field: message + copy_from: m365_defender.incident.display_name + ignore_failure: true + - rename: + field: json.tenantId + target_field: m365_defender.incident.tenant_id + ignore_missing: true + - set: + field: cloud.account.id + copy_from: m365_defender.incident.tenant_id + ignore_failure: true + - date: + field: json.createdDateTime + target_field: m365_defender.incident.created_datetime + formats: + - ISO8601 + if: ctx.json?.createdDateTime != null + on_failure: + - remove: + field: json.createdDateTime + ignore_missing: true + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - set: + field: event.created + copy_from: m365_defender.incident.created_datetime + ignore_failure: true + - rename: + field: json.id + target_field: m365_defender.incident.id + ignore_missing: true + - set: + field: event.id + copy_from: m365_defender.incident.id + ignore_failure: true + - rename: + field: json.alerts.serviceSource + target_field: m365_defender.incident.alert.service_source + ignore_missing: true + - set: + field: event.provider + copy_from: m365_defender.incident.alert.service_source + ignore_failure: true + - lowercase: + field: json.severity + target_field: m365_defender.incident.severity + ignore_failure: true + - set: + field: event.severity + value: 1 + if: ctx.m365_defender?.incident?.severity == 'informational' + - set: + field: event.severity + value: 2 + if: ctx.m365_defender?.incident?.severity == 'low' + - set: + field: event.severity + value: 3 + if: ctx.m365_defender?.incident?.severity == 'medium' + - set: + field: event.severity + value: 4 + if: ctx.m365_defender?.incident?.severity == 'high' + - uri_parts: + field: json.incidentWebUrl + target_field: m365_defender.incident.web_url + if: ctx.json?.incidentWebUrl != null + keep_original: true + on_failure: + - remove: + field: json.incidentWebUrl + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - set: + field: event.url + copy_from: m365_defender.incident.web_url.original + ignore_failure: true + - rename: + field: json.assignedTo + target_field: m365_defender.incident.assigned_to + ignore_missing: true + - set: + field: source.user.name + copy_from: m365_defender.incident.assigned_to + ignore_failure: true + - append: + field: related.user + value: '{{{m365_defender.incident.assigned_to}}}' + allow_duplicates: false + ignore_failure: true + - rename: + field: json.alerts.threatFamilyName + target_field: m365_defender.incident.alert.threat_family_name + ignore_missing: true + - set: + field: threat.group.name + copy_from: m365_defender.incident.alert.threat_family_name + ignore_failure: true + - rename: + field: json.alerts.category + target_field: m365_defender.incident.alert.category + ignore_missing: true + - append: + field: threat.tactic.name + value: '{{{m365_defender.incident.alert.category}}}' + allow_duplicates: false + ignore_failure: true + - rename: + field: json.alerts.mitreTechniques + target_field: m365_defender.incident.alert.mitre_techniques + ignore_missing: true + - set: + field: threat.technique.subtechnique.id + copy_from: m365_defender.incident.alert.mitre_techniques + ignore_failure: true + - rename: + field: json.alerts.actorDisplayName + target_field: m365_defender.incident.alert.actor_display_name + ignore_missing: true + - uri_parts: + field: json.alerts.alertWebUrl + target_field: m365_defender.incident.alert.alert_web_url + if: ctx.json?.alerts?.alertWebUrl != null + keep_original: true + on_failure: + - remove: + field: json.alerts.alertWebUrl + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - rename: + field: json.alerts.assignedTo + target_field: m365_defender.incident.alert.assigned_to + ignore_missing: true + - rename: + field: json.alerts.classification + target_field: m365_defender.incident.alert.classification + ignore_missing: true + - foreach: + field: json.alerts.comments + if: ctx.json?.alerts?.comments instanceof List + ignore_failure: true + processor: + append: + field: related.user + value: '{{{_ingest._value.createdByDisplayName}}}' + allow_duplicates: false + ignore_failure: true + - rename: + field: json.alerts.comments + target_field: m365_defender.incident.alert.comments + ignore_missing: true + - date: + field: json.alerts.createdDateTime + target_field: m365_defender.incident.alert.created_datetime + formats: + - ISO8601 + if: ctx.json?.alerts?.createdDateTime != null + on_failure: + - remove: + field: json.alerts.createdDateTime + ignore_missing: true + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - rename: + field: json.alerts.description + target_field: m365_defender.incident.alert.description + ignore_missing: true + - rename: + field: json.alerts.detectionSource + target_field: m365_defender.incident.alert.detection_source + ignore_missing: true + - rename: + field: json.alerts.detectorId + target_field: m365_defender.incident.alert.detector_id + ignore_missing: true + - rename: + field: json.alerts.determination + target_field: m365_defender.incident.alert.determination + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + date: + field: _ingest._value.createdDateTime + target_field: _ingest._value.created_datetime + formats: + - ISO8601 + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.remediationStatus + target_field: _ingest._value.remediation_status + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.remediationStatusDetails + target_field: _ingest._value.remediation_status_details + ignore_missing: true + - date: + field: json.alerts.firstActivityDateTime + target_field: m365_defender.incident.alert.first_activity_datetime + formats: + - ISO8601 + if: ctx.json?.alerts?.firstActivityDateTime != null + on_failure: + - remove: + field: json.alerts.firstActivityDateTime + ignore_missing: true + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - rename: + field: json.alerts.id + target_field: m365_defender.incident.alert.id + ignore_missing: true + - rename: + field: json.alerts.incidentId + target_field: m365_defender.incident.alert.incident_id + ignore_missing: true + - uri_parts: + field: json.alerts.incidentWebUrl + target_field: m365_defender.incident.alert.incident_web_url + if: ctx.json?.alerts?.incidentWebUrl != null + keep_original: true + on_failure: + - remove: + field: json.alerts.incidentWebUrl + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - date: + field: json.alerts.lastActivityDateTime + target_field: m365_defender.incident.alert.last_activity_datetime + formats: + - ISO8601 + if: ctx.json?.alerts?.lastActivityDateTime != null + on_failure: + - remove: + field: json.alerts.lastActivityDateTime + ignore_missing: true + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - date: + field: json.alerts.lastUpdateDateTime + target_field: m365_defender.incident.alert.last_update_datetime + formats: + - ISO8601 + if: ctx.json?.alerts?.lastUpdateDateTime != null + on_failure: + - remove: + field: json.alerts.lastUpdateDateTime + ignore_missing: true + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - rename: + field: json.alerts.providerAlertId + target_field: m365_defender.incident.alert.provider_alert_id + ignore_missing: true + - rename: + field: json.alerts.recommendedActions + target_field: m365_defender.incident.alert.recommended_actions + ignore_missing: true + - date: + field: json.alerts.resolvedDateTime + target_field: m365_defender.incident.alert.resolved_datetime + formats: + - ISO8601 + if: ctx.json?.alerts?.resolvedDateTime != null + on_failure: + - remove: + field: json.alerts.resolvedDateTime + ignore_missing: true + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - rename: + field: json.alerts.severity + target_field: m365_defender.incident.alert.severity + ignore_missing: true + - rename: + field: json.alerts.status + target_field: m365_defender.incident.alert.status + ignore_missing: true + - rename: + field: json.alerts.tenantId + target_field: m365_defender.incident.alert.tenant_id + ignore_missing: true + - rename: + field: json.alerts.threatDisplayName + target_field: m365_defender.incident.alert.threat_display_name + ignore_missing: true + - rename: + field: json.alerts.title + target_field: m365_defender.incident.alert.title + ignore_missing: true + - rename: + field: json.classification + target_field: m365_defender.incident.classification + ignore_missing: true + - foreach: + field: json.comments + if: ctx.json?.comments instanceof List + ignore_failure: true + processor: + append: + field: related.user + value: '{{{_ingest._value.createdByDisplayName}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.comments + if: ctx.json?.comments instanceof List + ignore_failure: true + processor: + append: + field: related.user + value: '{{{_ingest._value.createdBy}}}' + allow_duplicates: false + ignore_failure: true + - rename: + field: json.comments + target_field: m365_defender.incident.comments + ignore_missing: true + - rename: + field: json.determination + target_field: m365_defender.incident.determination + ignore_missing: true + - rename: + field: json.redirectIncidentId + target_field: m365_defender.incident.redirect_incident_id + ignore_missing: true + - rename: + field: json.status + target_field: m365_defender.incident.status + ignore_missing: true + - rename: + field: json.tags + target_field: m365_defender.incident.tags + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + processor: + dot_expander: + field: '@odata.type' + path: _ingest._value + ignore_failure: true + override: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + processor: + rename: + field: _ingest._value.@odata.type + target_field: _ingest._value.odata_type + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + date: + field: _ingest._value.receivedDateTime + target_field: _ingest._value.received_datetime + formats: + - ISO8601 + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: email.delivery_timestamp + value: '{{{_ingest._value.received_datetime}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.antiSpamDirection + target_field: _ingest._value.antispam_direction + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: email.direction + value: '{{{_ingest._value.antispam_direction}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: email.subject + value: '{{{_ingest._value.subject}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.recipientEmailAddress + target_field: _ingest._value.recipient_email_address + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: related.user + value: '{{{_ingest._value.recipient_email_address}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: email.to.address + value: '{{{_ingest._value.recipient_email_address}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + convert: + field: _ingest._value.attachmentsCount + target_field: _ingest._value.attachments_count + type: long + ignore_missing: true + on_failure: + - remove: + field: _ingest._value.attachmentsCount + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.deliveryAction + target_field: _ingest._value.delivery_action + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.deliveryLocation + target_field: _ingest._value.delivery_location + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.internetMessageId + target_field: _ingest._value.internet_message_id + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.networkMessageId + target_field: _ingest._value.network_message_id + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + processor: + dot_expander: + field: '@odata.type' + path: _ingest._value.p1Sender + ignore_failure: true + override: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + processor: + rename: + field: _ingest._value.p1Sender.@odata.type + target_field: _ingest._value.p1_sender.odata_type + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + processor: + dot_expander: + field: '@odata.type' + path: _ingest._value.p2Sender + ignore_failure: true + override: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + processor: + rename: + field: _ingest._value.p2Sender.@odata.type + target_field: _ingest._value.p2_sender.odata_type + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.p1Sender.displayName + target_field: _ingest._value.p1_sender.display_name + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: related.user + value: '{{{_ingest._value.p1_sender.display_name}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.p1Sender.domainName + target_field: _ingest._value.p1_sender.domain_name + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: related.hosts + value: '{{{_ingest._value.p1_sender.domain_name}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.p1Sender.emailAddress + target_field: _ingest._value.p1_sender.email_address + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: email.from.address + value: '{{{_ingest._value.p1_sender.email_address}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: related.user + value: '{{{_ingest._value.p1_sender.email_address}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.p2Sender.displayName + target_field: _ingest._value.p2_sender.display_name + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: related.user + value: '{{{_ingest._value.p2_sender.display_name}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.p2Sender.domainName + target_field: _ingest._value.p2_sender.domain_name + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: related.hosts + value: '{{{_ingest._value.p2_sender.domain_name}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.p2Sender.emailAddress + target_field: _ingest._value.p2_sender.email_address + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: email.from.address + value: '{{{_ingest._value.p2_sender.email_address}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: related.user + value: '{{{_ingest._value.p2_sender.email_address}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + convert: + field: _ingest._value.senderIp + target_field: _ingest._value.sender_ip + type: ip + ignore_missing: true + on_failure: + - remove: + field: _ingest._value.senderIp + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: related.ip + value: '{{{_ingest._value.sender_ip}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.threatDetectionMethods + target_field: _ingest._value.threat_detection_methods + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + convert: + field: _ingest._value.urlCount + target_field: _ingest._value.url_count + type: long + ignore_missing: true + on_failure: + - remove: + field: _ingest._value.urlCount + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + convert: + field: _ingest._value.instanceId + target_field: _ingest._value.instance_id + type: string + ignore_missing: true + on_failure: + - remove: + field: _ingest._value.instanceId + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: cloud.instance.id + value: '{{{_ingest._value.instance_id}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.instanceName + target_field: _ingest._value.instance_name + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: cloud.instance.name + value: '{{{_ingest._value.instance_name}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + convert: + field: _ingest._value.appId + target_field: _ingest._value.app_id + type: string + ignore_missing: true + on_failure: + - remove: + field: _ingest._value.appId + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.displayName + target_field: _ingest._value.display_name + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + convert: + field: _ingest._value.saasAppId + target_field: _ingest._value.saas_app_id + type: string + ignore_missing: true + on_failure: + - remove: + field: _ingest._value.saasAppId + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.vmMetadata.cloudProvider + target_field: _ingest._value.vm_metadata.cloud_provider + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.mdeDeviceId + target_field: _ingest._value.mde_device_id + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.osPlatform + target_field: _ingest._value.os_platform + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: host.os.name + value: '{{{_ingest._value.os_platform}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: host.os.version + value: '{{{_ingest._value.version}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.azureAdDeviceId + target_field: _ingest._value.azure_ad_device_id + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.defenderAvStatus + target_field: _ingest._value.defender_av_status + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.deviceDnsName + target_field: _ingest._value.device_dns_name + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: related.hosts + value: '{{{_ingest._value.device_dns_name}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + date: + field: _ingest._value.firstSeenDateTime + target_field: _ingest._value.first_seen_datetime + formats: + - ISO8601 + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.healthStatus + target_field: _ingest._value.health_status + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + foreach: + field: _ingest._value.loggedOnUsers + ignore_failure: true + ignore_missing: true + processor: + rename: + field: _ingest._value.accountName + target_field: _ingest._value.account_name + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + foreach: + field: _ingest._value.loggedOnUsers + ignore_failure: true + ignore_missing: true + processor: + append: + field: related.user + value: '{{{_ingest._value.account_name}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + foreach: + field: _ingest._value.loggedOnUsers + ignore_failure: true + ignore_missing: true + processor: + rename: + field: _ingest._value.domainName + target_field: _ingest._value.domain_name + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + foreach: + field: _ingest._value.loggedOnUsers + ignore_failure: true + ignore_missing: true + processor: + append: + field: related.hosts + value: '{{{_ingest._value.domain_name}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + foreach: + field: _ingest._value.loggedOnUsers + ignore_failure: true + ignore_missing: true + processor: + dot_expander: + field: '@odata.type' + path: _ingest._value + ignore_failure: true + override: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + foreach: + field: _ingest._value.loggedOnUsers + ignore_failure: true + ignore_missing: true + processor: + rename: + field: _ingest._value.@odata.type + target_field: _ingest._value.odata_type + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.loggedOnUsers + target_field: _ingest._value.logged_on_users + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.onboardingStatus + target_field: _ingest._value.onboarding_status + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + convert: + field: _ingest._value.osBuild + target_field: _ingest._value.os_build + type: string + ignore_missing: true + on_failure: + - remove: + field: _ingest._value.osBuild + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + convert: + field: _ingest._value.rbacGroupId + target_field: _ingest._value.rbac_group.id + type: string + ignore_missing: true + on_failure: + - remove: + field: _ingest._value.rbacGroupId + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.rbacGroupName + target_field: _ingest._value.rbac_group.name + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.riskScore + target_field: _ingest._value.risk_score + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + processor: + dot_expander: + field: '@odata.type' + path: _ingest._value.vmMetadata + ignore_failure: true + override: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + processor: + rename: + field: _ingest._value.vmMetadata.@odata.type + target_field: _ingest._value.vm_metadata.odata_type + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.vmMetadata.resourceId + target_field: _ingest._value.vm_metadata.resource_id + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.vmMetadata.subscriptionId + target_field: _ingest._value.vm_metadata.subscription_id + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.vmMetadata.vmId + target_field: _ingest._value.vm_metadata.vm_id + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.detectionStatus + target_field: _ingest._value.detection_status + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: event.action + value: '{{{_ingest._value.detection_status}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + processor: + dot_expander: + field: '@odata.type' + path: _ingest._value.fileDetails + ignore_failure: true + override: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + processor: + rename: + field: _ingest._value.fileDetails.@odata.type + target_field: _ingest._value.file_details.odata_type + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.fileDetails.sha1 + target_field: _ingest._value.file_details.sha1 + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: file.hash.sha1 + value: '{{{_ingest._value.file_details.sha1}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: related.hash + value: '{{{_ingest._value.file_details.sha1}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.fileDetails.sha256 + target_field: _ingest._value.file_details.sha256 + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: file.hash.sha256 + value: '{{{_ingest._value.file_details.sha256}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: related.hash + value: '{{{_ingest._value.file_details.sha256}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.fileDetails.fileName + target_field: _ingest._value.file_details.name + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: file.name + value: '{{{_ingest._value.file_details.name}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.fileDetails.filePath + target_field: _ingest._value.file_details.path + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: file.path + value: '{{{_ingest._value.file_details.path}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + convert: + field: _ingest._value.fileDetails.fileSize + target_field: _ingest._value.file_details.size + type: long + ignore_missing: true + on_failure: + - remove: + field: _ingest._value.fileDetails.fileSize + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.fileDetails.filePublisher + target_field: _ingest._value.file_details.publisher + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.fileDetails.issuer + target_field: _ingest._value.file_details.issuer + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.fileDetails.signer + target_field: _ingest._value.file_details.signer + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + convert: + field: _ingest._value.ipAddress + target_field: _ingest._value.ip_address + type: ip + ignore_missing: true + on_failure: + - remove: + field: _ingest._value.ipAddress + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: host.ip + value: '{{{_ingest._value.ip_address}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: related.ip + value: '{{{_ingest._value.ip_address}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + processor: + dot_expander: + field: '@odata.type' + path: _ingest._value.userAccount + ignore_failure: true + override: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + processor: + rename: + field: _ingest._value.userAccount.@odata.type + target_field: _ingest._value.user_account.odata_type + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.userAccount.domainName + target_field: _ingest._value.user_account.domain_name + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: related.hosts + value: '{{{_ingest._value.user_account.domain_name}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.userAccount.azureAdUserId + target_field: _ingest._value.user_account.azure_ad_user_id + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: related.user + value: '{{{_ingest._value.user_account.azure_ad_user_id}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.userAccount.userPrincipalName + target_field: _ingest._value.user_account.user_principal_name + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: related.user + value: '{{{_ingest._value.user_account.user_principal_name}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.primaryAddress + target_field: _ingest._value.primary_address + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.userAccount.accountName + target_field: _ingest._value.user_account.account_name + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: related.user + value: '{{{_ingest._value.user_account.account_name}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.userAccount.userSid + target_field: _ingest._value.user_account.user_sid + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: related.user + value: '{{{_ingest._value.user_account.user_sid}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.clusterBy + target_field: _ingest._value.cluster_by + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.clusterByValue + target_field: _ingest._value.cluster_by_value + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + convert: + field: _ingest._value.emailCount + target_field: _ingest._value.email_count + type: long + ignore_missing: true + on_failure: + - remove: + field: _ingest._value.emailCount + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.networkMessageIds + target_field: _ingest._value.network_message_ids + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.objectId + target_field: _ingest._value.object_id + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.processCommandLine + target_field: _ingest._value.process.command_line + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: process.command_line + value: '{{{_ingest._value.process.command_line}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + processor: + dot_expander: + field: '@odata.type' + path: _ingest._value.imageFile + ignore_failure: true + override: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + processor: + rename: + field: _ingest._value.imageFile.@odata.type + target_field: _ingest._value.image_file.odata_type + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.imageFile.sha1 + target_field: _ingest._value.image_file.sha1 + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: process.hash.sha1 + value: '{{{_ingest._value.image_file.sha1}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: related.hash + value: '{{{_ingest._value.image_file.sha1}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.imageFile.sha256 + target_field: _ingest._value.image_file.sha256 + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: process.hash.sha256 + value: '{{{_ingest._value.image_file.sha256}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: related.hash + value: '{{{_ingest._value.image_file.sha256}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + processor: + dot_expander: + field: '@odata.type' + path: _ingest._value.parentProcessImageFile + ignore_failure: true + override: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + processor: + rename: + field: _ingest._value.parentProcessImageFile.@odata.type + target_field: _ingest._value.parent_process.image_file.odata_type + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.parentProcessImageFile.sha1 + target_field: _ingest._value.parent_process.image_file.sha1 + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: process.parent.hash.sha1 + value: '{{{_ingest._value.parent_process.image_file.sha1}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: related.hash + value: '{{{_ingest._value.parent_process.image_file.sha1}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.parentProcessImageFile.sha256 + target_field: _ingest._value.parent_process.image_file.sha256 + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: process.parent.hash.sha256 + value: '{{{_ingest._value.parent_process.image_file.sha256}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: related.hash + value: '{{{_ingest._value.parent_process.image_file.sha256}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + convert: + field: _ingest._value.parentProcessId + target_field: _ingest._value.parent_process.id + type: long + ignore_missing: true + on_failure: + - remove: + field: _ingest._value.parentProcessId + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + date: + field: _ingest._value.parentProcessCreationDateTime + target_field: _ingest._value.parent_process.creation_datetime + formats: + - ISO8601 + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: process.parent.start + value: '{{{_ingest._value.parent_process.creation_datetime}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + convert: + field: _ingest._value.processId + target_field: _ingest._value.process.id + type: long + ignore_missing: true + on_failure: + - remove: + field: _ingest._value.processId + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + date: + field: _ingest._value.processCreationDateTime + target_field: _ingest._value.process.creation_datetime + formats: + - ISO8601 + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: process.start + value: '{{{_ingest._value.process.creation_datetime}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.imageFile.fileName + target_field: _ingest._value.image_file.name + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.imageFile.filePath + target_field: _ingest._value.image_file.path + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.imageFile.filePublisher + target_field: _ingest._value.image_file.publisher + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + convert: + field: _ingest._value.imageFile.fileSize + target_field: _ingest._value.image_file.size + type: long + ignore_missing: true + on_failure: + - remove: + field: _ingest._value.imageFile.fileSize + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.imageFile.issuer + target_field: _ingest._value.image_file.issuer + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.imageFile.signer + target_field: _ingest._value.image_file.signer + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.parentProcessImageFile.fileName + target_field: _ingest._value.parent_process.image_file.name + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.parentProcessImageFile.filePath + target_field: _ingest._value.parent_process.image_file.path + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.parentProcessImageFile.filePublisher + target_field: _ingest._value.parent_process.image_file.publisher + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + convert: + field: _ingest._value.parentProcessImageFile.fileSize + target_field: _ingest._value.parent_process.image_file.size + type: long + ignore_missing: true + on_failure: + - remove: + field: _ingest._value.parentProcessImageFile.fileSize + - append: + field: error.message + value: '{{{_ingest.on_failure_message}}}' + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.parentProcessImageFile.issuer + target_field: _ingest._value.parent_process.image_file.issuer + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.parentProcessImageFile.signer + target_field: _ingest._value.parent_process.image_file.signer + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.registryHive + target_field: _ingest._value.registry_hive + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: registry.hive + value: '{{{_ingest._value.registry_hive}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.registryKey + target_field: _ingest._value.registry_key + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: registry.key + value: '{{{_ingest._value.registry_key}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.registryValueType + target_field: _ingest._value.registry_value_type + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: registry.data.type + value: '{{{_ingest._value.registry_value_type}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.registryValue + target_field: _ingest._value.registry_value + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: registry.value + value: '{{{_ingest._value.registry_value}}}' + allow_duplicates: false + ignore_failure: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.registryValueName + target_field: _ingest._value.registry_value_name + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + rename: + field: _ingest._value.securityGroupId + target_field: _ingest._value.security_group_id + ignore_missing: true + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + append: + field: group.id + value: '{{{_ingest._value.security_group_id}}}' + allow_duplicates: false + ignore_failure: true + - script: + description: Map ecs fields based on evidence type. + lang: painless + if: ctx.json?.alerts?.evidence instanceof List + source: + def convertToOrderedArray(def list) { + def result = new ArrayList(); + for (element in list) { + result.add(element); + } + Collections.sort(result); + return result; + } + if (!(ctx.cloud instanceof HashMap)) { + ctx.cloud = new HashMap(); + } + def cloudProvider = new HashSet(); + if (!(ctx.group instanceof HashMap)) { + ctx.group = new HashMap(); + } + def groupName = new HashSet(); + if (!(ctx.host instanceof HashMap)) { + ctx.host = new HashMap(); + } + def hostId = new HashSet(); + if (!(ctx.user instanceof HashMap)) { + ctx.user = new HashMap(); + } + def userDomain = new HashSet(); + def userId = new HashSet(); + def userName = new HashSet(); + def userEmail = new HashSet(); + if (!(ctx.process instanceof HashMap)) { + ctx.process = new HashMap(); + } + ctx.process.user = new HashMap(); + def processUserId = new HashSet(); + def processUserName = new HashSet(); + for (evidence in ctx.json.alerts.evidence) { + if (evidence?.odata_type != null) { + if (evidence.odata_type == '#microsoft.graph.security.securityGroupEvidence') { + if (evidence?.display_name != null) { + groupName.add(evidence.display_name); + } + } + if (evidence.odata_type == '#microsoft.graph.security.deviceEvidence') { + if (evidence?.mde_device_id != null) { + hostId.add(evidence.mde_device_id); + } + } + if (['#microsoft.graph.security.mailboxEvidence', '#microsoft.graph.security.userEvidence'].contains(evidence.odata_type)) { + if (evidence?.user_account?.domain_name != null) { + userDomain.add(evidence.user_account.domain_name); + } + if (evidence?.user_account?.azure_ad_user_id != null) { + userId.add(evidence.user_account.azure_ad_user_id); + } + if (evidence?.user_account?.user_principal_name != null) { + userEmail.add(evidence.user_account.user_principal_name); + } + if (evidence?.user_account?.account_name != null) { + userName.add(evidence.user_account.account_name); + } + } + if (evidence.odata_type == '#microsoft.graph.security.processEvidence') { + if (evidence?.user_account?.azure_ad_user_id != null) { + processUserId.add(evidence.user_account.azure_ad_user_id); + } + if (evidence?.user_account?.account_name != null) { + processUserName.add(evidence.user_account.account_name); + } + } + } + if (evidence?.vm_metadata?.cloud_provider != null && evidence.vm_metadata.cloud_provider.toLowerCase() == 'azure') { + cloudProvider.add('azure'); + } + } + if (!cloudProvider.isEmpty()) { + ctx.cloud.provider = convertToOrderedArray(cloudProvider); + } + if (!groupName.isEmpty()) { + ctx.group.name = convertToOrderedArray(groupName); + } + if (!hostId.isEmpty()) { + ctx.host.id = convertToOrderedArray(hostId); + } + if (!userDomain.isEmpty()) { + ctx.user.domain = convertToOrderedArray(userDomain); + } + if (!userId.isEmpty()) { + ctx.user.id = convertToOrderedArray(userId); + } + if (!userName.isEmpty()) { + ctx.user.name = convertToOrderedArray(userName); + } + if (!userEmail.isEmpty()) { + ctx.user.email = convertToOrderedArray(userEmail); + } + if (!processUserId.isEmpty()) { + ctx.process.user.id = convertToOrderedArray(processUserId); + } + if (!processUserName.isEmpty()) { + ctx.process.user.name = convertToOrderedArray(processUserName); + } + - script: + description: Set file.size, process.id, process.parent.id fields. + lang: painless + if: ctx.json?.alerts?.evidence instanceof List + source: + def convertToOrderedArray(def list) { + def result = new ArrayList(); + for (element in list) { + result.add(element); + } + Collections.sort(result); + return result; + } + if (!(ctx.file instanceof HashMap)) { + ctx.file = new HashMap(); + } + if (!(ctx.process instanceof HashMap)) { + ctx.process = new HashMap(); + } + if (!(ctx.process.parent instanceof HashMap)) { + ctx.process.parent = new HashMap(); + } + def fileSize = new HashSet(); + def processPid = new HashSet(); + def processParentPid = new HashSet(); + for (evidence in ctx.json.alerts.evidence) { + if (evidence?.odata_type != null) { + if (evidence.odata_type == '#microsoft.graph.security.fileEvidence') { + if (evidence?.file_details?.size != null) { + fileSize.add(evidence.file_details.size); + } + } else if (evidence.odata_type == '#microsoft.graph.security.processEvidence') { + if (evidence?.process?.id != null) { + processPid.add(evidence.process.id); + } + if (evidence?.parent_process?.id != null) { + processParentPid.add(evidence.parent_process.id); + } + } + } + } + if (!fileSize.isEmpty()) { + ctx.file.size = convertToOrderedArray(fileSize); + } + if (!processPid.isEmpty()) { + ctx.process.pid = convertToOrderedArray(processPid); + } + if (!processParentPid.isEmpty()) { + ctx.process.parent.pid = convertToOrderedArray(processParentPid); + } + - foreach: + field: json.alerts.evidence + if: ctx.json?.alerts?.evidence instanceof List + ignore_failure: true + processor: + remove: + field: + - _ingest._value.createdDateTime + - _ingest._value.receivedDateTime + - _ingest._value.attachmentsCount + - _ingest._value.firstSeenDateTime + - _ingest._value.parentProcessCreationDateTime + - _ingest._value.processCreationDateTime + - _ingest._value.senderIp + - _ingest._value.urlCount + - _ingest._value.instanceId + - _ingest._value.appId + - _ingest._value.saasAppId + - _ingest._value.osBuild + - _ingest._value.rbacGroupId + - _ingest._value.fileDetails.fileSize + - _ingest._value.ipAddress + - _ingest._value.emailCount + - _ingest._value.parentProcessId + - _ingest._value.processId + - _ingest._value.imageFile.fileSize + - _ingest._value.parentProcessImageFile.fileSize + ignore_missing: true + - rename: + field: json.alerts.evidence + target_field: m365_defender.incident.alert.evidence + ignore_missing: true + - remove: + field: json + ignore_missing: true + - remove: + if: ctx.tags == null || !(ctx.tags.contains('preserve_duplicate_custom_fields')) + field: + - m365_defender.incident.last_update_datetime + - m365_defender.incident.tenant_id + - m365_defender.incident.created_datetime + - m365_defender.incident.id + - m365_defender.incident.alert.service_source + - m365_defender.incident.web_url + - m365_defender.incident.assigned_to + - m365_defender.incident.alert.threat_family_name + - m365_defender.incident.alert.category + - m365_defender.incident.alert.mitre_techniques + ignore_missing: true + - foreach: + field: m365_defender.incident.alert.evidence + if: ctx.m365_defender?.incident?.alert?.evidence instanceof List && (ctx.tags == null || !(ctx.tags.contains('preserve_duplicate_custom_fields'))) + ignore_failure: true + processor: + remove: + field: + - _ingest._value.ip_address + - _ingest._value.detection_status + - _ingest._value.received_datetime + - _ingest._value.antispam_direction + - _ingest._value.subject + - _ingest._value.recipient_email_address + - _ingest._value.instance_id + - _ingest._value.instance_name + - _ingest._value.vm_metadata.cloud_provider + - _ingest._value.os_platform + - _ingest._value.version + - _ingest._value.file_details.sha1 + - _ingest._value.file_details.sha256 + - _ingest._value.file_details.name + - _ingest._value.file_details.path + - _ingest._value.file_details.size + - _ingest._value.process.command_line + - _ingest._value.image_file.sha1 + - _ingest._value.image_file.sha256 + - _ingest._value.parent_process.image_file.sha1 + - _ingest._value.parent_process.image_file.sha256 + - _ingest._value.parent_process.id + - _ingest._value.parent_process.creation_datetime + - _ingest._value.process.id + - _ingest._value.process.creation_datetime + - _ingest._value.registry_value_type + - _ingest._value.registry_hive + - _ingest._value.registry_key + - _ingest._value.registry_value + - _ingest._value.security_group_id + ignore_missing: true + - remove: + field: event.original + if: ctx.tags == null || !(ctx.tags.contains('preserve_original_event')) + ignore_missing: true + - script: + description: Drops null/empty values recursively. + lang: painless + source: + boolean dropEmptyFields(Object object) { + if (object == null || object == "") { + return true; + } else if (object instanceof Map) { + ((Map) object).values().removeIf(value -> dropEmptyFields(value)); + return (((Map) object).size() == 0); + } else if (object instanceof List) { + ((List) object).removeIf(value -> dropEmptyFields(value)); + return (((List) object).length == 0); + } + return false; + } + dropEmptyFields(ctx); +on_failure: + - append: + field: error.message + value: '{{{ _ingest.on_failure_message }}}' diff --git a/packages/m365_defender/data_stream/incident/fields/agent.yml b/packages/m365_defender/data_stream/incident/fields/agent.yml new file mode 100644 index 00000000000..6e1bac042bc --- /dev/null +++ b/packages/m365_defender/data_stream/incident/fields/agent.yml @@ -0,0 +1,186 @@ +- name: cloud + title: Cloud + group: 2 + description: Fields related to the cloud or infrastructure the events are coming from. + footnote: 'Examples: If Metricbeat is running on an EC2 host and fetches data from its host, the cloud info contains the data about this machine. If Metricbeat runs on a remote machine outside the cloud and fetches data from a service running in the cloud, the field contains cloud data from the machine the service is running on.' + type: group + fields: + - name: account.id + level: extended + type: keyword + ignore_above: 1024 + description: 'The cloud account or organization id used to identify different entities in a multi-tenant environment. Examples: AWS account id, Google Cloud ORG Id, or other unique identifier.' + example: 666777888999 + - name: availability_zone + level: extended + type: keyword + ignore_above: 1024 + description: Availability zone in which this host is running. + example: us-east-1c + - name: instance.id + level: extended + type: keyword + ignore_above: 1024 + description: Instance ID of the host machine. + example: i-1234567890abcdef0 + - name: instance.name + level: extended + type: keyword + ignore_above: 1024 + description: Instance name of the host machine. + - name: machine.type + level: extended + type: keyword + ignore_above: 1024 + description: Machine type of the host machine. + example: t2.medium + - name: provider + level: extended + type: keyword + ignore_above: 1024 + description: Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. + example: aws + - name: region + level: extended + type: keyword + ignore_above: 1024 + description: Region in which this host is running. + example: us-east-1 + - name: project.id + type: keyword + description: Name of the project in Google Cloud. + - name: image.id + type: keyword + description: Image ID for the cloud instance. +- name: container + title: Container + group: 2 + description: 'Container fields are used for meta information about the specific container that is the source of information. These fields help correlate data based containers from any runtime.' + type: group + fields: + - name: id + level: core + type: keyword + ignore_above: 1024 + description: Unique container id. + - name: image.name + level: extended + type: keyword + ignore_above: 1024 + description: Name of the image the container was built on. + - name: labels + level: extended + type: object + object_type: keyword + description: Image labels. + - name: name + level: extended + type: keyword + ignore_above: 1024 + description: Container name. +- name: host + title: Host + group: 2 + description: 'A host is defined as a general computing instance. ECS host.* fields should be populated with details about the host on which the event happened, or from which the measurement was taken. Host types include hardware, virtual machines, Docker containers, and Kubernetes nodes.' + type: group + fields: + - name: architecture + level: core + type: keyword + ignore_above: 1024 + description: Operating system architecture. + example: x86_64 + - name: domain + level: extended + type: keyword + ignore_above: 1024 + description: 'Name of the domain of which the host is a member. For example, on Windows this could be the host''s Active Directory domain or NetBIOS domain name. For Linux this could be the domain of the host''s LDAP provider.' + example: CONTOSO + default_field: false + - name: hostname + level: core + type: keyword + ignore_above: 1024 + description: 'Hostname of the host. It normally contains what the `hostname` command returns on the host machine.' + - name: id + level: core + type: keyword + ignore_above: 1024 + description: 'Unique host id. As hostname is not always unique, use values that are meaningful in your environment. Example: The current usage of `beat.name`.' + - name: ip + level: core + type: ip + description: Host ip addresses. + - name: mac + level: core + type: keyword + ignore_above: 1024 + description: Host mac addresses. + - name: name + level: core + type: keyword + ignore_above: 1024 + description: 'Name of the host. It can contain what `hostname` returns on Unix systems, the fully qualified domain name, or a name specified by the user. The sender decides which value to use.' + - name: os.family + level: extended + type: keyword + ignore_above: 1024 + description: OS family (such as redhat, debian, freebsd, windows). + example: debian + - name: os.kernel + level: extended + type: keyword + ignore_above: 1024 + description: Operating system kernel version as a raw string. + example: 4.4.0-112-generic + - name: os.name + level: extended + type: keyword + ignore_above: 1024 + multi_fields: + - name: text + type: text + norms: false + default_field: false + description: Operating system name, without the version. + example: Mac OS X + - name: os.platform + level: extended + type: keyword + ignore_above: 1024 + description: Operating system platform (such centos, ubuntu, windows). + example: darwin + - name: os.version + level: extended + type: keyword + ignore_above: 1024 + description: Operating system version as a raw string. + example: 10.14.1 + - name: type + level: core + type: keyword + ignore_above: 1024 + description: 'Type of host. For Cloud providers this can be the machine type like `t2.medium`. If vm, this could be the container, for example, or other information meaningful in your environment.' + - name: containerized + type: boolean + description: > + If the host is a container. + + - name: os.build + type: keyword + example: "18D109" + description: > + OS build information. + + - name: os.codename + type: keyword + example: "stretch" + description: > + OS codename, if any. + +- name: input.type + type: keyword + description: Input type +- name: log.offset + type: long + description: Log offset diff --git a/packages/m365_defender/data_stream/incident/fields/base-fields.yml b/packages/m365_defender/data_stream/incident/fields/base-fields.yml new file mode 100644 index 00000000000..2612d54e863 --- /dev/null +++ b/packages/m365_defender/data_stream/incident/fields/base-fields.yml @@ -0,0 +1,20 @@ +- name: data_stream.type + type: constant_keyword + description: Data stream type. +- name: data_stream.dataset + type: constant_keyword + description: Data stream dataset. +- name: data_stream.namespace + type: constant_keyword + description: Data stream namespace. +- name: event.module + type: constant_keyword + description: Event module. + value: m365_defender +- name: event.dataset + type: constant_keyword + description: Event dataset. + value: m365_defender.incident +- name: '@timestamp' + type: date + description: Event timestamp. diff --git a/packages/m365_defender/data_stream/incident/fields/ecs.yml b/packages/m365_defender/data_stream/incident/fields/ecs.yml new file mode 100644 index 00000000000..9f7102fc74e --- /dev/null +++ b/packages/m365_defender/data_stream/incident/fields/ecs.yml @@ -0,0 +1,104 @@ +- external: ecs + name: ecs.version +- external: ecs + name: email.delivery_timestamp +- external: ecs + name: email.direction +- external: ecs + name: email.from.address +- external: ecs + name: email.subject +- external: ecs + name: email.to.address +- external: ecs + name: event.action +- external: ecs + name: event.category +- external: ecs + name: event.created +- external: ecs + name: event.id +- external: ecs + name: event.kind +- external: ecs + name: event.original +- external: ecs + name: event.provider +- external: ecs + name: event.severity +- external: ecs + name: event.type +- external: ecs + name: event.url +- external: ecs + name: file.hash.sha1 +- external: ecs + name: file.hash.sha256 +- external: ecs + name: file.name +- external: ecs + name: file.path +- external: ecs + name: file.size +- external: ecs + name: group.id +- external: ecs + name: group.name +- external: ecs + name: message +- external: ecs + name: process.command_line +- external: ecs + name: process.hash.sha1 +- external: ecs + name: process.hash.sha256 +- external: ecs + name: process.parent.hash.sha1 +- external: ecs + name: process.parent.hash.sha256 +- external: ecs + name: process.parent.pid +- external: ecs + name: process.parent.start +- external: ecs + name: process.pid +- external: ecs + name: process.start +- external: ecs + name: process.user.id +- external: ecs + name: process.user.name +- external: ecs + name: registry.data.type +- external: ecs + name: registry.hive +- external: ecs + name: registry.key +- external: ecs + name: registry.value +- external: ecs + name: related.hash +- external: ecs + name: related.hosts +- external: ecs + name: related.ip +- external: ecs + name: related.user +- external: ecs + name: source.user.name +- external: ecs + name: tags +- external: ecs + name: threat.group.name +- external: ecs + name: threat.tactic.name +- external: ecs + name: threat.technique.subtechnique.id +- external: ecs + name: user.domain +- external: ecs + name: user.email +- external: ecs + name: user.id +- external: ecs + name: user.name diff --git a/packages/m365_defender/data_stream/incident/fields/fields.yml b/packages/m365_defender/data_stream/incident/fields/fields.yml new file mode 100644 index 00000000000..92236604767 --- /dev/null +++ b/packages/m365_defender/data_stream/incident/fields/fields.yml @@ -0,0 +1,566 @@ +- name: m365_defender.incident + type: group + fields: + - name: alert + type: group + fields: + - name: actor_display_name + type: keyword + description: The adversary or activity group that is associated with this alert. + - name: alert_web_url + type: group + description: URL for the alert page in the Microsoft 365 Defender portal. + fields: + - name: domain + type: keyword + - name: extension + type: keyword + - name: fragment + type: keyword + - name: full + type: keyword + - name: original + type: keyword + - name: password + type: keyword + - name: path + type: keyword + - name: port + type: long + - name: query + type: keyword + - name: scheme + type: keyword + - name: username + type: keyword + - name: assigned_to + type: keyword + description: Owner of the alert, or null if no owner is assigned. + - name: category + type: keyword + description: The attack kill-chain category that the alert belongs to. Aligned with the MITRE ATT&CK framework. + - name: classification + type: keyword + description: 'Specifies whether the alert represents a true threat. Possible values are: unknown, falsePositive, truePositive, benignPositive, unknownFutureValue.' + - name: comments + type: flattened + description: Array of comments created by the Security Operations (SecOps) team during the alert management process. + - name: created_datetime + type: date + description: Time when Microsoft 365 Defender created the alert. + - name: description + type: keyword + description: String value describing each alert. + - name: detection_source + type: keyword + description: Detection technology or sensor that identified the notable component or activity. + - name: detector_id + type: keyword + description: The ID of the detector that triggered the alert. + - name: determination + type: keyword + description: 'Specifies the result of the investigation, whether the alert represents a true attack and if so, the nature of the attack. Possible values are: unknown, apt, malware, securityPersonnel, securityTesting, unwantedSoftware, other, multiStagedAttack, compromisedUser, phishing, maliciousUserActivity, clean, insufficientData, confirmedUserActivity, lineOfBusinessApplication, unknownFutureValue.' + - name: evidence + type: group + fields: + - name: antispam_direction + type: keyword + description: 'Direction of the email relative to your network. The possible values are: Inbound, Outbound or Intraorg.' + - name: app_id + type: keyword + description: Unique identifier of the application. + - name: attachments_count + type: long + description: Number of attachments in the email. + - name: azure_ad_device_id + type: keyword + description: A unique identifier assigned to a device by Azure Active Directory (Azure AD) when device is Azure AD-joined. + - name: cluster_by + type: keyword + description: The clustering logic of the emails inside the cluster. + - name: cluster_by_value + type: keyword + description: The value utilized to cluster the similar emails. + - name: created_datetime + type: date + description: The time the evidence was created and added to the alert. + - name: defender_av_status + type: keyword + description: 'State of the Defender AntiMalware engine. The possible values are: notReporting, disabled, notUpdated, updated, unknown, notSupported, unknownFutureValue.' + - name: delivery_action + type: keyword + description: 'Delivery action of the email. The possible values are: Delivered, DeliveredAsSpam, Junked, Blocked, or Replaced.' + - name: delivery_location + type: keyword + description: 'Location where the email was delivered. The possible values are: Inbox, External, JunkFolder, Quarantine, Failed, Dropped, DeletedFolder or Forwarded.' + - name: detection_status + type: keyword + description: 'The status of the detection.The possible values are: detected, blocked, prevented, unknownFutureValue.' + - name: device_dns_name + type: keyword + description: The fully qualified domain name (FQDN) for the device. + - name: display_name + type: keyword + description: Name of the application. + - name: email_count + type: long + description: Count of emails in the email cluster. + - name: file_details + type: group + fields: + - name: issuer + type: keyword + description: The certificate authority (CA) that issued the certificate. + - name: name + type: keyword + description: The name of the file. + - name: odata_type + type: keyword + - name: path + type: keyword + description: The file path (location) of the file instance. + - name: publisher + type: keyword + description: The publisher of the file. + - name: sha1 + type: keyword + description: The Sha1 cryptographic hash of the file content. + - name: sha256 + type: keyword + description: The Sha256 cryptographic hash of the file content. + - name: signer + type: keyword + description: The signer of the signed file. + - name: size + type: long + description: The size of the file in bytes. + - name: first_seen_datetime + type: date + description: The date and time when the device was first seen. + - name: health_status + type: keyword + description: 'The health state of the device.The possible values are: active, inactive, impairedCommunication, noSensorData, noSensorDataImpairedCommunication, unknown, unknownFutureValue.' + - name: image_file + type: group + fields: + - name: issuer + type: keyword + description: The certificate authority (CA) that issued the certificate. + - name: name + type: keyword + description: The name of the file. + - name: odata_type + type: keyword + - name: path + type: keyword + description: The file path (location) of the file instance. + - name: publisher + type: keyword + description: The publisher of the file. + - name: sha1 + type: keyword + description: The Sha1 cryptographic hash of the file content. + - name: sha256 + type: keyword + description: The Sha256 cryptographic hash of the file content. + - name: signer + type: keyword + description: The signer of the signed file. + - name: size + type: long + description: The size of the file in bytes. + - name: instance_id + type: keyword + description: Identifier of the instance of the Software as a Service (SaaS) application. + - name: instance_name + type: keyword + description: Name of the instance of the SaaS application. + - name: internet_message_id + type: keyword + description: Public-facing identifier for the email that is set by the sending email system. + - name: ip_address + type: ip + description: The value of the IP Address, can be either in V4 address or V6 address format. + - name: language + type: keyword + description: Detected language of the email content. + - name: logged_on_users + type: group + fields: + - name: account_name + type: keyword + description: User account name of the logged-on user. + - name: domain_name + type: keyword + description: User account domain of the logged-on user. + - name: odata_type + type: keyword + - name: mde_device_id + type: keyword + description: A unique identifier assigned to a device by Microsoft Defender for Endpoint. + - name: network_message_id + type: keyword + description: Unique identifier for the email, generated by Microsoft 365. + - name: network_message_ids + type: keyword + description: Unique identifiers for the emails in the cluster, generated by Microsoft 365. + - name: object_id + type: keyword + description: The unique identifier of the application object in Azure AD. + - name: onboarding_status + type: keyword + description: 'The status of the machine onboarding to Microsoft Defender for Endpoint.The possible values are: insufficientInfo, onboarded, canBeOnboarded, unsupported, unknownFutureValue.' + - name: os_build + type: keyword + description: The build version for the operating system the device is running. + - name: os_platform + type: keyword + description: The operating system platform the device is running. + - name: p1_sender + type: group + fields: + - name: display_name + type: keyword + description: The name of the sender. + - name: domain_name + type: keyword + description: Sender domain. + - name: email_address + type: keyword + description: Sender email address. + - name: odata_type + type: keyword + - name: p2_sender + type: group + fields: + - name: display_name + type: keyword + description: The name of the sender. + - name: domain_name + type: keyword + description: Sender domain. + - name: email_address + type: keyword + description: Sender email address. + - name: odata_type + type: keyword + - name: parent_process + type: group + fields: + - name: creation_datetime + type: date + description: Date and time when the parent of the process was created. + - name: id + type: long + description: Process ID (PID) of the parent process that spawned the process. + - name: image_file + type: group + fields: + - name: issuer + type: keyword + description: The certificate authority (CA) that issued the certificate. + - name: name + type: keyword + description: The name of the file. + - name: odata_type + type: keyword + - name: path + type: keyword + description: The file path (location) of the file instance. + - name: publisher + type: keyword + description: The publisher of the file. + - name: sha1 + type: keyword + description: The Sha1 cryptographic hash of the file content. + - name: sha256 + type: keyword + description: The Sha256 cryptographic hash of the file content. + - name: signer + type: keyword + description: The signer of the signed file. + - name: size + type: long + description: The size of the file in bytes. + - name: primary_address + type: keyword + description: The primary email address of the mailbox. + - name: process + type: group + fields: + - name: command_line + type: keyword + description: Command line used to create the new process. + - name: creation_datetime + type: date + description: Date and time the process was created. + - name: id + type: long + description: Process ID (PID) of the newly created process. + - name: publisher + type: keyword + description: The name of the application publisher. + - name: query + type: keyword + description: The query used to identify the email cluster. + - name: rbac_group + type: group + fields: + - name: id + type: keyword + description: The ID of the role-based access control (RBAC) device group. + - name: name + type: keyword + description: The name of the RBAC device group. + - name: received_datetime + type: date + description: Date and time when the email was received. + - name: recipient_email_address + type: keyword + description: Email address of the recipient, or email address of the recipient after distribution list expansion. + - name: registry_hive + type: keyword + description: Registry hive of the key that the recorded action was applied to. + - name: registry_key + type: keyword + description: Registry key that the recorded action was applied to. + - name: registry_value + type: keyword + description: Data of the registry value that the recorded action was applied to. + - name: registry_value_name + type: keyword + description: Name of the registry value that the recorded action was applied to. + - name: registry_value_type + type: keyword + description: Data type, such as binary or string, of the registry value that the recorded action was applied to. + - name: remediation_status + type: keyword + description: 'Status of the remediation action taken. The possible values are: none, remediated, prevented, blocked, notFound, active, pendingApproval, declined, notRemediated, running, unknownFutureValue.' + - name: remediation_status_details + type: keyword + description: Details about the remediation status. + - name: risk_score + type: keyword + description: 'Risk score as evaluated by Microsoft Defender for Endpoint. The possible values are: none, informational, low, medium, high, unknownFutureValue.' + - name: roles + type: keyword + description: The role/s that an evidence entity represents in an alert, e.g., an IP address that is associated with an attacker will have the evidence role "Attacker". + - name: saas_app_id + type: keyword + description: The identifier of the SaaS application. + - name: security_group_id + type: keyword + description: Unique identifier of the security group. + - name: sender_ip + type: ip + description: IP address of the last detected mail server that relayed the message. + - name: subject + type: keyword + description: Subject of the email. + - name: tags + type: keyword + description: Array of custom tags associated with an evidence instance, for example to denote a group of devices, high value assets, etc. + - name: threat_detection_methods + type: keyword + description: Collection of methods used to detect malware, phishing, or other threats found in the email. + - name: threats + type: keyword + description: Collection of detection names for malware or other threats found. + - name: type + type: keyword + - name: url + type: keyword + description: The Unique Resource Locator (URL). + - name: url_count + type: long + description: Number of embedded URLs in the email. + - name: urls + type: keyword + description: Collection of the URLs contained in this email. + - name: urn + type: keyword + description: Uniform resource name (URN) of the automated investigation where the cluster was identified. + - name: user_account + type: group + fields: + - name: account_name + type: keyword + description: The user account's displayed name. + - name: azure_ad_user_id + type: keyword + description: The user object identifier in Azure AD. + - name: domain_name + type: keyword + description: The name of the Active Directory domain of which the user is a member. + - name: odata_type + type: keyword + - name: user_principal_name + type: keyword + description: The user principal name of the account in Azure AD. + - name: user_sid + type: keyword + description: The local security identifier of the user account. + - name: verdict + type: keyword + description: 'The decision reached by automated investigation. The possible values are: unknown, suspicious, malicious, noThreatsFound, unknownFutureValue.' + - name: version + type: keyword + description: The version of the operating system platform. + - name: vm_metadata + type: group + fields: + - name: cloud_provider + type: keyword + description: 'The cloud provider hosting the virtual machine. The possible values are: unknown, azure, unknownFutureValue.' + - name: odata_type + type: keyword + - name: resource_id + type: keyword + description: Unique identifier of the Azure resource. + - name: subscription_id + type: keyword + description: Unique identifier of the Azure subscription the customer tenant belongs to. + - name: vm_id + type: keyword + description: Unique identifier of the virtual machine instance. + - name: first_activity_datetime + type: date + description: The earliest activity associated with the alert. + - name: id + type: keyword + description: Unique identifier to represent the alert resource. + - name: incident_id + type: keyword + description: Unique identifier to represent the incident this alert resource is associated with. + - name: incident_web_url + type: group + description: URL for the incident page in the Microsoft 365 Defender portal. + fields: + - name: domain + type: keyword + - name: extension + type: keyword + - name: fragment + type: keyword + - name: full + type: keyword + - name: original + type: keyword + - name: password + type: keyword + - name: path + type: keyword + - name: port + type: long + - name: query + type: keyword + - name: scheme + type: keyword + - name: username + type: keyword + - name: last_activity_datetime + type: date + description: The oldest activity associated with the alert. + - name: last_update_datetime + type: date + description: Time when the alert was last updated at Microsoft 365 Defender. + - name: mitre_techniques + type: keyword + description: The attack techniques, as aligned with the MITRE ATT&CK framework. + - name: provider_alert_id + type: keyword + description: The ID of the alert as it appears in the security provider product that generated the alert. + - name: recommended_actions + type: keyword + description: Recommended response and remediation actions to take in the event this alert was generated. + - name: resolved_datetime + type: date + description: Time when the alert was resolved. + - name: service_source + type: keyword + description: 'The service or product that created this alert. Possible values are: microsoftDefenderForEndpoint, microsoftDefenderForIdentity, microsoftCloudAppSecurity, microsoftDefenderForOffice365, microsoft365Defender, aadIdentityProtection, appGovernance, dataLossPrevention.' + - name: severity + type: keyword + description: 'Indicates the possible impact on assets. The higher the severity the bigger the impact. Typically higher severity items require the most immediate attention. Possible values are: unknown, informational, low, medium, high, unknownFutureValue.' + - name: status + type: keyword + description: 'The status of the alert. Possible values are: new, inProgress, resolved, unknownFutureValue.' + - name: tenant_id + type: keyword + description: The Azure Active Directory tenant the alert was created in. + - name: threat_display_name + type: keyword + description: The threat associated with this alert. + - name: threat_family_name + type: keyword + description: Threat family associated with this alert. + - name: title + type: keyword + description: Brief identifying string value describing the alert. + - name: assigned_to + type: keyword + description: Owner of the incident, or null if no owner is assigned. Free editable text. + - name: classification + type: keyword + description: 'The specification for the incident. Possible values are: unknown, falsePositive, truePositive, informationalExpectedActivity, unknownFutureValue.' + - name: comments + type: flattened + description: Array of comments created by the Security Operations (SecOps) team when the incident is managed. + - name: created_datetime + type: date + description: Time when the incident was first created. + - name: determination + type: keyword + description: 'Specifies the determination of the incident. Possible values are: unknown, apt, malware, securityPersonnel, securityTesting, unwantedSoftware, other, multiStagedAttack, compromisedUser, phishing, maliciousUserActivity, clean, insufficientData, confirmedUserActivity, lineOfBusinessApplication, unknownFutureValue.' + - name: display_name + type: keyword + description: The incident name. + - name: id + type: keyword + description: Unique identifier to represent the incident. + - name: last_update_datetime + type: date + description: Time when the incident was last updated. + - name: odata_type + type: keyword + - name: redirect_incident_id + type: keyword + description: Only populated in case an incident is grouped together with another incident, as part of the logic that processes incidents. In such a case, the status property is redirected. + - name: severity + type: keyword + description: 'Indicates the possible impact on assets. The higher the severity, the bigger the impact. Typically higher severity items require the most immediate attention. Possible values are: unknown, informational, low, medium, high, unknownFutureValue.' + - name: status + type: keyword + description: 'The status of the incident. Possible values are: active, resolved, redirected, unknownFutureValue.' + - name: tags + type: keyword + description: Array of custom tags associated with an incident. + - name: tenant_id + type: keyword + description: The Azure Active Directory tenant in which the alert was created. + - name: web_url + type: group + description: The URL for the incident page in the Microsoft 365 Defender portal. + fields: + - name: domain + type: keyword + - name: extension + type: keyword + - name: fragment + type: keyword + - name: full + type: keyword + - name: original + type: keyword + - name: password + type: keyword + - name: path + type: keyword + - name: port + type: long + - name: query + type: keyword + - name: scheme + type: keyword + - name: username + type: keyword diff --git a/packages/m365_defender/data_stream/incident/manifest.yml b/packages/m365_defender/data_stream/incident/manifest.yml new file mode 100644 index 00000000000..92ce9fed1b4 --- /dev/null +++ b/packages/m365_defender/data_stream/incident/manifest.yml @@ -0,0 +1,81 @@ +title: Collect Incident logs from Microsoft 365 Defender +type: logs +streams: + - input: httpjson + title: Incident logs + description: Collect Incident logs from Microsoft 365 Defender. + template_path: httpjson.yml.hbs + vars: + - name: request_url + type: text + title: Request URL + description: URL of API endpoint. + default: https://graph.microsoft.com + multi: false + required: true + show_user: false + - name: initial_interval + type: text + title: Initial Interval + description: How far back to pull the incidents from Microsoft 365 Defender. NOTE:- Supported units for this parameter are h/m/s. + multi: false + required: true + show_user: true + default: 24h + - name: interval + type: text + title: Interval + description: Duration between requests to the Microsoft Security Graph API V2. NOTE:- Supported units for this parameter are h/m/s. + default: 1m + multi: false + required: true + show_user: true + - name: batch_size + type: integer + title: Batch Size + description: Batch size for the response of the Incident Security Graph API V2. The maximum supported batch size value is 50. + default: 50 + multi: false + required: true + show_user: false + - name: http_client_timeout + type: text + title: HTTP Client Timeout + description: Duration before declaring that the HTTP client connection has timed out. NOTE:- Valid time units are ns, us, ms, s, m, h. + multi: false + required: true + show_user: false + default: 30s + - name: tags + type: text + title: Tags + multi: true + required: true + show_user: false + default: + - forwarded + - m365_defender-incident + - name: preserve_original_event + required: true + show_user: true + title: Preserve original event + description: Preserves a raw copy of the original event, added to the field `event.original`. + type: bool + multi: false + default: false + - name: preserve_duplicate_custom_fields + required: true + show_user: false + title: Preserve duplicate custom fields + description: Preserve m365_defender.incident fields that were copied to Elastic Common Schema (ECS) fields. + type: bool + multi: false + default: false + - name: processors + type: yaml + title: Processors + multi: false + required: false + show_user: false + description: >- + Processors are used to reduce the number of fields in the exported event or to enhance the event with metadata. This executes in the agent before the logs are parsed. See [Processors](https://www.elastic.co/guide/en/beats/filebeat/current/filtering-and-enhancing-data.html) for details. diff --git a/packages/m365_defender/data_stream/incident/sample_event.json b/packages/m365_defender/data_stream/incident/sample_event.json new file mode 100644 index 00000000000..89fd0819581 --- /dev/null +++ b/packages/m365_defender/data_stream/incident/sample_event.json @@ -0,0 +1,328 @@ +{ + "@timestamp": "2021-09-30T09:35:45.113Z", + "agent": { + "ephemeral_id": "431a43cb-a982-48fb-9834-1f92b2b03dc7", + "hostname": "docker-fleet-agent", + "id": "d4b18182-9c85-4467-8583-920b19f205fa", + "name": "docker-fleet-agent", + "type": "filebeat", + "version": "7.16.0" + }, + "cloud": { + "account": { + "id": "b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c" + }, + "provider": [ + "azure" + ] + }, + "data_stream": { + "dataset": "m365_defender.incident", + "namespace": "ep", + "type": "logs" + }, + "ecs": { + "version": "8.5.0" + }, + "elastic_agent": { + "id": "d4b18182-9c85-4467-8583-920b19f205fa", + "snapshot": false, + "version": "7.16.0" + }, + "event": { + "action": [ + "detected" + ], + "agent_id_status": "verified", + "created": "2021-08-13T08:43:35.553Z", + "dataset": "m365_defender.incident", + "id": "2972395", + "ingested": "2022-11-07T09:55:14Z", + "kind": "event", + "original": "{\"@odata.type\":\"#microsoft.graph.security.incident\",\"alerts\":{\"@odata.type\":\"#microsoft.graph.security.alert\",\"actorDisplayName\":null,\"alertWebUrl\":\"https://security.microsoft.com/alerts/da637551227677560813_-961444813?tid=b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c\",\"assignedTo\":null,\"category\":\"DefenseEvasion\",\"classification\":\"unknown\",\"comments\":[],\"createdDateTime\":\"2021-04-27T12:19:27.7211305Z\",\"description\":\"A hidden file has been launched. This activity could indicate a compromised host. Attackers often hide files associated with malicious tools to evade file system inspection and defenses.\",\"detectionSource\":\"antivirus\",\"detectorId\":\"e0da400f-affd-43ef-b1d5-afc2eb6f2756\",\"determination\":\"unknown\",\"evidence\":[{\"@odata.type\":\"#microsoft.graph.security.deviceEvidence\",\"azureAdDeviceId\":null,\"createdDateTime\":\"2021-04-27T12:19:27.7211305Z\",\"defenderAvStatus\":\"unknown\",\"deviceDnsName\":\"tempDns\",\"firstSeenDateTime\":\"2020-09-12T07:28:32.4321753Z\",\"healthStatus\":\"active\",\"loggedOnUsers\":[],\"mdeDeviceId\":\"73e7e2de709dff64ef64b1d0c30e67fab63279db\",\"onboardingStatus\":\"onboarded\",\"osBuild\":22424,\"osPlatform\":\"Windows10\",\"rbacGroupId\":75,\"rbacGroupName\":\"UnassignedGroup\",\"remediationStatus\":\"none\",\"remediationStatusDetails\":null,\"riskScore\":\"medium\",\"roles\":[\"compromised\"],\"tags\":[\"Test Machine\"],\"verdict\":\"unknown\",\"version\":\"Other\",\"vmMetadata\":{\"cloudProvider\":\"azure\",\"resourceId\":\"/subscriptions/8700d3a3-3bb7-4fbe-a090-488a1ad04161/resourceGroups/WdatpApi-EUS-STG/providers/Microsoft.Compute/virtualMachines/NirLaviTests\",\"subscriptionId\":\"8700d3a3-3bb7-4fbe-a090-488a1ad04161\",\"vmId\":\"ca1b0d41-5a3b-4d95-b48b-f220aed11d78\"}},{\"@odata.type\":\"#microsoft.graph.security.fileEvidence\",\"createdDateTime\":\"2021-04-27T12:19:27.7211305Z\",\"detectionStatus\":\"detected\",\"fileDetails\":{\"fileName\":\"MsSense.exe\",\"filePath\":\"C:\\\\Program Files\\\\temp\",\"filePublisher\":\"Microsoft Corporation\",\"fileSize\":6136392,\"issuer\":null,\"sha1\":\"5f1e8acedc065031aad553b710838eb366cfee9a\",\"sha256\":\"8963a19fb992ad9a76576c5638fd68292cffb9aaac29eb8285f9abf6196a7dec\",\"signer\":null},\"mdeDeviceId\":\"73e7e2de709dff64ef64b1d0c30e67fab63279db\",\"remediationStatus\":\"none\",\"remediationStatusDetails\":null,\"roles\":[],\"tags\":[],\"verdict\":\"unknown\"},{\"@odata.type\":\"#microsoft.graph.security.processEvidence\",\"createdDateTime\":\"2021-04-27T12:19:27.7211305Z\",\"detectionStatus\":\"detected\",\"imageFile\":{\"fileName\":\"MsSense.exe\",\"filePath\":\"C:\\\\Program Files\\\\temp\",\"filePublisher\":\"Microsoft Corporation\",\"fileSize\":6136392,\"issuer\":null,\"sha1\":\"5f1e8acedc065031aad553b710838eb366cfee9a\",\"sha256\":\"8963a19fb992ad9a76576c5638fd68292cffb9aaac29eb8285f9abf6196a7dec\",\"signer\":null},\"mdeDeviceId\":\"73e7e2de709dff64ef64b1d0c30e67fab63279db\",\"parentProcessCreationDateTime\":\"2021-08-12T07:39:09.0909239Z\",\"parentProcessId\":668,\"parentProcessImageFile\":{\"fileName\":\"services.exe\",\"filePath\":\"C:\\\\Windows\\\\System32\",\"filePublisher\":\"Microsoft Corporation\",\"fileSize\":731744,\"issuer\":null,\"sha1\":null,\"sha256\":null,\"signer\":null},\"processCommandLine\":\"\\\"MsSense.exe\\\"\",\"processCreationDateTime\":\"2021-08-12T12:43:19.0772577Z\",\"processId\":4780,\"remediationStatus\":\"none\",\"remediationStatusDetails\":null,\"roles\":[],\"tags\":[],\"userAccount\":{\"accountName\":\"SYSTEM\",\"azureAdUserId\":null,\"domainName\":\"NT AUTHORITY\",\"userPrincipalName\":null,\"userSid\":\"S-1-5-18\"},\"verdict\":\"unknown\"},{\"@odata.type\":\"#microsoft.graph.security.registryKeyEvidence\",\"createdDateTime\":\"2021-04-27T12:19:27.7211305Z\",\"registryHive\":\"HKEY_LOCAL_MACHINE\",\"registryKey\":\"SYSTEM\\\\CONTROLSET001\\\\CONTROL\\\\WMI\\\\AUTOLOGGER\\\\SENSEAUDITLOGGER\",\"remediationStatus\":\"none\",\"remediationStatusDetails\":null,\"roles\":[],\"tags\":[],\"verdict\":\"unknown\"}],\"firstActivityDateTime\":\"2021-04-26T07:45:50.116Z\",\"id\":\"da637551227677560813_-961444813\",\"incidentId\":\"28282\",\"incidentWebUrl\":\"https://security.microsoft.com/incidents/28282?tid=b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c\",\"lastActivityDateTime\":\"2021-05-02T07:56:58.222Z\",\"lastUpdateDateTime\":\"2021-05-02T14:19:01.3266667Z\",\"mitreTechniques\":[\"T1564.001\"],\"providerAlertId\":\"da637551227677560813_-961444813\",\"recommendedActions\":\"Collect artifacts and determine scope\\n�\\tReview the machine timeline for suspicious activities that may have occurred before and after the time of the alert, and record additional related artifacts (files, IPs/URLs) \\n�\\tLook for the presence of relevant artifacts on other systems. Identify commonalities and differences between potentially compromised systems.\\n�\\tSubmit relevant files for deep analysis and review resulting detailed behavioral information.\\n�\\tSubmit undetected files to the MMPC malware portal\\n\\nInitiate containment \\u0026 mitigation \\n�\\tContact the user to verify intent and initiate local remediation actions as needed.\\n�\\tUpdate AV signatures and run a full scan. The scan might reveal and remove previously-undetected malware components.\\n�\\tEnsure that the machine has the latest security updates. In particular, ensure that you have installed the latest software, web browser, and Operating System versions.\\n�\\tIf credential theft is suspected, reset all relevant users passwords.\\n�\\tBlock communication with relevant URLs or IPs at the organization�s perimeter.\",\"resolvedDateTime\":null,\"serviceSource\":\"microsoftDefenderForEndpoint\",\"severity\":\"low\",\"status\":\"new\",\"tenantId\":\"b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c\",\"threatDisplayName\":null,\"threatFamilyName\":null,\"title\":\"Suspicious execution of hidden file\"},\"assignedTo\":\"KaiC@contoso.onmicrosoft.com\",\"classification\":\"truePositive\",\"comments\":[{\"comment\":\"Demo incident\",\"createdBy\":\"DavidS@contoso.onmicrosoft.com\",\"createdTime\":\"2021-09-30T12:07:37.2756993Z\"}],\"createdDateTime\":\"2021-08-13T08:43:35.5533333Z\",\"determination\":\"multiStagedAttack\",\"displayName\":\"Multi-stage incident involving Initial access \\u0026 Command and control on multiple endpoints reported by multiple sources\",\"id\":\"2972395\",\"incidentWebUrl\":\"https://security.microsoft.com/incidents/2972395?tid=12f988bf-16f1-11af-11ab-1d7cd011db47\",\"lastUpdateDateTime\":\"2021-09-30T09:35:45.1133333Z\",\"redirectIncidentId\":null,\"severity\":\"medium\",\"status\":\"active\",\"tags\":[\"Demo\"],\"tenantId\":\"b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c\"}", + "provider": "microsoftDefenderForEndpoint", + "severity": 3, + "url": "https://security.microsoft.com/incidents/2972395?tid=12f988bf-16f1-11af-11ab-1d7cd011db47" + }, + "file": { + "hash": { + "sha1": [ + "5f1e8acedc065031aad553b710838eb366cfee9a" + ], + "sha256": [ + "8963a19fb992ad9a76576c5638fd68292cffb9aaac29eb8285f9abf6196a7dec" + ] + }, + "name": [ + "MsSense.exe" + ], + "path": [ + "C:\\Program Files\\temp" + ], + "size": [ + 6136392 + ] + }, + "host": { + "id": [ + "73e7e2de709dff64ef64b1d0c30e67fab63279db" + ], + "os": { + "name": [ + "Windows10" + ], + "version": [ + "Other" + ] + } + }, + "input": { + "type": "httpjson" + }, + "m365_defender": { + "incident": { + "alert": { + "alert_web_url": { + "domain": "security.microsoft.com", + "original": "https://security.microsoft.com/alerts/da637551227677560813_-961444813?tid=b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c", + "path": "/alerts/da637551227677560813_-961444813", + "query": "tid=b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c", + "scheme": "https" + }, + "category": "DefenseEvasion", + "classification": "unknown", + "created_datetime": "2021-04-27T12:19:27.721Z", + "description": "A hidden file has been launched. This activity could indicate a compromised host. Attackers often hide files associated with malicious tools to evade file system inspection and defenses.", + "detection_source": "antivirus", + "detector_id": "e0da400f-affd-43ef-b1d5-afc2eb6f2756", + "determination": "unknown", + "evidence": [ + { + "created_datetime": "2021-04-27T12:19:27.721Z", + "defender_av_status": "unknown", + "device_dns_name": "tempDns", + "first_seen_datetime": "2020-09-12T07:28:32.432Z", + "health_status": "active", + "mde_device_id": "73e7e2de709dff64ef64b1d0c30e67fab63279db", + "odata_type": "#microsoft.graph.security.deviceEvidence", + "onboarding_status": "onboarded", + "os_build": "22424", + "os_platform": "Windows10", + "rbac_group": { + "id": "75", + "name": "UnassignedGroup" + }, + "remediation_status": "none", + "risk_score": "medium", + "roles": [ + "compromised" + ], + "tags": [ + "Test Machine" + ], + "verdict": "unknown", + "version": "Other", + "vm_metadata": { + "cloud_provider": "azure", + "resource_id": "/subscriptions/8700d3a3-3bb7-4fbe-a090-488a1ad04161/resourceGroups/WdatpApi-EUS-STG/providers/Microsoft.Compute/virtualMachines/NirLaviTests", + "subscription_id": "8700d3a3-3bb7-4fbe-a090-488a1ad04161", + "vm_id": "ca1b0d41-5a3b-4d95-b48b-f220aed11d78" + } + }, + { + "created_datetime": "2021-04-27T12:19:27.721Z", + "detection_status": "detected", + "file_details": { + "name": "MsSense.exe", + "path": "C:\\Program Files\\temp", + "publisher": "Microsoft Corporation", + "sha1": "5f1e8acedc065031aad553b710838eb366cfee9a", + "sha256": "8963a19fb992ad9a76576c5638fd68292cffb9aaac29eb8285f9abf6196a7dec", + "size": 6136392 + }, + "mde_device_id": "73e7e2de709dff64ef64b1d0c30e67fab63279db", + "odata_type": "#microsoft.graph.security.fileEvidence", + "remediation_status": "none", + "verdict": "unknown" + }, + { + "created_datetime": "2021-04-27T12:19:27.721Z", + "detection_status": "detected", + "image_file": { + "name": "MsSense.exe", + "path": "C:\\Program Files\\temp", + "publisher": "Microsoft Corporation", + "sha1": "5f1e8acedc065031aad553b710838eb366cfee9a", + "sha256": "8963a19fb992ad9a76576c5638fd68292cffb9aaac29eb8285f9abf6196a7dec", + "size": 6136392 + }, + "mde_device_id": "73e7e2de709dff64ef64b1d0c30e67fab63279db", + "odata_type": "#microsoft.graph.security.processEvidence", + "parent_process": { + "creation_datetime": "2021-08-12T07:39:09.090Z", + "id": 668, + "image_file": { + "name": "services.exe", + "path": "C:\\Windows\\System32", + "publisher": "Microsoft Corporation", + "size": 731744 + } + }, + "process": { + "command_line": "\"MsSense.exe\"", + "creation_datetime": "2021-08-12T12:43:19.077Z", + "id": 4780 + }, + "remediation_status": "none", + "user_account": { + "account_name": "SYSTEM", + "domain_name": "NT AUTHORITY", + "user_sid": "S-1-5-18" + }, + "verdict": "unknown" + }, + { + "created_datetime": "2021-04-27T12:19:27.721Z", + "odata_type": "#microsoft.graph.security.registryKeyEvidence", + "registry_hive": "HKEY_LOCAL_MACHINE", + "registry_key": "SYSTEM\\CONTROLSET001\\CONTROL\\WMI\\AUTOLOGGER\\SENSEAUDITLOGGER", + "remediation_status": "none", + "verdict": "unknown" + } + ], + "first_activity_datetime": "2021-04-26T07:45:50.116Z", + "id": "da637551227677560813_-961444813", + "incident_id": "28282", + "incident_web_url": { + "domain": "security.microsoft.com", + "original": "https://security.microsoft.com/incidents/28282?tid=b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c", + "path": "/incidents/28282", + "query": "tid=b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c", + "scheme": "https" + }, + "last_activity_datetime": "2021-05-02T07:56:58.222Z", + "last_update_datetime": "2021-05-02T14:19:01.326Z", + "mitre_techniques": [ + "T1564.001" + ], + "provider_alert_id": "da637551227677560813_-961444813", + "recommended_actions": "Collect artifacts and determine scope\n�\tReview the machine timeline for suspicious activities that may have occurred before and after the time of the alert, and record additional related artifacts (files, IPs/URLs) \n�\tLook for the presence of relevant artifacts on other systems. Identify commonalities and differences between potentially compromised systems.\n�\tSubmit relevant files for deep analysis and review resulting detailed behavioral information.\n�\tSubmit undetected files to the MMPC malware portal\n\nInitiate containment \u0026 mitigation \n�\tContact the user to verify intent and initiate local remediation actions as needed.\n�\tUpdate AV signatures and run a full scan. The scan might reveal and remove previously-undetected malware components.\n�\tEnsure that the machine has the latest security updates. In particular, ensure that you have installed the latest software, web browser, and Operating System versions.\n�\tIf credential theft is suspected, reset all relevant users passwords.\n�\tBlock communication with relevant URLs or IPs at the organization�s perimeter.", + "service_source": "microsoftDefenderForEndpoint", + "severity": "low", + "status": "new", + "tenant_id": "b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c", + "title": "Suspicious execution of hidden file" + }, + "assigned_to": "KaiC@contoso.onmicrosoft.com", + "classification": "truePositive", + "comments": [ + { + "comment": "Demo incident", + "createdBy": "DavidS@contoso.onmicrosoft.com", + "createdTime": "2021-09-30T12:07:37.2756993Z" + } + ], + "created_datetime": "2021-08-13T08:43:35.553Z", + "determination": "multiStagedAttack", + "display_name": "Multi-stage incident involving Initial access \u0026 Command and control on multiple endpoints reported by multiple sources", + "id": "2972395", + "last_update_datetime": "2021-09-30T09:35:45.113Z", + "odata_type": "#microsoft.graph.security.incident", + "severity": "medium", + "status": "active", + "tags": [ + "Demo" + ], + "tenant_id": "b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c", + "web_url": { + "domain": "security.microsoft.com", + "original": "https://security.microsoft.com/incidents/2972395?tid=12f988bf-16f1-11af-11ab-1d7cd011db47", + "path": "/incidents/2972395", + "query": "tid=12f988bf-16f1-11af-11ab-1d7cd011db47", + "scheme": "https" + } + } + }, + "message": "Multi-stage incident involving Initial access \u0026 Command and control on multiple endpoints reported by multiple sources", + "process": { + "command_line": [ + "\"MsSense.exe\"" + ], + "hash": { + "sha1": [ + "5f1e8acedc065031aad553b710838eb366cfee9a" + ], + "sha256": [ + "8963a19fb992ad9a76576c5638fd68292cffb9aaac29eb8285f9abf6196a7dec" + ] + }, + "parent": { + "pid": [ + 668 + ], + "start": [ + "2021-08-12T07:39:09.090Z" + ] + }, + "pid": [ + 4780 + ], + "start": [ + "2021-08-12T12:43:19.077Z" + ], + "user": { + "name": [ + "SYSTEM" + ] + } + }, + "registry": { + "hive": [ + "HKEY_LOCAL_MACHINE" + ], + "key": [ + "SYSTEM\\CONTROLSET001\\CONTROL\\WMI\\AUTOLOGGER\\SENSEAUDITLOGGER" + ] + }, + "related": { + "hash": [ + "5f1e8acedc065031aad553b710838eb366cfee9a", + "8963a19fb992ad9a76576c5638fd68292cffb9aaac29eb8285f9abf6196a7dec" + ], + "hosts": [ + "tempDns", + "NT AUTHORITY" + ], + "user": [ + "KaiC@contoso.onmicrosoft.com", + "DavidS@contoso.onmicrosoft.com", + "SYSTEM", + "S-1-5-18" + ] + }, + "source": { + "user": { + "name": "KaiC@contoso.onmicrosoft.com" + } + }, + "tags": [ + "preserve_original_event", + "preserve_duplicate_custom_fields", + "forwarded", + "m365_defender-incident" + ], + "threat": { + "tactic": { + "name": [ + "DefenseEvasion" + ] + }, + "technique": { + "subtechnique": { + "id": [ + "T1564.001" + ] + } + } + } +} \ No newline at end of file diff --git a/packages/m365_defender/data_stream/log/_dev/test/system/test-httpjson-config.yml b/packages/m365_defender/data_stream/log/_dev/test/system/test-httpjson-config.yml index bbb840e6168..8597b1735a9 100644 --- a/packages/m365_defender/data_stream/log/_dev/test/system/test-httpjson-config.yml +++ b/packages/m365_defender/data_stream/log/_dev/test/system/test-httpjson-config.yml @@ -1,9 +1,11 @@ -service: m365-defender-http input: httpjson +service: m365-defender-http +vars: + login_url: http://{{Hostname}}:{{Port}} + client_id: xxxx + client_secret: xxxx + tenant_id: tenant_id data_stream: vars: - client_id: test-app-id - client_secret: test-secret - tenant_id: tenant_id - login_url: http://{{Hostname}}:{{Port}} request_url: http://{{Hostname}}:{{Port}} + preserve_original_event: true diff --git a/packages/m365_defender/data_stream/log/manifest.yml b/packages/m365_defender/data_stream/log/manifest.yml index c46c538405d..b87dcd7770c 100644 --- a/packages/m365_defender/data_stream/log/manifest.yml +++ b/packages/m365_defender/data_stream/log/manifest.yml @@ -6,27 +6,6 @@ streams: title: M365 Defender Logs description: Collect M365 Defender Logs from API vars: - - name: client_id - type: text - title: Client ID - description: The client ID related to creating a new application on Azure. - multi: false - required: true - show_user: true - - name: client_secret - type: text - title: Client Secret - description: The secret related to the client ID. - multi: false - required: true - show_user: true - - name: tenant_id - type: text - title: Tenant ID - description: The tenant ID related to creating a new application on Azure. - multi: false - required: true - show_user: true - name: interval type: text title: Interval @@ -43,20 +22,6 @@ streams: show_user: true default: 168h description: How far back in time to look for alerts the first time running. Default is 1 week. - - name: proxy_url - type: text - title: Proxy URL - multi: false - required: false - show_user: false - description: URL to proxy connections in the form of http\[s\]://:@: - - name: login_url - type: text - title: OAuth Server URL - required: true - show_user: false - default: https://login.microsoftonline.com - description: "URL of Login server 'tenant-id/oauth2/token added automatically'" - name: request_url type: text title: API URL Endpoint @@ -87,6 +52,5 @@ streams: multi: false required: false show_user: false - description: > + description: >- Processors are used to reduce the number of fields in the exported event or to enhance the event with metadata. This executes in the agent before the logs are parsed. See [Processors](https://www.elastic.co/guide/en/beats/filebeat/current/filtering-and-enhancing-data.html) for details. - diff --git a/packages/m365_defender/data_stream/log/sample_event.json b/packages/m365_defender/data_stream/log/sample_event.json index 9eca01a1e9e..c8d3080815e 100644 --- a/packages/m365_defender/data_stream/log/sample_event.json +++ b/packages/m365_defender/data_stream/log/sample_event.json @@ -1,11 +1,12 @@ { "@timestamp": "2020-09-06T12:07:55.32Z", "agent": { - "ephemeral_id": "c642e33c-9a0b-4d7b-8be4-0baa5bbbb9c5", - "id": "66ee0cf6-0f3a-4a85-bb44-eb9ba0cc0863", + "ephemeral_id": "84fcaec4-393b-441e-b877-04cd19bff659", + "hostname": "docker-fleet-agent", + "id": "d4b18182-9c85-4467-8583-920b19f205fa", "name": "docker-fleet-agent", "type": "filebeat", - "version": "8.1.0" + "version": "7.16.0" }, "cloud": { "provider": "azure" @@ -19,9 +20,9 @@ "version": "8.5.0" }, "elastic_agent": { - "id": "66ee0cf6-0f3a-4a85-bb44-eb9ba0cc0863", + "id": "d4b18182-9c85-4467-8583-920b19f205fa", "snapshot": false, - "version": "8.1.0" + "version": "7.16.0" }, "event": { "action": "InitialAccess", @@ -34,8 +35,9 @@ "duration": 0, "end": "2020-09-06T12:04:00Z", "id": "faf8edc936-85f8-a603-b800-08d8525cf099", - "ingested": "2022-05-17T07:46:27Z", + "ingested": "2022-11-07T09:56:43Z", "kind": "alert", + "original": "{\"alerts\":{\"actorName\":null,\"alertId\":\"faf8edc936-85f8-a603-b800-08d8525cf099\",\"assignedTo\":\"Automation\",\"category\":\"InitialAccess\",\"classification\":null,\"creationTime\":\"2020-09-06T12:07:54.3716642Z\",\"description\":\"This alert is triggered when any email message is reported as malware or phish by users -V1.0.0.2\",\"detectionSource\":\"OfficeATP\",\"determination\":null,\"devices\":[],\"entities\":{\"aadUserId\":null,\"accountName\":null,\"clusterBy\":null,\"deliveryAction\":null,\"deviceId\":null,\"domainName\":null,\"entityType\":\"MailBox\",\"fileName\":null,\"filePath\":null,\"ipAddress\":null,\"mailboxAddress\":\"testUser3@contoso.com\",\"mailboxDisplayName\":\"test User3\",\"parentProcessCreationTime\":null,\"parentProcessId\":null,\"processCommandLine\":null,\"processCreationTime\":null,\"processId\":null,\"recipient\":null,\"registryHive\":null,\"registryKey\":null,\"registryValue\":null,\"registryValueType\":null,\"securityGroupId\":null,\"securityGroupName\":null,\"sender\":null,\"sha1\":null,\"sha256\":null,\"subject\":null,\"url\":null,\"userPrincipalName\":\"testUser3@contoso.com\",\"userSid\":null},\"firstActivity\":\"2020-09-06T12:04:00Z\",\"incidentId\":924518,\"investigationId\":null,\"investigationState\":\"Queued\",\"lastActivity\":\"2020-09-06T12:04:00Z\",\"lastUpdatedTime\":\"2020-09-06T12:37:40.88Z\",\"mitreTechniques\":[],\"resolvedTime\":null,\"serviceSource\":\"OfficeATP\",\"severity\":\"Informational\",\"status\":\"InProgress\",\"threatFamilyName\":null,\"title\":\"Email reported by user as malware or phish\"},\"assignedTo\":null,\"classification\":\"Unknown\",\"comments\":[],\"createdTime\":\"2020-09-06T12:07:55.1366667Z\",\"determination\":\"NotAvailable\",\"incidentId\":924518,\"incidentName\":\"Email reported by user as malware or phish\",\"lastUpdateTime\":\"2020-09-06T12:07:55.32Z\",\"redirectIncidentId\":null,\"severity\":\"Informational\",\"status\":\"Active\",\"tags\":[]}", "provider": "OfficeATP", "severity": 1, "start": "2020-09-06T12:04:00Z", @@ -87,6 +89,7 @@ "description": "This alert is triggered when any email message is reported as malware or phish by users -V1.0.0.2" }, "tags": [ + "preserve_original_event", "m365_defender", "forwarded" ], diff --git a/packages/m365_defender/docs/README.md b/packages/m365_defender/docs/README.md index 3a396e79e69..a7cfd0248ab 100644 --- a/packages/m365_defender/docs/README.md +++ b/packages/m365_defender/docs/README.md @@ -1,24 +1,674 @@ # M365 Defender integration -This integration is for M365 Defender logs, previously known as Threat Protection. +## Overview -## Configuration +The [Microsoft 365 Defender](https://learn.microsoft.com/en-us/microsoft-365/security/defender) integration allows you to monitor Incident Logs. Microsoft 365 Defender is a unified pre and post-breach enterprise defense suite that natively coordinates detection, prevention, investigation, and response across endpoints, identities, email, and applications to provide integrated protection against sophisticated attacks. -To configure access for Elastic Agent to communicate with Microsoft 365 Defender you will have to create a new Azure Application registration, this will again return OAuth tokens with access to the Microsoft 365 Defender API. +Use the Microsoft 365 Defender integration to collect and parse data from the Microsoft Graph Security Beta REST API and Microsoft 365 Defender API. Then visualise that data in Kibana. -The procedure to create an application is found on the below link: +For example, you could use the data from this integration to consolidate and correlate security alerts from multiple sources. Also, by looking into the alert and incident, a user can take an appropriate action in the Microsoft 365 Defender Portal. -[Create a new Azure Application](https://docs.microsoft.com/en-us/microsoft-365/security/mtp/api-create-app-web?view=o365-worldwide#create-an-app) +## Data streams -When giving the application the API permissions described in the documentation (Incident.Read.All) it will only grant access to read Incidents from 365 Defender and nothing else in the Azure Domain. +The Microsoft 365 Defender integration collects logs for two types of events: Incident and Log. -After the application has been created, it should contain 3 values that you need to apply to the module configuration. +**Incident** in Microsoft 365 Defender is a collection of correlated alert instances and associated metadata that reflects the story of an attack in a tenant. It uses the Microsoft Graph Security Beta REST API to collect data. See Example Schema [here](https://learn.microsoft.com/en-us/graph/api/resources/security-incident?view=graph-rest-beta#properties). -These values are: +**Log** incidents API allows you to sort through incidents to create an informed cybersecurity response. It exposes a collection of incidents that were flagged in your network, within the time range you specified in your environmental retention policy. The most recent incidents are displayed at the top of the list. Each incident contains an array of related alerts and their related entities. It uses the Microsoft 365 Defender API to collect data. See Example Schema [here](https://learn.microsoft.com/en-us/microsoft-365/security/defender/api-list-incidents?view=o365-worldwide#schema-mapping). -- Client ID -- Client Secret -- Tenant ID +## Requirements + +You need Elasticsearch for storing and searching your data and Kibana for visualizing and managing it. You can use our hosted Elasticsearch Service on Elastic Cloud, which is recommended, or self-manage the Elastic Stack on your own hardware. + +This module has used **Microsoft Graph Security Beta REST API** and **Microsoft 365 Defender API**. + +## Setup + +### To collect data from Microsoft Graph Security Beta REST API, follow the below steps: + +1. [Register a new Azure Application](https://learn.microsoft.com/en-us/graph/auth-register-app-v2?view=graph-rest-beta). +2. Permission required for accessing Incident API would be **SecurityIncident.Read.All**. See more details [here](https://learn.microsoft.com/en-us/graph/auth-v2-service?view=graph-rest-beta) +3. After the application has been created, it will generate Client ID, Client Secret and Tenant ID values that are required for alert and incident data collection. + +### To collect data from Microsoft 365 Defender REST API, follow the below steps: + +1. [Register a new Azure Application](https://learn.microsoft.com/en-us/microsoft-365/security/defender/api-create-app-web?view=o365-worldwide#create-an-app). +2. Permission required for accessing Log API would be **Incident.Read.All**. +3. After the application has been created, it will generate Client ID, Client Secret and Tenant ID values that are required for log data collection. + +## Logs reference + +### incident + +This is the `incident` dataset. + +#### Example + +An example event for `incident` looks as following: + +```json +{ + "@timestamp": "2021-09-30T09:35:45.113Z", + "agent": { + "ephemeral_id": "431a43cb-a982-48fb-9834-1f92b2b03dc7", + "hostname": "docker-fleet-agent", + "id": "d4b18182-9c85-4467-8583-920b19f205fa", + "name": "docker-fleet-agent", + "type": "filebeat", + "version": "7.16.0" + }, + "cloud": { + "account": { + "id": "b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c" + }, + "provider": [ + "azure" + ] + }, + "data_stream": { + "dataset": "m365_defender.incident", + "namespace": "ep", + "type": "logs" + }, + "ecs": { + "version": "8.5.0" + }, + "elastic_agent": { + "id": "d4b18182-9c85-4467-8583-920b19f205fa", + "snapshot": false, + "version": "7.16.0" + }, + "event": { + "action": [ + "detected" + ], + "agent_id_status": "verified", + "created": "2021-08-13T08:43:35.553Z", + "dataset": "m365_defender.incident", + "id": "2972395", + "ingested": "2022-11-07T09:55:14Z", + "kind": "event", + "original": "{\"@odata.type\":\"#microsoft.graph.security.incident\",\"alerts\":{\"@odata.type\":\"#microsoft.graph.security.alert\",\"actorDisplayName\":null,\"alertWebUrl\":\"https://security.microsoft.com/alerts/da637551227677560813_-961444813?tid=b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c\",\"assignedTo\":null,\"category\":\"DefenseEvasion\",\"classification\":\"unknown\",\"comments\":[],\"createdDateTime\":\"2021-04-27T12:19:27.7211305Z\",\"description\":\"A hidden file has been launched. This activity could indicate a compromised host. Attackers often hide files associated with malicious tools to evade file system inspection and defenses.\",\"detectionSource\":\"antivirus\",\"detectorId\":\"e0da400f-affd-43ef-b1d5-afc2eb6f2756\",\"determination\":\"unknown\",\"evidence\":[{\"@odata.type\":\"#microsoft.graph.security.deviceEvidence\",\"azureAdDeviceId\":null,\"createdDateTime\":\"2021-04-27T12:19:27.7211305Z\",\"defenderAvStatus\":\"unknown\",\"deviceDnsName\":\"tempDns\",\"firstSeenDateTime\":\"2020-09-12T07:28:32.4321753Z\",\"healthStatus\":\"active\",\"loggedOnUsers\":[],\"mdeDeviceId\":\"73e7e2de709dff64ef64b1d0c30e67fab63279db\",\"onboardingStatus\":\"onboarded\",\"osBuild\":22424,\"osPlatform\":\"Windows10\",\"rbacGroupId\":75,\"rbacGroupName\":\"UnassignedGroup\",\"remediationStatus\":\"none\",\"remediationStatusDetails\":null,\"riskScore\":\"medium\",\"roles\":[\"compromised\"],\"tags\":[\"Test Machine\"],\"verdict\":\"unknown\",\"version\":\"Other\",\"vmMetadata\":{\"cloudProvider\":\"azure\",\"resourceId\":\"/subscriptions/8700d3a3-3bb7-4fbe-a090-488a1ad04161/resourceGroups/WdatpApi-EUS-STG/providers/Microsoft.Compute/virtualMachines/NirLaviTests\",\"subscriptionId\":\"8700d3a3-3bb7-4fbe-a090-488a1ad04161\",\"vmId\":\"ca1b0d41-5a3b-4d95-b48b-f220aed11d78\"}},{\"@odata.type\":\"#microsoft.graph.security.fileEvidence\",\"createdDateTime\":\"2021-04-27T12:19:27.7211305Z\",\"detectionStatus\":\"detected\",\"fileDetails\":{\"fileName\":\"MsSense.exe\",\"filePath\":\"C:\\\\Program Files\\\\temp\",\"filePublisher\":\"Microsoft Corporation\",\"fileSize\":6136392,\"issuer\":null,\"sha1\":\"5f1e8acedc065031aad553b710838eb366cfee9a\",\"sha256\":\"8963a19fb992ad9a76576c5638fd68292cffb9aaac29eb8285f9abf6196a7dec\",\"signer\":null},\"mdeDeviceId\":\"73e7e2de709dff64ef64b1d0c30e67fab63279db\",\"remediationStatus\":\"none\",\"remediationStatusDetails\":null,\"roles\":[],\"tags\":[],\"verdict\":\"unknown\"},{\"@odata.type\":\"#microsoft.graph.security.processEvidence\",\"createdDateTime\":\"2021-04-27T12:19:27.7211305Z\",\"detectionStatus\":\"detected\",\"imageFile\":{\"fileName\":\"MsSense.exe\",\"filePath\":\"C:\\\\Program Files\\\\temp\",\"filePublisher\":\"Microsoft Corporation\",\"fileSize\":6136392,\"issuer\":null,\"sha1\":\"5f1e8acedc065031aad553b710838eb366cfee9a\",\"sha256\":\"8963a19fb992ad9a76576c5638fd68292cffb9aaac29eb8285f9abf6196a7dec\",\"signer\":null},\"mdeDeviceId\":\"73e7e2de709dff64ef64b1d0c30e67fab63279db\",\"parentProcessCreationDateTime\":\"2021-08-12T07:39:09.0909239Z\",\"parentProcessId\":668,\"parentProcessImageFile\":{\"fileName\":\"services.exe\",\"filePath\":\"C:\\\\Windows\\\\System32\",\"filePublisher\":\"Microsoft Corporation\",\"fileSize\":731744,\"issuer\":null,\"sha1\":null,\"sha256\":null,\"signer\":null},\"processCommandLine\":\"\\\"MsSense.exe\\\"\",\"processCreationDateTime\":\"2021-08-12T12:43:19.0772577Z\",\"processId\":4780,\"remediationStatus\":\"none\",\"remediationStatusDetails\":null,\"roles\":[],\"tags\":[],\"userAccount\":{\"accountName\":\"SYSTEM\",\"azureAdUserId\":null,\"domainName\":\"NT AUTHORITY\",\"userPrincipalName\":null,\"userSid\":\"S-1-5-18\"},\"verdict\":\"unknown\"},{\"@odata.type\":\"#microsoft.graph.security.registryKeyEvidence\",\"createdDateTime\":\"2021-04-27T12:19:27.7211305Z\",\"registryHive\":\"HKEY_LOCAL_MACHINE\",\"registryKey\":\"SYSTEM\\\\CONTROLSET001\\\\CONTROL\\\\WMI\\\\AUTOLOGGER\\\\SENSEAUDITLOGGER\",\"remediationStatus\":\"none\",\"remediationStatusDetails\":null,\"roles\":[],\"tags\":[],\"verdict\":\"unknown\"}],\"firstActivityDateTime\":\"2021-04-26T07:45:50.116Z\",\"id\":\"da637551227677560813_-961444813\",\"incidentId\":\"28282\",\"incidentWebUrl\":\"https://security.microsoft.com/incidents/28282?tid=b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c\",\"lastActivityDateTime\":\"2021-05-02T07:56:58.222Z\",\"lastUpdateDateTime\":\"2021-05-02T14:19:01.3266667Z\",\"mitreTechniques\":[\"T1564.001\"],\"providerAlertId\":\"da637551227677560813_-961444813\",\"recommendedActions\":\"Collect artifacts and determine scope\\n�\\tReview the machine timeline for suspicious activities that may have occurred before and after the time of the alert, and record additional related artifacts (files, IPs/URLs) \\n�\\tLook for the presence of relevant artifacts on other systems. Identify commonalities and differences between potentially compromised systems.\\n�\\tSubmit relevant files for deep analysis and review resulting detailed behavioral information.\\n�\\tSubmit undetected files to the MMPC malware portal\\n\\nInitiate containment \\u0026 mitigation \\n�\\tContact the user to verify intent and initiate local remediation actions as needed.\\n�\\tUpdate AV signatures and run a full scan. The scan might reveal and remove previously-undetected malware components.\\n�\\tEnsure that the machine has the latest security updates. In particular, ensure that you have installed the latest software, web browser, and Operating System versions.\\n�\\tIf credential theft is suspected, reset all relevant users passwords.\\n�\\tBlock communication with relevant URLs or IPs at the organization�s perimeter.\",\"resolvedDateTime\":null,\"serviceSource\":\"microsoftDefenderForEndpoint\",\"severity\":\"low\",\"status\":\"new\",\"tenantId\":\"b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c\",\"threatDisplayName\":null,\"threatFamilyName\":null,\"title\":\"Suspicious execution of hidden file\"},\"assignedTo\":\"KaiC@contoso.onmicrosoft.com\",\"classification\":\"truePositive\",\"comments\":[{\"comment\":\"Demo incident\",\"createdBy\":\"DavidS@contoso.onmicrosoft.com\",\"createdTime\":\"2021-09-30T12:07:37.2756993Z\"}],\"createdDateTime\":\"2021-08-13T08:43:35.5533333Z\",\"determination\":\"multiStagedAttack\",\"displayName\":\"Multi-stage incident involving Initial access \\u0026 Command and control on multiple endpoints reported by multiple sources\",\"id\":\"2972395\",\"incidentWebUrl\":\"https://security.microsoft.com/incidents/2972395?tid=12f988bf-16f1-11af-11ab-1d7cd011db47\",\"lastUpdateDateTime\":\"2021-09-30T09:35:45.1133333Z\",\"redirectIncidentId\":null,\"severity\":\"medium\",\"status\":\"active\",\"tags\":[\"Demo\"],\"tenantId\":\"b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c\"}", + "provider": "microsoftDefenderForEndpoint", + "severity": 3, + "url": "https://security.microsoft.com/incidents/2972395?tid=12f988bf-16f1-11af-11ab-1d7cd011db47" + }, + "file": { + "hash": { + "sha1": [ + "5f1e8acedc065031aad553b710838eb366cfee9a" + ], + "sha256": [ + "8963a19fb992ad9a76576c5638fd68292cffb9aaac29eb8285f9abf6196a7dec" + ] + }, + "name": [ + "MsSense.exe" + ], + "path": [ + "C:\\Program Files\\temp" + ], + "size": [ + 6136392 + ] + }, + "host": { + "id": [ + "73e7e2de709dff64ef64b1d0c30e67fab63279db" + ], + "os": { + "name": [ + "Windows10" + ], + "version": [ + "Other" + ] + } + }, + "input": { + "type": "httpjson" + }, + "m365_defender": { + "incident": { + "alert": { + "alert_web_url": { + "domain": "security.microsoft.com", + "original": "https://security.microsoft.com/alerts/da637551227677560813_-961444813?tid=b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c", + "path": "/alerts/da637551227677560813_-961444813", + "query": "tid=b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c", + "scheme": "https" + }, + "category": "DefenseEvasion", + "classification": "unknown", + "created_datetime": "2021-04-27T12:19:27.721Z", + "description": "A hidden file has been launched. This activity could indicate a compromised host. Attackers often hide files associated with malicious tools to evade file system inspection and defenses.", + "detection_source": "antivirus", + "detector_id": "e0da400f-affd-43ef-b1d5-afc2eb6f2756", + "determination": "unknown", + "evidence": [ + { + "created_datetime": "2021-04-27T12:19:27.721Z", + "defender_av_status": "unknown", + "device_dns_name": "tempDns", + "first_seen_datetime": "2020-09-12T07:28:32.432Z", + "health_status": "active", + "mde_device_id": "73e7e2de709dff64ef64b1d0c30e67fab63279db", + "odata_type": "#microsoft.graph.security.deviceEvidence", + "onboarding_status": "onboarded", + "os_build": "22424", + "os_platform": "Windows10", + "rbac_group": { + "id": "75", + "name": "UnassignedGroup" + }, + "remediation_status": "none", + "risk_score": "medium", + "roles": [ + "compromised" + ], + "tags": [ + "Test Machine" + ], + "verdict": "unknown", + "version": "Other", + "vm_metadata": { + "cloud_provider": "azure", + "resource_id": "/subscriptions/8700d3a3-3bb7-4fbe-a090-488a1ad04161/resourceGroups/WdatpApi-EUS-STG/providers/Microsoft.Compute/virtualMachines/NirLaviTests", + "subscription_id": "8700d3a3-3bb7-4fbe-a090-488a1ad04161", + "vm_id": "ca1b0d41-5a3b-4d95-b48b-f220aed11d78" + } + }, + { + "created_datetime": "2021-04-27T12:19:27.721Z", + "detection_status": "detected", + "file_details": { + "name": "MsSense.exe", + "path": "C:\\Program Files\\temp", + "publisher": "Microsoft Corporation", + "sha1": "5f1e8acedc065031aad553b710838eb366cfee9a", + "sha256": "8963a19fb992ad9a76576c5638fd68292cffb9aaac29eb8285f9abf6196a7dec", + "size": 6136392 + }, + "mde_device_id": "73e7e2de709dff64ef64b1d0c30e67fab63279db", + "odata_type": "#microsoft.graph.security.fileEvidence", + "remediation_status": "none", + "verdict": "unknown" + }, + { + "created_datetime": "2021-04-27T12:19:27.721Z", + "detection_status": "detected", + "image_file": { + "name": "MsSense.exe", + "path": "C:\\Program Files\\temp", + "publisher": "Microsoft Corporation", + "sha1": "5f1e8acedc065031aad553b710838eb366cfee9a", + "sha256": "8963a19fb992ad9a76576c5638fd68292cffb9aaac29eb8285f9abf6196a7dec", + "size": 6136392 + }, + "mde_device_id": "73e7e2de709dff64ef64b1d0c30e67fab63279db", + "odata_type": "#microsoft.graph.security.processEvidence", + "parent_process": { + "creation_datetime": "2021-08-12T07:39:09.090Z", + "id": 668, + "image_file": { + "name": "services.exe", + "path": "C:\\Windows\\System32", + "publisher": "Microsoft Corporation", + "size": 731744 + } + }, + "process": { + "command_line": "\"MsSense.exe\"", + "creation_datetime": "2021-08-12T12:43:19.077Z", + "id": 4780 + }, + "remediation_status": "none", + "user_account": { + "account_name": "SYSTEM", + "domain_name": "NT AUTHORITY", + "user_sid": "S-1-5-18" + }, + "verdict": "unknown" + }, + { + "created_datetime": "2021-04-27T12:19:27.721Z", + "odata_type": "#microsoft.graph.security.registryKeyEvidence", + "registry_hive": "HKEY_LOCAL_MACHINE", + "registry_key": "SYSTEM\\CONTROLSET001\\CONTROL\\WMI\\AUTOLOGGER\\SENSEAUDITLOGGER", + "remediation_status": "none", + "verdict": "unknown" + } + ], + "first_activity_datetime": "2021-04-26T07:45:50.116Z", + "id": "da637551227677560813_-961444813", + "incident_id": "28282", + "incident_web_url": { + "domain": "security.microsoft.com", + "original": "https://security.microsoft.com/incidents/28282?tid=b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c", + "path": "/incidents/28282", + "query": "tid=b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c", + "scheme": "https" + }, + "last_activity_datetime": "2021-05-02T07:56:58.222Z", + "last_update_datetime": "2021-05-02T14:19:01.326Z", + "mitre_techniques": [ + "T1564.001" + ], + "provider_alert_id": "da637551227677560813_-961444813", + "recommended_actions": "Collect artifacts and determine scope\n�\tReview the machine timeline for suspicious activities that may have occurred before and after the time of the alert, and record additional related artifacts (files, IPs/URLs) \n�\tLook for the presence of relevant artifacts on other systems. Identify commonalities and differences between potentially compromised systems.\n�\tSubmit relevant files for deep analysis and review resulting detailed behavioral information.\n�\tSubmit undetected files to the MMPC malware portal\n\nInitiate containment \u0026 mitigation \n�\tContact the user to verify intent and initiate local remediation actions as needed.\n�\tUpdate AV signatures and run a full scan. The scan might reveal and remove previously-undetected malware components.\n�\tEnsure that the machine has the latest security updates. In particular, ensure that you have installed the latest software, web browser, and Operating System versions.\n�\tIf credential theft is suspected, reset all relevant users passwords.\n�\tBlock communication with relevant URLs or IPs at the organization�s perimeter.", + "service_source": "microsoftDefenderForEndpoint", + "severity": "low", + "status": "new", + "tenant_id": "b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c", + "title": "Suspicious execution of hidden file" + }, + "assigned_to": "KaiC@contoso.onmicrosoft.com", + "classification": "truePositive", + "comments": [ + { + "comment": "Demo incident", + "createdBy": "DavidS@contoso.onmicrosoft.com", + "createdTime": "2021-09-30T12:07:37.2756993Z" + } + ], + "created_datetime": "2021-08-13T08:43:35.553Z", + "determination": "multiStagedAttack", + "display_name": "Multi-stage incident involving Initial access \u0026 Command and control on multiple endpoints reported by multiple sources", + "id": "2972395", + "last_update_datetime": "2021-09-30T09:35:45.113Z", + "odata_type": "#microsoft.graph.security.incident", + "severity": "medium", + "status": "active", + "tags": [ + "Demo" + ], + "tenant_id": "b3c1b5fc-828c-45fa-a1e1-10d74f6d6e9c", + "web_url": { + "domain": "security.microsoft.com", + "original": "https://security.microsoft.com/incidents/2972395?tid=12f988bf-16f1-11af-11ab-1d7cd011db47", + "path": "/incidents/2972395", + "query": "tid=12f988bf-16f1-11af-11ab-1d7cd011db47", + "scheme": "https" + } + } + }, + "message": "Multi-stage incident involving Initial access \u0026 Command and control on multiple endpoints reported by multiple sources", + "process": { + "command_line": [ + "\"MsSense.exe\"" + ], + "hash": { + "sha1": [ + "5f1e8acedc065031aad553b710838eb366cfee9a" + ], + "sha256": [ + "8963a19fb992ad9a76576c5638fd68292cffb9aaac29eb8285f9abf6196a7dec" + ] + }, + "parent": { + "pid": [ + 668 + ], + "start": [ + "2021-08-12T07:39:09.090Z" + ] + }, + "pid": [ + 4780 + ], + "start": [ + "2021-08-12T12:43:19.077Z" + ], + "user": { + "name": [ + "SYSTEM" + ] + } + }, + "registry": { + "hive": [ + "HKEY_LOCAL_MACHINE" + ], + "key": [ + "SYSTEM\\CONTROLSET001\\CONTROL\\WMI\\AUTOLOGGER\\SENSEAUDITLOGGER" + ] + }, + "related": { + "hash": [ + "5f1e8acedc065031aad553b710838eb366cfee9a", + "8963a19fb992ad9a76576c5638fd68292cffb9aaac29eb8285f9abf6196a7dec" + ], + "hosts": [ + "tempDns", + "NT AUTHORITY" + ], + "user": [ + "KaiC@contoso.onmicrosoft.com", + "DavidS@contoso.onmicrosoft.com", + "SYSTEM", + "S-1-5-18" + ] + }, + "source": { + "user": { + "name": "KaiC@contoso.onmicrosoft.com" + } + }, + "tags": [ + "preserve_original_event", + "preserve_duplicate_custom_fields", + "forwarded", + "m365_defender-incident" + ], + "threat": { + "tactic": { + "name": [ + "DefenseEvasion" + ] + }, + "technique": { + "subtechnique": { + "id": [ + "T1564.001" + ] + } + } + } +} +``` + +**Exported fields** + +| Field | Description | Type | +|---|---|---| +| @timestamp | Event timestamp. | date | +| cloud.account.id | The cloud account or organization id used to identify different entities in a multi-tenant environment. Examples: AWS account id, Google Cloud ORG Id, or other unique identifier. | keyword | +| cloud.availability_zone | Availability zone in which this host is running. | keyword | +| cloud.image.id | Image ID for the cloud instance. | keyword | +| cloud.instance.id | Instance ID of the host machine. | keyword | +| cloud.instance.name | Instance name of the host machine. | keyword | +| cloud.machine.type | Machine type of the host machine. | keyword | +| cloud.project.id | Name of the project in Google Cloud. | keyword | +| cloud.provider | Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean. | keyword | +| cloud.region | Region in which this host is running. | keyword | +| container.id | Unique container id. | keyword | +| container.image.name | Name of the image the container was built on. | keyword | +| container.labels | Image labels. | object | +| container.name | Container name. | keyword | +| data_stream.dataset | Data stream dataset. | constant_keyword | +| data_stream.namespace | Data stream namespace. | constant_keyword | +| data_stream.type | Data stream type. | constant_keyword | +| ecs.version | ECS version this event conforms to. `ecs.version` is a required field and must exist in all events. When querying across multiple indices -- which may conform to slightly different ECS versions -- this field lets integrations adjust to the schema version of the events. | keyword | +| email.delivery_timestamp | The date and time when the email message was received by the service or client. | date | +| email.direction | The direction of the message based on the sending and receiving domains. | keyword | +| email.from.address | The email address of the sender, typically from the RFC 5322 `From:` header field. | keyword | +| email.subject | A brief summary of the topic of the message. | keyword | +| email.subject.text | Multi-field of `email.subject`. | match_only_text | +| email.to.address | The email address of recipient | keyword | +| event.action | The action captured by the event. This describes the information in the event. It is more specific than `event.category`. Examples are `group-add`, `process-started`, `file-created`. The value is normally defined by the implementer. | keyword | +| event.category | This is one of four ECS Categorization Fields, and indicates the second level in the ECS category hierarchy. `event.category` represents the "big buckets" of ECS categories. For example, filtering on `event.category:process` yields all events relating to process activity. This field is closely related to `event.type`, which is used as a subcategory. This field is an array. This will allow proper categorization of some events that fall in multiple categories. | keyword | +| event.created | event.created contains the date/time when the event was first read by an agent, or by your pipeline. This field is distinct from @timestamp in that @timestamp typically contain the time extracted from the original event. In most situations, these two timestamps will be slightly different. The difference can be used to calculate the delay between your source generating an event, and the time when your agent first processed it. This can be used to monitor your agent's or pipeline's ability to keep up with your event source. In case the two timestamps are identical, @timestamp should be used. | date | +| event.dataset | Event dataset. | constant_keyword | +| event.id | Unique ID to describe the event. | keyword | +| event.kind | This is one of four ECS Categorization Fields, and indicates the highest level in the ECS category hierarchy. `event.kind` gives high-level information about what type of information the event contains, without being specific to the contents of the event. For example, values of this field distinguish alert events from metric events. The value of this field can be used to inform how these kinds of events should be handled. They may warrant different retention, different access control, it may also help understand whether the data coming in at a regular interval or not. | keyword | +| event.module | Event module. | constant_keyword | +| event.original | Raw text message of entire event. Used to demonstrate log integrity or where the full log message (before splitting it up in multiple parts) may be required, e.g. for reindex. This field is not indexed and doc_values are disabled. It cannot be searched, but it can be retrieved from `_source`. If users wish to override this and index this field, please see `Field data types` in the `Elasticsearch Reference`. | keyword | +| event.provider | Source of the event. Event transports such as Syslog or the Windows Event Log typically mention the source of an event. It can be the name of the software that generated the event (e.g. Sysmon, httpd), or of a subsystem of the operating system (kernel, Microsoft-Windows-Security-Auditing). | keyword | +| event.severity | The numeric severity of the event according to your event source. What the different severity values mean can be different between sources and use cases. It's up to the implementer to make sure severities are consistent across events from the same source. The Syslog severity belongs in `log.syslog.severity.code`. `event.severity` is meant to represent the severity according to the event source (e.g. firewall, IDS). If the event source does not publish its own severity, you may optionally copy the `log.syslog.severity.code` to `event.severity`. | long | +| event.type | This is one of four ECS Categorization Fields, and indicates the third level in the ECS category hierarchy. `event.type` represents a categorization "sub-bucket" that, when used along with the `event.category` field values, enables filtering events down to a level appropriate for single visualization. This field is an array. This will allow proper categorization of some events that fall in multiple event types. | keyword | +| event.url | URL linking to an external system to continue investigation of this event. This URL links to another system where in-depth investigation of the specific occurrence of this event can take place. Alert events, indicated by `event.kind:alert`, are a common use case for this field. | keyword | +| file.hash.sha1 | SHA1 hash. | keyword | +| file.hash.sha256 | SHA256 hash. | keyword | +| file.name | Name of the file including the extension, without the directory. | keyword | +| file.path | Full path to the file, including the file name. It should include the drive letter, when appropriate. | keyword | +| file.path.text | Multi-field of `file.path`. | match_only_text | +| file.size | File size in bytes. Only relevant when `file.type` is "file". | long | +| group.id | Unique identifier for the group on the system/platform. | keyword | +| group.name | Name of the group. | keyword | +| host.architecture | Operating system architecture. | keyword | +| host.containerized | If the host is a container. | boolean | +| host.domain | Name of the domain of which the host is a member. For example, on Windows this could be the host's Active Directory domain or NetBIOS domain name. For Linux this could be the domain of the host's LDAP provider. | keyword | +| host.hostname | Hostname of the host. It normally contains what the `hostname` command returns on the host machine. | keyword | +| host.id | Unique host id. As hostname is not always unique, use values that are meaningful in your environment. Example: The current usage of `beat.name`. | keyword | +| host.ip | Host ip addresses. | ip | +| host.mac | Host mac addresses. | keyword | +| host.name | Name of the host. It can contain what `hostname` returns on Unix systems, the fully qualified domain name, or a name specified by the user. The sender decides which value to use. | keyword | +| host.os.build | OS build information. | keyword | +| host.os.codename | OS codename, if any. | keyword | +| host.os.family | OS family (such as redhat, debian, freebsd, windows). | keyword | +| host.os.kernel | Operating system kernel version as a raw string. | keyword | +| host.os.name | Operating system name, without the version. | keyword | +| host.os.name.text | Multi-field of `host.os.name`. | text | +| host.os.platform | Operating system platform (such centos, ubuntu, windows). | keyword | +| host.os.version | Operating system version as a raw string. | keyword | +| host.type | Type of host. For Cloud providers this can be the machine type like `t2.medium`. If vm, this could be the container, for example, or other information meaningful in your environment. | keyword | +| input.type | Input type | keyword | +| log.offset | Log offset | long | +| m365_defender.incident.alert.actor_display_name | The adversary or activity group that is associated with this alert. | keyword | +| m365_defender.incident.alert.alert_web_url.domain | | keyword | +| m365_defender.incident.alert.alert_web_url.extension | | keyword | +| m365_defender.incident.alert.alert_web_url.fragment | | keyword | +| m365_defender.incident.alert.alert_web_url.full | | keyword | +| m365_defender.incident.alert.alert_web_url.original | | keyword | +| m365_defender.incident.alert.alert_web_url.password | | keyword | +| m365_defender.incident.alert.alert_web_url.path | | keyword | +| m365_defender.incident.alert.alert_web_url.port | | long | +| m365_defender.incident.alert.alert_web_url.query | | keyword | +| m365_defender.incident.alert.alert_web_url.scheme | | keyword | +| m365_defender.incident.alert.alert_web_url.username | | keyword | +| m365_defender.incident.alert.assigned_to | Owner of the alert, or null if no owner is assigned. | keyword | +| m365_defender.incident.alert.category | The attack kill-chain category that the alert belongs to. Aligned with the MITRE ATT&CK framework. | keyword | +| m365_defender.incident.alert.classification | Specifies whether the alert represents a true threat. Possible values are: unknown, falsePositive, truePositive, benignPositive, unknownFutureValue. | keyword | +| m365_defender.incident.alert.comments | Array of comments created by the Security Operations (SecOps) team during the alert management process. | flattened | +| m365_defender.incident.alert.created_datetime | Time when Microsoft 365 Defender created the alert. | date | +| m365_defender.incident.alert.description | String value describing each alert. | keyword | +| m365_defender.incident.alert.detection_source | Detection technology or sensor that identified the notable component or activity. | keyword | +| m365_defender.incident.alert.detector_id | The ID of the detector that triggered the alert. | keyword | +| m365_defender.incident.alert.determination | Specifies the result of the investigation, whether the alert represents a true attack and if so, the nature of the attack. Possible values are: unknown, apt, malware, securityPersonnel, securityTesting, unwantedSoftware, other, multiStagedAttack, compromisedUser, phishing, maliciousUserActivity, clean, insufficientData, confirmedUserActivity, lineOfBusinessApplication, unknownFutureValue. | keyword | +| m365_defender.incident.alert.evidence.antispam_direction | Direction of the email relative to your network. The possible values are: Inbound, Outbound or Intraorg. | keyword | +| m365_defender.incident.alert.evidence.app_id | Unique identifier of the application. | keyword | +| m365_defender.incident.alert.evidence.attachments_count | Number of attachments in the email. | long | +| m365_defender.incident.alert.evidence.azure_ad_device_id | A unique identifier assigned to a device by Azure Active Directory (Azure AD) when device is Azure AD-joined. | keyword | +| m365_defender.incident.alert.evidence.cluster_by | The clustering logic of the emails inside the cluster. | keyword | +| m365_defender.incident.alert.evidence.cluster_by_value | The value utilized to cluster the similar emails. | keyword | +| m365_defender.incident.alert.evidence.created_datetime | The time the evidence was created and added to the alert. | date | +| m365_defender.incident.alert.evidence.defender_av_status | State of the Defender AntiMalware engine. The possible values are: notReporting, disabled, notUpdated, updated, unknown, notSupported, unknownFutureValue. | keyword | +| m365_defender.incident.alert.evidence.delivery_action | Delivery action of the email. The possible values are: Delivered, DeliveredAsSpam, Junked, Blocked, or Replaced. | keyword | +| m365_defender.incident.alert.evidence.delivery_location | Location where the email was delivered. The possible values are: Inbox, External, JunkFolder, Quarantine, Failed, Dropped, DeletedFolder or Forwarded. | keyword | +| m365_defender.incident.alert.evidence.detection_status | The status of the detection.The possible values are: detected, blocked, prevented, unknownFutureValue. | keyword | +| m365_defender.incident.alert.evidence.device_dns_name | The fully qualified domain name (FQDN) for the device. | keyword | +| m365_defender.incident.alert.evidence.display_name | Name of the application. | keyword | +| m365_defender.incident.alert.evidence.email_count | Count of emails in the email cluster. | long | +| m365_defender.incident.alert.evidence.file_details.issuer | The certificate authority (CA) that issued the certificate. | keyword | +| m365_defender.incident.alert.evidence.file_details.name | The name of the file. | keyword | +| m365_defender.incident.alert.evidence.file_details.odata_type | | keyword | +| m365_defender.incident.alert.evidence.file_details.path | The file path (location) of the file instance. | keyword | +| m365_defender.incident.alert.evidence.file_details.publisher | The publisher of the file. | keyword | +| m365_defender.incident.alert.evidence.file_details.sha1 | The Sha1 cryptographic hash of the file content. | keyword | +| m365_defender.incident.alert.evidence.file_details.sha256 | The Sha256 cryptographic hash of the file content. | keyword | +| m365_defender.incident.alert.evidence.file_details.signer | The signer of the signed file. | keyword | +| m365_defender.incident.alert.evidence.file_details.size | The size of the file in bytes. | long | +| m365_defender.incident.alert.evidence.first_seen_datetime | The date and time when the device was first seen. | date | +| m365_defender.incident.alert.evidence.health_status | The health state of the device.The possible values are: active, inactive, impairedCommunication, noSensorData, noSensorDataImpairedCommunication, unknown, unknownFutureValue. | keyword | +| m365_defender.incident.alert.evidence.image_file.issuer | The certificate authority (CA) that issued the certificate. | keyword | +| m365_defender.incident.alert.evidence.image_file.name | The name of the file. | keyword | +| m365_defender.incident.alert.evidence.image_file.odata_type | | keyword | +| m365_defender.incident.alert.evidence.image_file.path | The file path (location) of the file instance. | keyword | +| m365_defender.incident.alert.evidence.image_file.publisher | The publisher of the file. | keyword | +| m365_defender.incident.alert.evidence.image_file.sha1 | The Sha1 cryptographic hash of the file content. | keyword | +| m365_defender.incident.alert.evidence.image_file.sha256 | The Sha256 cryptographic hash of the file content. | keyword | +| m365_defender.incident.alert.evidence.image_file.signer | The signer of the signed file. | keyword | +| m365_defender.incident.alert.evidence.image_file.size | The size of the file in bytes. | long | +| m365_defender.incident.alert.evidence.instance_id | Identifier of the instance of the Software as a Service (SaaS) application. | keyword | +| m365_defender.incident.alert.evidence.instance_name | Name of the instance of the SaaS application. | keyword | +| m365_defender.incident.alert.evidence.internet_message_id | Public-facing identifier for the email that is set by the sending email system. | keyword | +| m365_defender.incident.alert.evidence.ip_address | The value of the IP Address, can be either in V4 address or V6 address format. | ip | +| m365_defender.incident.alert.evidence.language | Detected language of the email content. | keyword | +| m365_defender.incident.alert.evidence.logged_on_users.account_name | User account name of the logged-on user. | keyword | +| m365_defender.incident.alert.evidence.logged_on_users.domain_name | User account domain of the logged-on user. | keyword | +| m365_defender.incident.alert.evidence.logged_on_users.odata_type | | keyword | +| m365_defender.incident.alert.evidence.mde_device_id | A unique identifier assigned to a device by Microsoft Defender for Endpoint. | keyword | +| m365_defender.incident.alert.evidence.network_message_id | Unique identifier for the email, generated by Microsoft 365. | keyword | +| m365_defender.incident.alert.evidence.network_message_ids | Unique identifiers for the emails in the cluster, generated by Microsoft 365. | keyword | +| m365_defender.incident.alert.evidence.object_id | The unique identifier of the application object in Azure AD. | keyword | +| m365_defender.incident.alert.evidence.onboarding_status | The status of the machine onboarding to Microsoft Defender for Endpoint.The possible values are: insufficientInfo, onboarded, canBeOnboarded, unsupported, unknownFutureValue. | keyword | +| m365_defender.incident.alert.evidence.os_build | The build version for the operating system the device is running. | keyword | +| m365_defender.incident.alert.evidence.os_platform | The operating system platform the device is running. | keyword | +| m365_defender.incident.alert.evidence.p1_sender.display_name | The name of the sender. | keyword | +| m365_defender.incident.alert.evidence.p1_sender.domain_name | Sender domain. | keyword | +| m365_defender.incident.alert.evidence.p1_sender.email_address | Sender email address. | keyword | +| m365_defender.incident.alert.evidence.p1_sender.odata_type | | keyword | +| m365_defender.incident.alert.evidence.p2_sender.display_name | The name of the sender. | keyword | +| m365_defender.incident.alert.evidence.p2_sender.domain_name | Sender domain. | keyword | +| m365_defender.incident.alert.evidence.p2_sender.email_address | Sender email address. | keyword | +| m365_defender.incident.alert.evidence.p2_sender.odata_type | | keyword | +| m365_defender.incident.alert.evidence.parent_process.creation_datetime | Date and time when the parent of the process was created. | date | +| m365_defender.incident.alert.evidence.parent_process.id | Process ID (PID) of the parent process that spawned the process. | long | +| m365_defender.incident.alert.evidence.parent_process.image_file.issuer | The certificate authority (CA) that issued the certificate. | keyword | +| m365_defender.incident.alert.evidence.parent_process.image_file.name | The name of the file. | keyword | +| m365_defender.incident.alert.evidence.parent_process.image_file.odata_type | | keyword | +| m365_defender.incident.alert.evidence.parent_process.image_file.path | The file path (location) of the file instance. | keyword | +| m365_defender.incident.alert.evidence.parent_process.image_file.publisher | The publisher of the file. | keyword | +| m365_defender.incident.alert.evidence.parent_process.image_file.sha1 | The Sha1 cryptographic hash of the file content. | keyword | +| m365_defender.incident.alert.evidence.parent_process.image_file.sha256 | The Sha256 cryptographic hash of the file content. | keyword | +| m365_defender.incident.alert.evidence.parent_process.image_file.signer | The signer of the signed file. | keyword | +| m365_defender.incident.alert.evidence.parent_process.image_file.size | The size of the file in bytes. | long | +| m365_defender.incident.alert.evidence.primary_address | The primary email address of the mailbox. | keyword | +| m365_defender.incident.alert.evidence.process.command_line | Command line used to create the new process. | keyword | +| m365_defender.incident.alert.evidence.process.creation_datetime | Date and time the process was created. | date | +| m365_defender.incident.alert.evidence.process.id | Process ID (PID) of the newly created process. | long | +| m365_defender.incident.alert.evidence.publisher | The name of the application publisher. | keyword | +| m365_defender.incident.alert.evidence.query | The query used to identify the email cluster. | keyword | +| m365_defender.incident.alert.evidence.rbac_group.id | The ID of the role-based access control (RBAC) device group. | keyword | +| m365_defender.incident.alert.evidence.rbac_group.name | The name of the RBAC device group. | keyword | +| m365_defender.incident.alert.evidence.received_datetime | Date and time when the email was received. | date | +| m365_defender.incident.alert.evidence.recipient_email_address | Email address of the recipient, or email address of the recipient after distribution list expansion. | keyword | +| m365_defender.incident.alert.evidence.registry_hive | Registry hive of the key that the recorded action was applied to. | keyword | +| m365_defender.incident.alert.evidence.registry_key | Registry key that the recorded action was applied to. | keyword | +| m365_defender.incident.alert.evidence.registry_value | Data of the registry value that the recorded action was applied to. | keyword | +| m365_defender.incident.alert.evidence.registry_value_name | Name of the registry value that the recorded action was applied to. | keyword | +| m365_defender.incident.alert.evidence.registry_value_type | Data type, such as binary or string, of the registry value that the recorded action was applied to. | keyword | +| m365_defender.incident.alert.evidence.remediation_status | Status of the remediation action taken. The possible values are: none, remediated, prevented, blocked, notFound, active, pendingApproval, declined, notRemediated, running, unknownFutureValue. | keyword | +| m365_defender.incident.alert.evidence.remediation_status_details | Details about the remediation status. | keyword | +| m365_defender.incident.alert.evidence.risk_score | Risk score as evaluated by Microsoft Defender for Endpoint. The possible values are: none, informational, low, medium, high, unknownFutureValue. | keyword | +| m365_defender.incident.alert.evidence.roles | The role/s that an evidence entity represents in an alert, e.g., an IP address that is associated with an attacker will have the evidence role "Attacker". | keyword | +| m365_defender.incident.alert.evidence.saas_app_id | The identifier of the SaaS application. | keyword | +| m365_defender.incident.alert.evidence.security_group_id | Unique identifier of the security group. | keyword | +| m365_defender.incident.alert.evidence.sender_ip | IP address of the last detected mail server that relayed the message. | ip | +| m365_defender.incident.alert.evidence.subject | Subject of the email. | keyword | +| m365_defender.incident.alert.evidence.tags | Array of custom tags associated with an evidence instance, for example to denote a group of devices, high value assets, etc. | keyword | +| m365_defender.incident.alert.evidence.threat_detection_methods | Collection of methods used to detect malware, phishing, or other threats found in the email. | keyword | +| m365_defender.incident.alert.evidence.threats | Collection of detection names for malware or other threats found. | keyword | +| m365_defender.incident.alert.evidence.type | | keyword | +| m365_defender.incident.alert.evidence.url | The Unique Resource Locator (URL). | keyword | +| m365_defender.incident.alert.evidence.url_count | Number of embedded URLs in the email. | long | +| m365_defender.incident.alert.evidence.urls | Collection of the URLs contained in this email. | keyword | +| m365_defender.incident.alert.evidence.urn | Uniform resource name (URN) of the automated investigation where the cluster was identified. | keyword | +| m365_defender.incident.alert.evidence.user_account.account_name | The user account's displayed name. | keyword | +| m365_defender.incident.alert.evidence.user_account.azure_ad_user_id | The user object identifier in Azure AD. | keyword | +| m365_defender.incident.alert.evidence.user_account.domain_name | The name of the Active Directory domain of which the user is a member. | keyword | +| m365_defender.incident.alert.evidence.user_account.odata_type | | keyword | +| m365_defender.incident.alert.evidence.user_account.user_principal_name | The user principal name of the account in Azure AD. | keyword | +| m365_defender.incident.alert.evidence.user_account.user_sid | The local security identifier of the user account. | keyword | +| m365_defender.incident.alert.evidence.verdict | The decision reached by automated investigation. The possible values are: unknown, suspicious, malicious, noThreatsFound, unknownFutureValue. | keyword | +| m365_defender.incident.alert.evidence.version | The version of the operating system platform. | keyword | +| m365_defender.incident.alert.evidence.vm_metadata.cloud_provider | The cloud provider hosting the virtual machine. The possible values are: unknown, azure, unknownFutureValue. | keyword | +| m365_defender.incident.alert.evidence.vm_metadata.odata_type | | keyword | +| m365_defender.incident.alert.evidence.vm_metadata.resource_id | Unique identifier of the Azure resource. | keyword | +| m365_defender.incident.alert.evidence.vm_metadata.subscription_id | Unique identifier of the Azure subscription the customer tenant belongs to. | keyword | +| m365_defender.incident.alert.evidence.vm_metadata.vm_id | Unique identifier of the virtual machine instance. | keyword | +| m365_defender.incident.alert.first_activity_datetime | The earliest activity associated with the alert. | date | +| m365_defender.incident.alert.id | Unique identifier to represent the alert resource. | keyword | +| m365_defender.incident.alert.incident_id | Unique identifier to represent the incident this alert resource is associated with. | keyword | +| m365_defender.incident.alert.incident_web_url.domain | | keyword | +| m365_defender.incident.alert.incident_web_url.extension | | keyword | +| m365_defender.incident.alert.incident_web_url.fragment | | keyword | +| m365_defender.incident.alert.incident_web_url.full | | keyword | +| m365_defender.incident.alert.incident_web_url.original | | keyword | +| m365_defender.incident.alert.incident_web_url.password | | keyword | +| m365_defender.incident.alert.incident_web_url.path | | keyword | +| m365_defender.incident.alert.incident_web_url.port | | long | +| m365_defender.incident.alert.incident_web_url.query | | keyword | +| m365_defender.incident.alert.incident_web_url.scheme | | keyword | +| m365_defender.incident.alert.incident_web_url.username | | keyword | +| m365_defender.incident.alert.last_activity_datetime | The oldest activity associated with the alert. | date | +| m365_defender.incident.alert.last_update_datetime | Time when the alert was last updated at Microsoft 365 Defender. | date | +| m365_defender.incident.alert.mitre_techniques | The attack techniques, as aligned with the MITRE ATT&CK framework. | keyword | +| m365_defender.incident.alert.provider_alert_id | The ID of the alert as it appears in the security provider product that generated the alert. | keyword | +| m365_defender.incident.alert.recommended_actions | Recommended response and remediation actions to take in the event this alert was generated. | keyword | +| m365_defender.incident.alert.resolved_datetime | Time when the alert was resolved. | date | +| m365_defender.incident.alert.service_source | The service or product that created this alert. Possible values are: microsoftDefenderForEndpoint, microsoftDefenderForIdentity, microsoftCloudAppSecurity, microsoftDefenderForOffice365, microsoft365Defender, aadIdentityProtection, appGovernance, dataLossPrevention. | keyword | +| m365_defender.incident.alert.severity | Indicates the possible impact on assets. The higher the severity the bigger the impact. Typically higher severity items require the most immediate attention. Possible values are: unknown, informational, low, medium, high, unknownFutureValue. | keyword | +| m365_defender.incident.alert.status | The status of the alert. Possible values are: new, inProgress, resolved, unknownFutureValue. | keyword | +| m365_defender.incident.alert.tenant_id | The Azure Active Directory tenant the alert was created in. | keyword | +| m365_defender.incident.alert.threat_display_name | The threat associated with this alert. | keyword | +| m365_defender.incident.alert.threat_family_name | Threat family associated with this alert. | keyword | +| m365_defender.incident.alert.title | Brief identifying string value describing the alert. | keyword | +| m365_defender.incident.assigned_to | Owner of the incident, or null if no owner is assigned. Free editable text. | keyword | +| m365_defender.incident.classification | The specification for the incident. Possible values are: unknown, falsePositive, truePositive, informationalExpectedActivity, unknownFutureValue. | keyword | +| m365_defender.incident.comments | Array of comments created by the Security Operations (SecOps) team when the incident is managed. | flattened | +| m365_defender.incident.created_datetime | Time when the incident was first created. | date | +| m365_defender.incident.determination | Specifies the determination of the incident. Possible values are: unknown, apt, malware, securityPersonnel, securityTesting, unwantedSoftware, other, multiStagedAttack, compromisedUser, phishing, maliciousUserActivity, clean, insufficientData, confirmedUserActivity, lineOfBusinessApplication, unknownFutureValue. | keyword | +| m365_defender.incident.display_name | The incident name. | keyword | +| m365_defender.incident.id | Unique identifier to represent the incident. | keyword | +| m365_defender.incident.last_update_datetime | Time when the incident was last updated. | date | +| m365_defender.incident.odata_type | | keyword | +| m365_defender.incident.redirect_incident_id | Only populated in case an incident is grouped together with another incident, as part of the logic that processes incidents. In such a case, the status property is redirected. | keyword | +| m365_defender.incident.severity | Indicates the possible impact on assets. The higher the severity, the bigger the impact. Typically higher severity items require the most immediate attention. Possible values are: unknown, informational, low, medium, high, unknownFutureValue. | keyword | +| m365_defender.incident.status | The status of the incident. Possible values are: active, resolved, redirected, unknownFutureValue. | keyword | +| m365_defender.incident.tags | Array of custom tags associated with an incident. | keyword | +| m365_defender.incident.tenant_id | The Azure Active Directory tenant in which the alert was created. | keyword | +| m365_defender.incident.web_url.domain | | keyword | +| m365_defender.incident.web_url.extension | | keyword | +| m365_defender.incident.web_url.fragment | | keyword | +| m365_defender.incident.web_url.full | | keyword | +| m365_defender.incident.web_url.original | | keyword | +| m365_defender.incident.web_url.password | | keyword | +| m365_defender.incident.web_url.path | | keyword | +| m365_defender.incident.web_url.port | | long | +| m365_defender.incident.web_url.query | | keyword | +| m365_defender.incident.web_url.scheme | | keyword | +| m365_defender.incident.web_url.username | | keyword | +| message | For log events the message field contains the log message, optimized for viewing in a log viewer. For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event. If multiple messages exist, they can be combined into one message. | match_only_text | +| process.command_line | Full command line that started the process, including the absolute path to the executable, and all arguments. Some arguments may be filtered to protect sensitive information. | wildcard | +| process.command_line.text | Multi-field of `process.command_line`. | match_only_text | +| process.hash.sha1 | SHA1 hash. | keyword | +| process.hash.sha256 | SHA256 hash. | keyword | +| process.parent.hash.sha1 | SHA1 hash. | keyword | +| process.parent.hash.sha256 | SHA256 hash. | keyword | +| process.parent.pid | Process id. | long | +| process.parent.start | The time the process started. | date | +| process.pid | Process id. | long | +| process.start | The time the process started. | date | +| process.user.id | Unique identifier of the user. | keyword | +| process.user.name | Short name or login of the user. | keyword | +| process.user.name.text | Multi-field of `process.user.name`. | match_only_text | +| registry.data.type | Standard registry type for encoding contents | keyword | +| registry.hive | Abbreviated name for the hive. | keyword | +| registry.key | Hive-relative path of keys. | keyword | +| registry.value | Name of the value written. | keyword | +| related.hash | All the hashes seen on your event. Populating this field, then using it to search for hashes can help in situations where you're unsure what the hash algorithm is (and therefore which key name to search). | keyword | +| related.hosts | All hostnames or other host identifiers seen on your event. Example identifiers include FQDNs, domain names, workstation names, or aliases. | keyword | +| related.ip | All of the IPs seen on your event. | ip | +| related.user | All the user names or other user identifiers seen on the event. | keyword | +| source.user.name | Short name or login of the user. | keyword | +| source.user.name.text | Multi-field of `source.user.name`. | match_only_text | +| tags | List of keywords used to tag each event. | keyword | +| threat.group.name | The name of the group for a set of related intrusion activity that are tracked by a common name in the security community. While not required, you can use a MITRE ATT&CK® group name. | keyword | +| threat.tactic.name | Name of the type of tactic used by this threat. You can use a MITRE ATT&CK® tactic, for example. (ex. https://attack.mitre.org/tactics/TA0002/) | keyword | +| threat.technique.subtechnique.id | The full id of subtechnique used by this threat. You can use a MITRE ATT&CK® subtechnique, for example. (ex. https://attack.mitre.org/techniques/T1059/001/) | keyword | +| user.domain | Name of the directory the user is a member of. For example, an LDAP or Active Directory domain name. | keyword | +| user.email | User email address. | keyword | +| user.id | Unique identifier of the user. | keyword | +| user.name | Short name or login of the user. | keyword | +| user.name.text | Multi-field of `user.name`. | match_only_text | + + +### log + +This is the `log` dataset. + +#### Example An example event for `log` looks as following: @@ -26,11 +676,12 @@ An example event for `log` looks as following: { "@timestamp": "2020-09-06T12:07:55.32Z", "agent": { - "ephemeral_id": "c642e33c-9a0b-4d7b-8be4-0baa5bbbb9c5", - "id": "66ee0cf6-0f3a-4a85-bb44-eb9ba0cc0863", + "ephemeral_id": "84fcaec4-393b-441e-b877-04cd19bff659", + "hostname": "docker-fleet-agent", + "id": "d4b18182-9c85-4467-8583-920b19f205fa", "name": "docker-fleet-agent", "type": "filebeat", - "version": "8.1.0" + "version": "7.16.0" }, "cloud": { "provider": "azure" @@ -44,9 +695,9 @@ An example event for `log` looks as following: "version": "8.5.0" }, "elastic_agent": { - "id": "66ee0cf6-0f3a-4a85-bb44-eb9ba0cc0863", + "id": "d4b18182-9c85-4467-8583-920b19f205fa", "snapshot": false, - "version": "8.1.0" + "version": "7.16.0" }, "event": { "action": "InitialAccess", @@ -59,8 +710,9 @@ An example event for `log` looks as following: "duration": 0, "end": "2020-09-06T12:04:00Z", "id": "faf8edc936-85f8-a603-b800-08d8525cf099", - "ingested": "2022-05-17T07:46:27Z", + "ingested": "2022-11-07T09:56:43Z", "kind": "alert", + "original": "{\"alerts\":{\"actorName\":null,\"alertId\":\"faf8edc936-85f8-a603-b800-08d8525cf099\",\"assignedTo\":\"Automation\",\"category\":\"InitialAccess\",\"classification\":null,\"creationTime\":\"2020-09-06T12:07:54.3716642Z\",\"description\":\"This alert is triggered when any email message is reported as malware or phish by users -V1.0.0.2\",\"detectionSource\":\"OfficeATP\",\"determination\":null,\"devices\":[],\"entities\":{\"aadUserId\":null,\"accountName\":null,\"clusterBy\":null,\"deliveryAction\":null,\"deviceId\":null,\"domainName\":null,\"entityType\":\"MailBox\",\"fileName\":null,\"filePath\":null,\"ipAddress\":null,\"mailboxAddress\":\"testUser3@contoso.com\",\"mailboxDisplayName\":\"test User3\",\"parentProcessCreationTime\":null,\"parentProcessId\":null,\"processCommandLine\":null,\"processCreationTime\":null,\"processId\":null,\"recipient\":null,\"registryHive\":null,\"registryKey\":null,\"registryValue\":null,\"registryValueType\":null,\"securityGroupId\":null,\"securityGroupName\":null,\"sender\":null,\"sha1\":null,\"sha256\":null,\"subject\":null,\"url\":null,\"userPrincipalName\":\"testUser3@contoso.com\",\"userSid\":null},\"firstActivity\":\"2020-09-06T12:04:00Z\",\"incidentId\":924518,\"investigationId\":null,\"investigationState\":\"Queued\",\"lastActivity\":\"2020-09-06T12:04:00Z\",\"lastUpdatedTime\":\"2020-09-06T12:37:40.88Z\",\"mitreTechniques\":[],\"resolvedTime\":null,\"serviceSource\":\"OfficeATP\",\"severity\":\"Informational\",\"status\":\"InProgress\",\"threatFamilyName\":null,\"title\":\"Email reported by user as malware or phish\"},\"assignedTo\":null,\"classification\":\"Unknown\",\"comments\":[],\"createdTime\":\"2020-09-06T12:07:55.1366667Z\",\"determination\":\"NotAvailable\",\"incidentId\":924518,\"incidentName\":\"Email reported by user as malware or phish\",\"lastUpdateTime\":\"2020-09-06T12:07:55.32Z\",\"redirectIncidentId\":null,\"severity\":\"Informational\",\"status\":\"Active\",\"tags\":[]}", "provider": "OfficeATP", "severity": 1, "start": "2020-09-06T12:04:00Z", @@ -112,6 +764,7 @@ An example event for `log` looks as following: "description": "This alert is triggered when any email message is reported as malware or phish by users -V1.0.0.2" }, "tags": [ + "preserve_original_event", "m365_defender", "forwarded" ], diff --git a/packages/m365_defender/img/m365-defender-dashboard.png b/packages/m365_defender/img/m365-defender-dashboard.png new file mode 100644 index 00000000000..10114c34e31 Binary files /dev/null and b/packages/m365_defender/img/m365-defender-dashboard.png differ diff --git a/packages/m365_defender/kibana/dashboard/m365_defender-ac54d310-44ab-11ed-8375-0168a9970c06.json b/packages/m365_defender/kibana/dashboard/m365_defender-ac54d310-44ab-11ed-8375-0168a9970c06.json new file mode 100644 index 00000000000..769a23c9e2b --- /dev/null +++ b/packages/m365_defender/kibana/dashboard/m365_defender-ac54d310-44ab-11ed-8375-0168a9970c06.json @@ -0,0 +1,690 @@ +{ + "attributes": { + "description": "Overview of Microsoft 365 Defender Incidents", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [ + { + "$state": { + "store": "appState" + }, + "meta": { + "alias": null, + "disabled": false, + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "key": "data_stream.dataset", + "negate": false, + "params": { + "query": "m365_defender.incident" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "data_stream.dataset": "m365_defender.incident" + } + } + } + ], + "query": { + "language": "kuery", + "query": "" + } + } + }, + "optionsJSON": { + "hidePanelTitles": false, + "syncColors": false, + "useMargins": true + }, + "panelsJSON": [ + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-a3705125-6c5c-43a6-a594-6d384c293ec9", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "a3705125-6c5c-43a6-a594-6d384c293ec9": { + "columnOrder": [ + "c4f1dfee-74d4-4ffb-8a53-6daf6b7c339b", + "6eb417d0-e42a-4c55-b918-529d3fdd4825" + ], + "columns": { + "6eb417d0-e42a-4c55-b918-529d3fdd4825": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Count", + "operationType": "unique_count", + "scale": "ratio", + "sourceField": "event.id" + }, + "c4f1dfee-74d4-4ffb-8a53-6daf6b7c339b": { + "customLabel": true, + "dataType": "date", + "isBucketed": true, + "label": "Timestamp", + "operationType": "date_histogram", + "params": { + "interval": "auto" + }, + "scale": "interval", + "sourceField": "@timestamp" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "layers": [ + { + "accessors": [ + "6eb417d0-e42a-4c55-b918-529d3fdd4825" + ], + "layerId": "a3705125-6c5c-43a6-a594-6d384c293ec9", + "layerType": "data", + "position": "top", + "seriesType": "line", + "showGridlines": false, + "xAccessor": "c4f1dfee-74d4-4ffb-8a53-6daf6b7c339b" + } + ], + "legend": { + "isVisible": true, + "position": "right" + }, + "preferredSeriesType": "line", + "title": "Empty XY chart", + "valueLabels": "hide", + "yLeftExtent": { + "mode": "full" + }, + "yRightExtent": { + "mode": "full" + } + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsXY" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 15, + "i": "e8dcdb05-dc55-4c3d-ba79-d043d3987e53", + "w": 24, + "x": 0, + "y": 0 + }, + "panelIndex": "e8dcdb05-dc55-4c3d-ba79-d043d3987e53", + "title": "Count of Incidents Over Time [Logs Microsoft 365 Defender]", + "type": "lens", + "version": "7.16.0" + }, + { + "embeddableConfig": { + "enhancements": {}, + "hidePanelTitles": false, + "savedVis": { + "data": { + "aggs": [ + { + "enabled": true, + "id": "1", + "params": { + "customLabel": "Count", + "field": "event.id" + }, + "schema": "metric", + "type": "cardinality" + }, + { + "enabled": true, + "id": "2", + "params": { + "filters": [ + { + "input": { + "language": "kuery", + "query": "not (source.user.name : * )" + }, + "label": "Unassigned Incident" + }, + { + "input": { + "language": "kuery", + "query": "m365_defender.incident.status : \"active\"" + }, + "label": "Active Incident" + }, + { + "input": { + "language": "kuery", + "query": "m365_defender.incident.status : \"redirected\" " + }, + "label": "Redirected Incident" + }, + { + "input": { + "language": "kuery", + "query": "m365_defender.incident.status : \"resolved\" " + }, + "label": "Resolved Incident" + } + ] + }, + "schema": "group", + "type": "filters" + } + ], + "searchSource": { + "filter": [], + "index": "logs-*", + "query": { + "language": "kuery", + "query": "" + } + } + }, + "description": "", + "id": "", + "params": { + "addLegend": false, + "addTooltip": true, + "metric": { + "colorSchema": "Green to Red", + "colorsRange": [ + { + "from": 0, + "to": 10000 + } + ], + "invertColors": false, + "labels": { + "show": true + }, + "metricColorMode": "None", + "percentageMode": false, + "style": { + "bgColor": false, + "bgFill": "#000", + "fontSize": 60, + "labelColor": false, + "subText": "" + }, + "useRanges": false + }, + "type": "metric" + }, + "title": "", + "type": "metric", + "uiState": {} + } + }, + "gridData": { + "h": 15, + "i": "0bc0ee87-64be-46bf-89ac-3a3c17f3ab7e", + "w": 24, + "x": 24, + "y": 0 + }, + "panelIndex": "0bc0ee87-64be-46bf-89ac-3a3c17f3ab7e", + "title": "Incident Counts [Logs Microsoft 365 Defender]", + "type": "visualization", + "version": "7.16.0" + }, + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-f41e1d1a-0dc1-4416-b48b-a04c4e59d46c", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "f41e1d1a-0dc1-4416-b48b-a04c4e59d46c": { + "columnOrder": [ + "d7cb197f-5b47-4ac1-a0c4-587c7b267a98", + "b59d6974-6241-4f24-a665-b75ddb367dca", + "df079051-f9c4-455e-9b45-991460a206a2" + ], + "columns": { + "b59d6974-6241-4f24-a665-b75ddb367dca": { + "customLabel": true, + "dataType": "date", + "isBucketed": true, + "label": "Timestamp", + "operationType": "date_histogram", + "params": { + "interval": "auto" + }, + "scale": "interval", + "sourceField": "@timestamp" + }, + "d7cb197f-5b47-4ac1-a0c4-587c7b267a98": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Severity", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "df079051-f9c4-455e-9b45-991460a206a2", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": false, + "size": 6 + }, + "scale": "ordinal", + "sourceField": "m365_defender.incident.severity" + }, + "df079051-f9c4-455e-9b45-991460a206a2": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Count", + "operationType": "unique_count", + "scale": "ratio", + "sourceField": "event.id" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "layers": [ + { + "accessors": [ + "df079051-f9c4-455e-9b45-991460a206a2" + ], + "layerId": "f41e1d1a-0dc1-4416-b48b-a04c4e59d46c", + "layerType": "data", + "position": "top", + "seriesType": "line", + "showGridlines": false, + "splitAccessor": "d7cb197f-5b47-4ac1-a0c4-587c7b267a98", + "xAccessor": "b59d6974-6241-4f24-a665-b75ddb367dca" + } + ], + "legend": { + "isVisible": true, + "position": "right" + }, + "preferredSeriesType": "line", + "title": "Empty XY chart", + "valueLabels": "hide", + "yLeftExtent": { + "mode": "full" + }, + "yRightExtent": { + "mode": "full" + } + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsXY" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 15, + "i": "b2cc378e-bce4-4769-9778-2f7f4fcb0f9b", + "w": 24, + "x": 0, + "y": 15 + }, + "panelIndex": "b2cc378e-bce4-4769-9778-2f7f4fcb0f9b", + "title": "Severity Over Time [Logs Microsoft 365 Defender]", + "type": "lens", + "version": "7.16.0" + }, + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-19999c0c-be9d-43ba-994a-72fadb61fabc", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "19999c0c-be9d-43ba-994a-72fadb61fabc": { + "columnOrder": [ + "330afb86-6197-4204-b9d3-49fb9d878111", + "8e73def1-b551-4bc3-9676-6bfe825f308f" + ], + "columns": { + "330afb86-6197-4204-b9d3-49fb9d878111": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Severity", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "8e73def1-b551-4bc3-9676-6bfe825f308f", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": true, + "size": 5 + }, + "scale": "ordinal", + "sourceField": "m365_defender.incident.severity" + }, + "8e73def1-b551-4bc3-9676-6bfe825f308f": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Count", + "operationType": "unique_count", + "scale": "ratio", + "sourceField": "event.id" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "layers": [ + { + "categoryDisplay": "default", + "groups": [ + "330afb86-6197-4204-b9d3-49fb9d878111" + ], + "layerId": "19999c0c-be9d-43ba-994a-72fadb61fabc", + "layerType": "data", + "legendDisplay": "default", + "metric": "8e73def1-b551-4bc3-9676-6bfe825f308f", + "nestedLegend": false, + "numberDisplay": "percent" + } + ], + "shape": "pie" + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsPie" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 15, + "i": "09a42be0-f530-4662-a284-5ad7d3264935", + "w": 24, + "x": 24, + "y": 15 + }, + "panelIndex": "09a42be0-f530-4662-a284-5ad7d3264935", + "title": "Distribution of Incidents by Severity [Logs Microsoft 365 Defender]", + "type": "lens", + "version": "7.16.0" + }, + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-7f55a9ab-9515-4d17-844d-c925b2ccdbd1", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "7f55a9ab-9515-4d17-844d-c925b2ccdbd1": { + "columnOrder": [ + "2aac5941-40f3-49f3-b190-017c0344ccff", + "2a8142cf-a21f-4110-b91a-5c375ba86559", + "390fe35a-52fb-42e9-8dcf-2e647d8e4e51" + ], + "columns": { + "2a8142cf-a21f-4110-b91a-5c375ba86559": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Incident ID", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "390fe35a-52fb-42e9-8dcf-2e647d8e4e51", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": true, + "size": 10 + }, + "scale": "ordinal", + "sourceField": "event.id" + }, + "2aac5941-40f3-49f3-b190-017c0344ccff": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Incident Name", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "390fe35a-52fb-42e9-8dcf-2e647d8e4e51", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": false, + "size": 10 + }, + "scale": "ordinal", + "sourceField": "m365_defender.incident.display_name" + }, + "390fe35a-52fb-42e9-8dcf-2e647d8e4e51": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Alert Count", + "operationType": "unique_count", + "scale": "ratio", + "sourceField": "m365_defender.incident.alert.id" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "columns": [ + { + "columnId": "2aac5941-40f3-49f3-b190-017c0344ccff" + }, + { + "columnId": "390fe35a-52fb-42e9-8dcf-2e647d8e4e51" + }, + { + "columnId": "2a8142cf-a21f-4110-b91a-5c375ba86559", + "isTransposed": false + } + ], + "layerId": "7f55a9ab-9515-4d17-844d-c925b2ccdbd1", + "layerType": "data" + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsDatatable" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 18, + "i": "ae3a1a20-4ff4-4e3d-9bbc-ccb240662789", + "w": 48, + "x": 0, + "y": 30 + }, + "panelIndex": "ae3a1a20-4ff4-4e3d-9bbc-ccb240662789", + "title": "Incident with Highest Count of Alerts [Logs Microsoft 365 Defender]", + "type": "lens", + "version": "7.16.0" + }, + { + "embeddableConfig": { + "enhancements": {} + }, + "gridData": { + "h": 24, + "i": "b3cf43f7-84a7-4d89-b9ca-8bbac00f67a0", + "w": 48, + "x": 0, + "y": 48 + }, + "panelIndex": "b3cf43f7-84a7-4d89-b9ca-8bbac00f67a0", + "panelRefName": "panel_b3cf43f7-84a7-4d89-b9ca-8bbac00f67a0", + "type": "search", + "version": "7.16.0" + } + ], + "timeRestore": false, + "title": "[Logs Microsoft 365 Defender] Incident", + "version": 1 + }, + "coreMigrationVersion": "7.16.0", + "id": "m365_defender-ac54d310-44ab-11ed-8375-0168a9970c06", + "migrationVersion": { + "dashboard": "7.16.0" + }, + "references": [ + { + "id": "logs-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "e8dcdb05-dc55-4c3d-ba79-d043d3987e53:indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "e8dcdb05-dc55-4c3d-ba79-d043d3987e53:indexpattern-datasource-layer-a3705125-6c5c-43a6-a594-6d384c293ec9", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "0bc0ee87-64be-46bf-89ac-3a3c17f3ab7e:kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "b2cc378e-bce4-4769-9778-2f7f4fcb0f9b:indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "b2cc378e-bce4-4769-9778-2f7f4fcb0f9b:indexpattern-datasource-layer-f41e1d1a-0dc1-4416-b48b-a04c4e59d46c", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "09a42be0-f530-4662-a284-5ad7d3264935:indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "09a42be0-f530-4662-a284-5ad7d3264935:indexpattern-datasource-layer-19999c0c-be9d-43ba-994a-72fadb61fabc", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "ae3a1a20-4ff4-4e3d-9bbc-ccb240662789:indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "ae3a1a20-4ff4-4e3d-9bbc-ccb240662789:indexpattern-datasource-layer-7f55a9ab-9515-4d17-844d-c925b2ccdbd1", + "type": "index-pattern" + }, + { + "id": "m365_defender-fcf25960-44af-11ed-8375-0168a9970c06", + "name": "b3cf43f7-84a7-4d89-b9ca-8bbac00f67a0:panel_b3cf43f7-84a7-4d89-b9ca-8bbac00f67a0", + "type": "search" + } + ], + "type": "dashboard" +} \ No newline at end of file diff --git a/packages/m365_defender/kibana/dashboard/m365_defender-d80d7840-4366-11ed-b1f2-e917f608bd03.json b/packages/m365_defender/kibana/dashboard/m365_defender-d80d7840-4366-11ed-b1f2-e917f608bd03.json new file mode 100644 index 00000000000..06e970e5f86 --- /dev/null +++ b/packages/m365_defender/kibana/dashboard/m365_defender-d80d7840-4366-11ed-b1f2-e917f608bd03.json @@ -0,0 +1,1812 @@ +{ + "attributes": { + "description": "Overview of Microsoft 365 Defender Alerts", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [ + { + "$state": { + "store": "appState" + }, + "meta": { + "alias": null, + "disabled": false, + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "key": "data_stream.dataset", + "negate": false, + "params": { + "query": "m365_defender.incident" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "data_stream.dataset": "m365_defender.incident" + } + } + } + ], + "query": { + "language": "kuery", + "query": "" + } + } + }, + "optionsJSON": { + "hidePanelTitles": false, + "syncColors": false, + "useMargins": true + }, + "panelsJSON": [ + { + "embeddableConfig": { + "enhancements": {}, + "hidePanelTitles": false, + "savedVis": { + "data": { + "aggs": [], + "searchSource": { + "filter": [], + "query": { + "language": "kuery", + "query": "" + } + } + }, + "description": "", + "id": "", + "params": { + "controls": [ + { + "fieldName": "event.provider", + "id": "1664862844575", + "indexPatternRefName": "control_9aa74a70-d9fb-4b5b-ba40-e5105e344dee_0_index_pattern", + "label": "Service Source", + "options": { + "dynamicOptions": true, + "multiselect": true, + "order": "desc", + "size": 5, + "type": "terms" + }, + "parent": "", + "type": "list" + } + ], + "pinFilters": false, + "updateFiltersOnChange": false, + "useTimeFilter": false + }, + "title": "", + "type": "input_control_vis", + "uiState": {} + } + }, + "gridData": { + "h": 10, + "i": "9aa74a70-d9fb-4b5b-ba40-e5105e344dee", + "w": 14, + "x": 0, + "y": 0 + }, + "panelIndex": "9aa74a70-d9fb-4b5b-ba40-e5105e344dee", + "title": "Service Source Filter [Logs Microsoft 365 Defender]", + "type": "visualization", + "version": "7.16.0" + }, + { + "embeddableConfig": { + "enhancements": {}, + "hidePanelTitles": false, + "savedVis": { + "data": { + "aggs": [ + { + "enabled": true, + "id": "1", + "params": { + "customLabel": "Count", + "field": "m365_defender.incident.alert.id" + }, + "schema": "metric", + "type": "cardinality" + }, + { + "enabled": true, + "id": "2", + "params": { + "filters": [ + { + "input": { + "language": "kuery", + "query": "" + }, + "label": "Total Alerts" + }, + { + "input": { + "language": "kuery", + "query": "m365_defender.incident.alert.status : \"new\" " + }, + "label": "New Alerts" + }, + { + "input": { + "language": "kuery", + "query": "m365_defender.incident.alert.status : \"inProgress\" " + }, + "label": "InProgress Alerts" + }, + { + "input": { + "language": "kuery", + "query": "m365_defender.incident.alert.status : \"resolved\" " + }, + "label": "Resolved Alerts" + }, + { + "input": { + "language": "kuery", + "query": "m365_defender.incident.alert.severity : \"high\"" + }, + "label": "High Severity Alerts" + }, + { + "input": { + "language": "kuery", + "query": "not (m365_defender.incident.alert.assigned_to : * )" + }, + "label": "Unassigned Alerts" + } + ] + }, + "schema": "group", + "type": "filters" + } + ], + "searchSource": { + "filter": [], + "index": "logs-*", + "query": { + "language": "kuery", + "query": "" + } + } + }, + "description": "", + "id": "", + "params": { + "addLegend": false, + "addTooltip": true, + "metric": { + "colorSchema": "Green to Red", + "colorsRange": [ + { + "from": 0, + "to": 10000 + } + ], + "invertColors": false, + "labels": { + "show": true + }, + "metricColorMode": "None", + "percentageMode": false, + "style": { + "bgColor": false, + "bgFill": "#000", + "fontSize": 60, + "labelColor": false, + "subText": "" + }, + "useRanges": false + }, + "type": "metric" + }, + "title": "", + "type": "metric", + "uiState": {} + } + }, + "gridData": { + "h": 10, + "i": "8ed4553a-d396-4ad7-b247-10e005d65086", + "w": 34, + "x": 14, + "y": 0 + }, + "panelIndex": "8ed4553a-d396-4ad7-b247-10e005d65086", + "title": "Alert Counts [Logs Microsoft 365 Defender]", + "type": "visualization", + "version": "7.16.0" + }, + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-874da7c4-ebe5-4c5c-a302-094d287b81bb", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "874da7c4-ebe5-4c5c-a302-094d287b81bb": { + "columnOrder": [ + "91075489-5815-4881-af42-d6e31205b1c5", + "2d7b439a-58f9-400c-b89a-c5ef01f6d82b" + ], + "columns": { + "2d7b439a-58f9-400c-b89a-c5ef01f6d82b": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Count", + "operationType": "unique_count", + "scale": "ratio", + "sourceField": "m365_defender.incident.alert.id" + }, + "91075489-5815-4881-af42-d6e31205b1c5": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Severity", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "2d7b439a-58f9-400c-b89a-c5ef01f6d82b", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": true, + "size": 5 + }, + "scale": "ordinal", + "sourceField": "m365_defender.incident.alert.severity" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "layers": [ + { + "categoryDisplay": "default", + "groups": [ + "91075489-5815-4881-af42-d6e31205b1c5" + ], + "layerId": "874da7c4-ebe5-4c5c-a302-094d287b81bb", + "layerType": "data", + "legendDisplay": "default", + "metric": "2d7b439a-58f9-400c-b89a-c5ef01f6d82b", + "nestedLegend": false, + "numberDisplay": "percent" + } + ], + "shape": "pie" + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsPie" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 15, + "i": "00c0b388-64b8-49c8-9ccb-de8e58030b4d", + "w": 24, + "x": 0, + "y": 10 + }, + "panelIndex": "00c0b388-64b8-49c8-9ccb-de8e58030b4d", + "title": "Distribution of Alerts by Severity [Logs Microsoft 365 Defender]", + "type": "lens", + "version": "7.16.0" + }, + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-d2d7332c-5fbd-4acc-bef9-a1f2a2a6a25d", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "d2d7332c-5fbd-4acc-bef9-a1f2a2a6a25d": { + "columnOrder": [ + "f65e2e2e-1d06-4965-871e-0c559e325343", + "26cd4cd0-0825-47aa-932b-e620a6329167" + ], + "columns": { + "26cd4cd0-0825-47aa-932b-e620a6329167": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Count", + "operationType": "unique_count", + "scale": "ratio", + "sourceField": "m365_defender.incident.alert.id" + }, + "f65e2e2e-1d06-4965-871e-0c559e325343": { + "customLabel": true, + "dataType": "date", + "isBucketed": true, + "label": "Timestamp", + "operationType": "date_histogram", + "params": { + "interval": "auto" + }, + "scale": "interval", + "sourceField": "m365_defender.incident.alert.last_update_datetime" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "layers": [ + { + "accessors": [ + "26cd4cd0-0825-47aa-932b-e620a6329167" + ], + "layerId": "d2d7332c-5fbd-4acc-bef9-a1f2a2a6a25d", + "layerType": "data", + "position": "top", + "seriesType": "line", + "showGridlines": false, + "xAccessor": "f65e2e2e-1d06-4965-871e-0c559e325343" + } + ], + "legend": { + "isVisible": true, + "position": "right" + }, + "preferredSeriesType": "line", + "title": "Empty XY chart", + "valueLabels": "hide", + "yLeftExtent": { + "mode": "full" + }, + "yRightExtent": { + "mode": "full" + } + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsXY" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 15, + "i": "62846e2a-f412-4cf9-b8ea-b08bc7fbd613", + "w": 24, + "x": 24, + "y": 10 + }, + "panelIndex": "62846e2a-f412-4cf9-b8ea-b08bc7fbd613", + "title": "Count of Alerts Over Time [Logs Microsoft 365 Defender]", + "type": "lens", + "version": "7.16.0" + }, + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-2fa8c035-1708-4d32-88fc-b59af7751db4", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "2fa8c035-1708-4d32-88fc-b59af7751db4": { + "columnOrder": [ + "ccf17a24-dc07-4800-983f-8c507665a6a0", + "87199ce0-75a4-414f-860f-7c25177fb5b3" + ], + "columns": { + "87199ce0-75a4-414f-860f-7c25177fb5b3": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Count", + "operationType": "unique_count", + "scale": "ratio", + "sourceField": "m365_defender.incident.alert.id" + }, + "ccf17a24-dc07-4800-983f-8c507665a6a0": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Attack Kill-Chain Category", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "87199ce0-75a4-414f-860f-7c25177fb5b3", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": true, + "size": 10 + }, + "scale": "ordinal", + "sourceField": "threat.tactic.name" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "layers": [ + { + "accessors": [ + "87199ce0-75a4-414f-860f-7c25177fb5b3" + ], + "layerId": "2fa8c035-1708-4d32-88fc-b59af7751db4", + "layerType": "data", + "position": "top", + "seriesType": "bar_stacked", + "showGridlines": false, + "xAccessor": "ccf17a24-dc07-4800-983f-8c507665a6a0" + } + ], + "legend": { + "isVisible": true, + "position": "right" + }, + "preferredSeriesType": "bar_stacked", + "title": "Empty XY chart", + "valueLabels": "hide", + "yLeftExtent": { + "mode": "full" + }, + "yRightExtent": { + "mode": "full" + } + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsXY" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 15, + "i": "8e4019a0-6594-4eaf-9358-c343b72aba84", + "w": 24, + "x": 0, + "y": 25 + }, + "panelIndex": "8e4019a0-6594-4eaf-9358-c343b72aba84", + "title": "Distribution of Alerts by Category [Logs Microsoft 365 Defender]", + "type": "lens", + "version": "7.16.0" + }, + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-24cc5824-23e2-462f-b38f-4769ea95322a", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "24cc5824-23e2-462f-b38f-4769ea95322a": { + "columnOrder": [ + "901ba472-02eb-4500-9ead-77371aa87f8c", + "4cccf049-88f6-486d-9cab-de68dd15ec01" + ], + "columns": { + "4cccf049-88f6-486d-9cab-de68dd15ec01": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Count", + "operationType": "unique_count", + "scale": "ratio", + "sourceField": "m365_defender.incident.alert.id" + }, + "901ba472-02eb-4500-9ead-77371aa87f8c": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Detection Source", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "4cccf049-88f6-486d-9cab-de68dd15ec01", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": false, + "size": 10 + }, + "scale": "ordinal", + "sourceField": "m365_defender.incident.alert.detection_source" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "columns": [ + { + "columnId": "901ba472-02eb-4500-9ead-77371aa87f8c", + "isTransposed": false + }, + { + "columnId": "4cccf049-88f6-486d-9cab-de68dd15ec01", + "isTransposed": false + } + ], + "layerId": "24cc5824-23e2-462f-b38f-4769ea95322a", + "layerType": "data" + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsDatatable" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 15, + "i": "51f47e38-eed6-42b3-8096-a39b914909da", + "w": 24, + "x": 24, + "y": 25 + }, + "panelIndex": "51f47e38-eed6-42b3-8096-a39b914909da", + "title": "Top 10 Detection Source that identified most of the Alerts [Logs Microsoft 365 Defender]", + "type": "lens", + "version": "7.16.0" + }, + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-45d80486-c9c8-4d28-bbcd-5d29072c9cb9", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "45d80486-c9c8-4d28-bbcd-5d29072c9cb9": { + "columnOrder": [ + "fe4ba4cc-3a4f-4dbf-b79d-a3b6550f08b6", + "4315d7e5-cdd4-48a1-b1b6-cfb3cfe25389" + ], + "columns": { + "4315d7e5-cdd4-48a1-b1b6-cfb3cfe25389": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Count", + "operationType": "unique_count", + "scale": "ratio", + "sourceField": "m365_defender.incident.alert.id" + }, + "fe4ba4cc-3a4f-4dbf-b79d-a3b6550f08b6": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Determination", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "4315d7e5-cdd4-48a1-b1b6-cfb3cfe25389", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": true, + "size": 10 + }, + "scale": "ordinal", + "sourceField": "m365_defender.incident.alert.determination" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "axisTitlesVisibilitySettings": { + "x": true, + "yLeft": true, + "yRight": true + }, + "fittingFunction": "None", + "gridlinesVisibilitySettings": { + "x": true, + "yLeft": true, + "yRight": true + }, + "labelsOrientation": { + "x": 0, + "yLeft": 0, + "yRight": 0 + }, + "layers": [ + { + "accessors": [ + "4315d7e5-cdd4-48a1-b1b6-cfb3cfe25389" + ], + "layerId": "45d80486-c9c8-4d28-bbcd-5d29072c9cb9", + "layerType": "data", + "seriesType": "bar_stacked", + "xAccessor": "fe4ba4cc-3a4f-4dbf-b79d-a3b6550f08b6" + } + ], + "legend": { + "isVisible": true, + "position": "right" + }, + "preferredSeriesType": "bar_stacked", + "tickLabelsVisibilitySettings": { + "x": true, + "yLeft": true, + "yRight": true + }, + "valueLabels": "hide", + "yLeftExtent": { + "mode": "full" + }, + "yRightExtent": { + "mode": "full" + } + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsXY" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 15, + "i": "1f836fdc-61f4-4cf4-a392-50276a2b77f1", + "w": 24, + "x": 0, + "y": 40 + }, + "panelIndex": "1f836fdc-61f4-4cf4-a392-50276a2b77f1", + "title": "Distribution of Alerts by Determination [Logs Microsoft 365 Defender]", + "type": "lens", + "version": "7.16.0" + }, + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-32a410b6-1ed8-4397-ab2e-151edec25e80", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "32a410b6-1ed8-4397-ab2e-151edec25e80": { + "columnOrder": [ + "e278fc5e-3a46-416d-be86-884554b160dc", + "9c52de5e-c802-4a77-8cb4-b60368976cd9", + "43b50fb7-eed1-4a62-bd34-4922fa34c64e" + ], + "columns": { + "43b50fb7-eed1-4a62-bd34-4922fa34c64e": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Count", + "operationType": "unique_count", + "scale": "ratio", + "sourceField": "m365_defender.incident.alert.id" + }, + "9c52de5e-c802-4a77-8cb4-b60368976cd9": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Severity", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "43b50fb7-eed1-4a62-bd34-4922fa34c64e", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": false, + "size": 6 + }, + "scale": "ordinal", + "sourceField": "m365_defender.incident.alert.severity" + }, + "e278fc5e-3a46-416d-be86-884554b160dc": { + "customLabel": true, + "dataType": "date", + "isBucketed": true, + "label": "Timestamp", + "operationType": "date_histogram", + "params": { + "interval": "auto" + }, + "scale": "interval", + "sourceField": "m365_defender.incident.alert.last_update_datetime" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "axisTitlesVisibilitySettings": { + "x": true, + "yLeft": true, + "yRight": true + }, + "fittingFunction": "None", + "gridlinesVisibilitySettings": { + "x": true, + "yLeft": true, + "yRight": true + }, + "labelsOrientation": { + "x": 0, + "yLeft": 0, + "yRight": 0 + }, + "layers": [ + { + "accessors": [ + "43b50fb7-eed1-4a62-bd34-4922fa34c64e" + ], + "layerId": "32a410b6-1ed8-4397-ab2e-151edec25e80", + "layerType": "data", + "position": "top", + "seriesType": "line", + "showGridlines": false, + "splitAccessor": "9c52de5e-c802-4a77-8cb4-b60368976cd9", + "xAccessor": "e278fc5e-3a46-416d-be86-884554b160dc" + } + ], + "legend": { + "isVisible": true, + "position": "right" + }, + "preferredSeriesType": "line", + "tickLabelsVisibilitySettings": { + "x": true, + "yLeft": true, + "yRight": true + }, + "valueLabels": "hide", + "yLeftExtent": { + "mode": "full" + }, + "yRightExtent": { + "mode": "full" + } + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsXY" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 15, + "i": "efd3aa63-5879-4383-87e4-6276e38b3c01", + "w": 24, + "x": 24, + "y": 40 + }, + "panelIndex": "efd3aa63-5879-4383-87e4-6276e38b3c01", + "title": "Severity Over Time [Logs Microsoft 365 Defender]", + "type": "lens", + "version": "7.16.0" + }, + { + "embeddableConfig": { + "enhancements": {}, + "hidePanelTitles": false, + "savedVis": { + "data": { + "aggs": [ + { + "enabled": true, + "id": "1", + "params": { + "customLabel": "Count", + "field": "m365_defender.incident.alert.id" + }, + "schema": "metric", + "type": "cardinality" + }, + { + "enabled": true, + "id": "2", + "params": { + "customLabel": "Mitre Techniques", + "field": "threat.technique.subtechnique.id", + "missingBucket": false, + "missingBucketLabel": "Missing", + "order": "asc", + "orderBy": "1", + "otherBucket": false, + "otherBucketLabel": "Other", + "size": 10 + }, + "schema": "segment", + "type": "terms" + } + ], + "searchSource": { + "filter": [], + "index": "logs-*", + "query": { + "language": "kuery", + "query": "" + } + } + }, + "description": "", + "id": "", + "params": { + "maxFontSize": 72, + "minFontSize": 18, + "orientation": "single", + "palette": { + "name": "default", + "type": "palette" + }, + "scale": "linear", + "showLabel": true + }, + "title": "", + "type": "tagcloud", + "uiState": {} + } + }, + "gridData": { + "h": 25, + "i": "01078074-2eca-4980-b815-9db6afd521a8", + "w": 48, + "x": 0, + "y": 55 + }, + "panelIndex": "01078074-2eca-4980-b815-9db6afd521a8", + "title": "Top Mitre Techniques [Logs Microsoft 365 Defender]", + "type": "visualization", + "version": "7.16.0" + }, + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-bdba4af5-1396-46ec-ad04-59157e7697f9", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "bdba4af5-1396-46ec-ad04-59157e7697f9": { + "columnOrder": [ + "a643f53b-fe39-4a6d-8916-e6eee4a3d30b", + "cd1300db-e9d8-41c8-9407-0159ec6e9410" + ], + "columns": { + "a643f53b-fe39-4a6d-8916-e6eee4a3d30b": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Service Source", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "cd1300db-e9d8-41c8-9407-0159ec6e9410", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": true, + "size": 10 + }, + "scale": "ordinal", + "sourceField": "event.provider" + }, + "cd1300db-e9d8-41c8-9407-0159ec6e9410": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Count", + "operationType": "unique_count", + "scale": "ratio", + "sourceField": "m365_defender.incident.alert.id" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "layers": [ + { + "accessors": [ + "cd1300db-e9d8-41c8-9407-0159ec6e9410" + ], + "layerId": "bdba4af5-1396-46ec-ad04-59157e7697f9", + "layerType": "data", + "position": "top", + "seriesType": "bar_stacked", + "showGridlines": false, + "xAccessor": "a643f53b-fe39-4a6d-8916-e6eee4a3d30b" + } + ], + "legend": { + "isVisible": true, + "position": "right" + }, + "preferredSeriesType": "bar_stacked", + "title": "Empty XY chart", + "valueLabels": "hide", + "yLeftExtent": { + "mode": "full" + }, + "yRightExtent": { + "mode": "full" + } + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsXY" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 15, + "i": "b5b7f2a4-1d6e-4812-8724-5a771014c3ae", + "w": 24, + "x": 0, + "y": 80 + }, + "panelIndex": "b5b7f2a4-1d6e-4812-8724-5a771014c3ae", + "title": "Distribution of Alerts by Service Source [Logs Microsoft 365 Defender]", + "type": "lens", + "version": "7.16.0" + }, + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-a0e68595-3ccc-4ff9-90fb-8087bc439020", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "filter-index-pattern-0", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "a0e68595-3ccc-4ff9-90fb-8087bc439020": { + "columnOrder": [ + "d8c5d781-6442-4a9f-b91b-8b7b29d8e73a", + "2c72b146-36c7-4143-baba-517b19d159bc" + ], + "columns": { + "2c72b146-36c7-4143-baba-517b19d159bc": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Count", + "operationType": "unique_count", + "scale": "ratio", + "sourceField": "m365_defender.incident.alert.id" + }, + "d8c5d781-6442-4a9f-b91b-8b7b29d8e73a": { + "customLabel": true, + "dataType": "ip", + "isBucketed": true, + "label": "Email Sender IP", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "2c72b146-36c7-4143-baba-517b19d159bc", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": false, + "size": 10 + }, + "scale": "ordinal", + "sourceField": "m365_defender.incident.alert.evidence.sender_ip" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [ + { + "$state": { + "store": "appState" + }, + "meta": { + "alias": null, + "disabled": false, + "indexRefName": "filter-index-pattern-0", + "key": "m365_defender.incident.alert.evidence.verdict", + "negate": false, + "params": [ + "malicious", + "suspicious" + ], + "type": "phrases" + }, + "query": { + "bool": { + "minimum_should_match": 1, + "should": [ + { + "match_phrase": { + "m365_defender.incident.alert.evidence.verdict": "malicious" + } + }, + { + "match_phrase": { + "m365_defender.incident.alert.evidence.verdict": "suspicious" + } + } + ] + } + } + } + ], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "columns": [ + { + "columnId": "d8c5d781-6442-4a9f-b91b-8b7b29d8e73a", + "isTransposed": false + }, + { + "columnId": "2c72b146-36c7-4143-baba-517b19d159bc", + "isTransposed": false + } + ], + "layerId": "a0e68595-3ccc-4ff9-90fb-8087bc439020", + "layerType": "data" + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsDatatable" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 15, + "i": "6847c21e-2ec0-4af4-aa67-ec52b181b05e", + "w": 24, + "x": 24, + "y": 80 + }, + "panelIndex": "6847c21e-2ec0-4af4-aa67-ec52b181b05e", + "title": "Top 10 Email Sender IP with Suspicious or Malicious Verdict [Logs Microsoft 365 Defender]", + "type": "lens", + "version": "7.16.0" + }, + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-3f509783-a68e-46a5-a9ea-6c51a0bcf036", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "filter-index-pattern-0", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "3f509783-a68e-46a5-a9ea-6c51a0bcf036": { + "columnOrder": [ + "3f1e354e-7c22-434e-9a0d-22e8b81f63b5", + "82a086d9-d047-4bc2-a791-c13d1f056f9c" + ], + "columns": { + "3f1e354e-7c22-434e-9a0d-22e8b81f63b5": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Process Commands", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "82a086d9-d047-4bc2-a791-c13d1f056f9c", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": false, + "size": 10 + }, + "scale": "ordinal", + "sourceField": "process.command_line" + }, + "82a086d9-d047-4bc2-a791-c13d1f056f9c": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Count", + "operationType": "unique_count", + "scale": "ratio", + "sourceField": "m365_defender.incident.alert.id" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [ + { + "$state": { + "store": "appState" + }, + "meta": { + "alias": null, + "disabled": false, + "indexRefName": "filter-index-pattern-0", + "key": "m365_defender.incident.alert.evidence.verdict", + "negate": false, + "params": [ + "malicious", + "suspicious" + ], + "type": "phrases" + }, + "query": { + "bool": { + "minimum_should_match": 1, + "should": [ + { + "match_phrase": { + "m365_defender.incident.alert.evidence.verdict": "malicious" + } + }, + { + "match_phrase": { + "m365_defender.incident.alert.evidence.verdict": "suspicious" + } + } + ] + } + } + } + ], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "columns": [ + { + "columnId": "3f1e354e-7c22-434e-9a0d-22e8b81f63b5", + "isTransposed": false + }, + { + "columnId": "82a086d9-d047-4bc2-a791-c13d1f056f9c", + "isTransposed": false + } + ], + "layerId": "3f509783-a68e-46a5-a9ea-6c51a0bcf036", + "layerType": "data" + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsDatatable" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 15, + "i": "34673480-15c2-4f75-ae86-637bc6875e78", + "w": 24, + "x": 0, + "y": 95 + }, + "panelIndex": "34673480-15c2-4f75-ae86-637bc6875e78", + "title": "Top 10 Process Commands with Suspicious or Malicious Verdict [Logs Microsoft 365 Defender]", + "type": "lens", + "version": "7.16.0" + }, + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-bf6ca0e6-4c26-4cff-b35c-a1a578a38d20", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "filter-index-pattern-0", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "bf6ca0e6-4c26-4cff-b35c-a1a578a38d20": { + "columnOrder": [ + "7048d5d3-a8bc-4b71-8b79-e51c6adc0350", + "471be050-ea96-4ce7-8cef-00ca90e6fbed" + ], + "columns": { + "471be050-ea96-4ce7-8cef-00ca90e6fbed": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Count", + "operationType": "unique_count", + "scale": "ratio", + "sourceField": "m365_defender.incident.alert.id" + }, + "7048d5d3-a8bc-4b71-8b79-e51c6adc0350": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "User Account", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "471be050-ea96-4ce7-8cef-00ca90e6fbed", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": false, + "size": 10 + }, + "scale": "ordinal", + "sourceField": "m365_defender.incident.alert.evidence.user_account.account_name" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [ + { + "$state": { + "store": "appState" + }, + "meta": { + "alias": null, + "disabled": false, + "indexRefName": "filter-index-pattern-0", + "key": "m365_defender.incident.alert.evidence.roles", + "negate": false, + "params": { + "query": "compromised" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "m365_defender.incident.alert.evidence.roles": "compromised" + } + } + } + ], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "columns": [ + { + "columnId": "7048d5d3-a8bc-4b71-8b79-e51c6adc0350", + "isTransposed": false + }, + { + "columnId": "471be050-ea96-4ce7-8cef-00ca90e6fbed", + "isTransposed": false + } + ], + "layerId": "bf6ca0e6-4c26-4cff-b35c-a1a578a38d20", + "layerType": "data" + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsDatatable" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 15, + "i": "d8b78c44-5d93-4a70-9d3d-0386581082d1", + "w": 24, + "x": 24, + "y": 95 + }, + "panelIndex": "d8b78c44-5d93-4a70-9d3d-0386581082d1", + "title": "Top 10 User Account with Compromised Role [Logs Microsoft 365 Defender]", + "type": "lens", + "version": "7.16.0" + }, + { + "embeddableConfig": { + "attributes": { + "references": [ + { + "id": "logs-*", + "name": "indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "indexpattern-datasource-layer-6e6323ee-5d54-4720-85b5-f567b8ef9d21", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "filter-index-pattern-0", + "type": "index-pattern" + } + ], + "state": { + "datasourceStates": { + "indexpattern": { + "layers": { + "6e6323ee-5d54-4720-85b5-f567b8ef9d21": { + "columnOrder": [ + "0f49f90e-0cbc-4ae0-b24d-0c82dc7c9d3b", + "5dea6d18-051a-4715-9327-3d30bb020a87" + ], + "columns": { + "0f49f90e-0cbc-4ae0-b24d-0c82dc7c9d3b": { + "customLabel": true, + "dataType": "string", + "isBucketed": true, + "label": "Device ID", + "operationType": "terms", + "params": { + "missingBucket": false, + "orderBy": { + "columnId": "5dea6d18-051a-4715-9327-3d30bb020a87", + "type": "column" + }, + "orderDirection": "desc", + "otherBucket": false, + "size": 10 + }, + "scale": "ordinal", + "sourceField": "host.id" + }, + "5dea6d18-051a-4715-9327-3d30bb020a87": { + "customLabel": true, + "dataType": "number", + "isBucketed": false, + "label": "Count", + "operationType": "unique_count", + "scale": "ratio", + "sourceField": "m365_defender.incident.alert.id" + } + }, + "incompleteColumns": {} + } + } + } + }, + "filters": [ + { + "$state": { + "store": "appState" + }, + "meta": { + "alias": null, + "disabled": false, + "indexRefName": "filter-index-pattern-0", + "key": "m365_defender.incident.alert.evidence.roles", + "negate": false, + "params": { + "query": "attacked" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "m365_defender.incident.alert.evidence.roles": "attacked" + } + } + } + ], + "query": { + "language": "kuery", + "query": "" + }, + "visualization": { + "columns": [ + { + "columnId": "0f49f90e-0cbc-4ae0-b24d-0c82dc7c9d3b", + "isTransposed": false + }, + { + "columnId": "5dea6d18-051a-4715-9327-3d30bb020a87", + "isTransposed": false + } + ], + "layerId": "6e6323ee-5d54-4720-85b5-f567b8ef9d21", + "layerType": "data" + } + }, + "title": "", + "type": "lens", + "visualizationType": "lnsDatatable" + }, + "enhancements": {}, + "hidePanelTitles": false + }, + "gridData": { + "h": 18, + "i": "664a1613-6c7e-40cd-91b2-43ce6c451ddb", + "w": 48, + "x": 0, + "y": 110 + }, + "panelIndex": "664a1613-6c7e-40cd-91b2-43ce6c451ddb", + "title": "Top 10 Most Attacked Device [Logs Microsoft 365 Defender]", + "type": "lens", + "version": "7.16.0" + }, + { + "embeddableConfig": { + "enhancements": {} + }, + "gridData": { + "h": 24, + "i": "b83be89c-7f77-406b-9028-1cfb0eb67e8d", + "w": 48, + "x": 0, + "y": 128 + }, + "panelIndex": "b83be89c-7f77-406b-9028-1cfb0eb67e8d", + "panelRefName": "panel_b83be89c-7f77-406b-9028-1cfb0eb67e8d", + "type": "search", + "version": "7.16.0" + } + ], + "timeRestore": false, + "title": "[Logs Microsoft 365 Defender] Alert", + "version": 1 + }, + "coreMigrationVersion": "7.16.0", + "id": "m365_defender-d80d7840-4366-11ed-b1f2-e917f608bd03", + "migrationVersion": { + "dashboard": "7.16.0" + }, + "references": [ + { + "id": "logs-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "9aa74a70-d9fb-4b5b-ba40-e5105e344dee:control_9aa74a70-d9fb-4b5b-ba40-e5105e344dee_0_index_pattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "8ed4553a-d396-4ad7-b247-10e005d65086:kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "00c0b388-64b8-49c8-9ccb-de8e58030b4d:indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "00c0b388-64b8-49c8-9ccb-de8e58030b4d:indexpattern-datasource-layer-874da7c4-ebe5-4c5c-a302-094d287b81bb", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "62846e2a-f412-4cf9-b8ea-b08bc7fbd613:indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "62846e2a-f412-4cf9-b8ea-b08bc7fbd613:indexpattern-datasource-layer-d2d7332c-5fbd-4acc-bef9-a1f2a2a6a25d", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "8e4019a0-6594-4eaf-9358-c343b72aba84:indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "8e4019a0-6594-4eaf-9358-c343b72aba84:indexpattern-datasource-layer-2fa8c035-1708-4d32-88fc-b59af7751db4", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "51f47e38-eed6-42b3-8096-a39b914909da:indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "51f47e38-eed6-42b3-8096-a39b914909da:indexpattern-datasource-layer-24cc5824-23e2-462f-b38f-4769ea95322a", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "1f836fdc-61f4-4cf4-a392-50276a2b77f1:indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "1f836fdc-61f4-4cf4-a392-50276a2b77f1:indexpattern-datasource-layer-45d80486-c9c8-4d28-bbcd-5d29072c9cb9", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "efd3aa63-5879-4383-87e4-6276e38b3c01:indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "efd3aa63-5879-4383-87e4-6276e38b3c01:indexpattern-datasource-layer-32a410b6-1ed8-4397-ab2e-151edec25e80", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "01078074-2eca-4980-b815-9db6afd521a8:kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "b5b7f2a4-1d6e-4812-8724-5a771014c3ae:indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "b5b7f2a4-1d6e-4812-8724-5a771014c3ae:indexpattern-datasource-layer-bdba4af5-1396-46ec-ad04-59157e7697f9", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "6847c21e-2ec0-4af4-aa67-ec52b181b05e:indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "6847c21e-2ec0-4af4-aa67-ec52b181b05e:indexpattern-datasource-layer-a0e68595-3ccc-4ff9-90fb-8087bc439020", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "6847c21e-2ec0-4af4-aa67-ec52b181b05e:filter-index-pattern-0", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "34673480-15c2-4f75-ae86-637bc6875e78:indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "34673480-15c2-4f75-ae86-637bc6875e78:indexpattern-datasource-layer-3f509783-a68e-46a5-a9ea-6c51a0bcf036", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "34673480-15c2-4f75-ae86-637bc6875e78:filter-index-pattern-0", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "d8b78c44-5d93-4a70-9d3d-0386581082d1:indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "d8b78c44-5d93-4a70-9d3d-0386581082d1:indexpattern-datasource-layer-bf6ca0e6-4c26-4cff-b35c-a1a578a38d20", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "d8b78c44-5d93-4a70-9d3d-0386581082d1:filter-index-pattern-0", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "664a1613-6c7e-40cd-91b2-43ce6c451ddb:indexpattern-datasource-current-indexpattern", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "664a1613-6c7e-40cd-91b2-43ce6c451ddb:indexpattern-datasource-layer-6e6323ee-5d54-4720-85b5-f567b8ef9d21", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "664a1613-6c7e-40cd-91b2-43ce6c451ddb:filter-index-pattern-0", + "type": "index-pattern" + }, + { + "id": "m365_defender-989afc60-44a5-11ed-8375-0168a9970c06", + "name": "b83be89c-7f77-406b-9028-1cfb0eb67e8d:panel_b83be89c-7f77-406b-9028-1cfb0eb67e8d", + "type": "search" + } + ], + "type": "dashboard" +} \ No newline at end of file diff --git a/packages/m365_defender/kibana/search/m365_defender-989afc60-44a5-11ed-8375-0168a9970c06.json b/packages/m365_defender/kibana/search/m365_defender-989afc60-44a5-11ed-8375-0168a9970c06.json new file mode 100644 index 00000000000..4dd53c5d108 --- /dev/null +++ b/packages/m365_defender/kibana/search/m365_defender-989afc60-44a5-11ed-8375-0168a9970c06.json @@ -0,0 +1,72 @@ +{ + "attributes": { + "columns": [ + "m365_defender.incident.alert.title", + "m365_defender.incident.alert.severity", + "m365_defender.incident.alert.id", + "event.id", + "m365_defender.incident.alert.status", + "m365_defender.incident.alert.assigned_to" + ], + "description": "", + "grid": {}, + "hideChart": false, + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [ + { + "$state": { + "store": "appState" + }, + "meta": { + "alias": null, + "disabled": false, + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "key": "data_stream.dataset", + "negate": false, + "params": { + "query": "m365_defender.incident" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "data_stream.dataset": "m365_defender.incident" + } + } + } + ], + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.index", + "query": { + "language": "kuery", + "query": "" + } + } + }, + "sort": [ + [ + "@timestamp", + "desc" + ] + ], + "title": "Alerts Essential Details [Logs Microsoft 365 Defender]" + }, + "coreMigrationVersion": "7.16.0", + "id": "m365_defender-989afc60-44a5-11ed-8375-0168a9970c06", + "migrationVersion": { + "search": "7.9.3" + }, + "references": [ + { + "id": "logs-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + } + ], + "type": "search" +} \ No newline at end of file diff --git a/packages/m365_defender/kibana/search/m365_defender-fcf25960-44af-11ed-8375-0168a9970c06.json b/packages/m365_defender/kibana/search/m365_defender-fcf25960-44af-11ed-8375-0168a9970c06.json new file mode 100644 index 00000000000..e0663bcc9c5 --- /dev/null +++ b/packages/m365_defender/kibana/search/m365_defender-fcf25960-44af-11ed-8375-0168a9970c06.json @@ -0,0 +1,72 @@ +{ + "attributes": { + "columns": [ + "message", + "m365_defender.incident.severity", + "event.id", + "m365_defender.incident.alert.id", + "source.user.name", + "m365_defender.incident.status" + ], + "description": "", + "grid": {}, + "hideChart": false, + "kibanaSavedObjectMeta": { + "searchSourceJSON": { + "filter": [ + { + "$state": { + "store": "appState" + }, + "meta": { + "alias": null, + "disabled": false, + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "key": "data_stream.dataset", + "negate": false, + "params": { + "query": "m365_defender.incident" + }, + "type": "phrase" + }, + "query": { + "match_phrase": { + "data_stream.dataset": "m365_defender.incident" + } + } + } + ], + "indexRefName": "kibanaSavedObjectMeta.searchSourceJSON.index", + "query": { + "language": "kuery", + "query": "" + } + } + }, + "sort": [ + [ + "@timestamp", + "desc" + ] + ], + "title": "Incidents Essential Details [Logs Microsoft 365 Defender]" + }, + "coreMigrationVersion": "7.16.0", + "id": "m365_defender-fcf25960-44af-11ed-8375-0168a9970c06", + "migrationVersion": { + "search": "7.9.3" + }, + "references": [ + { + "id": "logs-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + }, + { + "id": "logs-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index", + "type": "index-pattern" + } + ], + "type": "search" +} \ No newline at end of file diff --git a/packages/m365_defender/manifest.yml b/packages/m365_defender/manifest.yml index 93fe933cac2..dedc79c42cf 100644 --- a/packages/m365_defender/manifest.yml +++ b/packages/m365_defender/manifest.yml @@ -1,16 +1,16 @@ format_version: 1.0.0 name: m365_defender title: Microsoft M365 Defender -version: "1.3.0" +version: 1.4.0 description: Collect logs from Microsoft M365 Defender with Elastic Agent. categories: - "network" - "security" - "azure" release: ga -license: basic type: integration conditions: + elastic.subscription: basic kibana.version: ^7.16.0 || ^8.0.0 policy_templates: - name: m365_defender @@ -20,10 +20,80 @@ policy_templates: - type: httpjson title: "Collect logs from M365 Defender API" description: "Collect logs from M365 Defender via API" + vars: + - name: login_url + type: text + title: OAuth Server URL + required: true + show_user: false + default: https://login.microsoftonline.com + description: "URL of Login Server 'tenant-id/oauth2/token added automatically'." + - name: client_id + type: text + title: Client ID + description: The client ID related to creating a new application on Azure. + multi: false + required: true + show_user: true + - name: client_secret + type: text + title: Client Secret + description: The secret related to the client ID. + multi: false + required: true + show_user: true + - name: tenant_id + type: text + title: Tenant ID + description: The tenant ID related to creating a new application on Azure. + multi: false + required: true + show_user: true + - name: proxy_url + type: text + title: Proxy URL + multi: false + required: false + show_user: false + description: URL to proxy connections in the form of http\[s\]://:@:. Please ensure your username and password are in URL encoded format. + - name: ssl + type: yaml + title: SSL Configuration + description: i.e. certificate_authorities, supported_protocols, verification_mode etc. + multi: false + required: false + show_user: false + default: | + #certificate_authorities: + # - | + # -----BEGIN CERTIFICATE----- + # MIIDCjCCAfKgAwIBAgITJ706Mu2wJlKckpIvkWxEHvEyijANBgkqhkiG9w0BAQsF + # ADAUMRIwEAYDVQQDDAlsb2NhbGhvc3QwIBcNMTkwNzIyMTkyOTA0WhgPMjExOTA2 + # MjgxOTI5MDRaMBQxEjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEB + # BQADggEPADCCAQoCggEBANce58Y/JykI58iyOXpxGfw0/gMvF0hUQAcUrSMxEO6n + # fZRA49b4OV4SwWmA3395uL2eB2NB8y8qdQ9muXUdPBWE4l9rMZ6gmfu90N5B5uEl + # 94NcfBfYOKi1fJQ9i7WKhTjlRkMCgBkWPkUokvBZFRt8RtF7zI77BSEorHGQCk9t + # /D7BS0GJyfVEhftbWcFEAG3VRcoMhF7kUzYwp+qESoriFRYLeDWv68ZOvG7eoWnP + # PsvZStEVEimjvK5NSESEQa9xWyJOmlOKXhkdymtcUd/nXnx6UTCFgnkgzSdTWV41 + # CI6B6aJ9svCTI2QuoIq2HxX/ix7OvW1huVmcyHVxyUECAwEAAaNTMFEwHQYDVR0O + # BBYEFPwN1OceFGm9v6ux8G+DZ3TUDYxqMB8GA1UdIwQYMBaAFPwN1OceFGm9v6ux + # 8G+DZ3TUDYxqMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAG5D + # 874A4YI7YUwOVsVAdbWtgp1d0zKcPRR+r2OdSbTAV5/gcS3jgBJ3i1BN34JuDVFw + # 3DeJSYT3nxy2Y56lLnxDeF8CUTUtVQx3CuGkRg1ouGAHpO/6OqOhwLLorEmxi7tA + # H2O8mtT0poX5AnOAhzVy7QW0D/k4WaoLyckM5hUa6RtvgvLxOwA0U+VGurCDoctu + # 8F4QOgTAWyh8EZIwaKCliFRSynDpv3JTUwtfZkxo6K6nce1RhCWFAsMvDZL8Dgc0 + # yvgJ38BRsFOtkRuAGSf6ZUwTO8JJRRIFnpUzXflAnGivK9M13D5GEQMmIl6U9Pvk + # sxSmbIUfc2SGJGCJD4I= + # -----END CERTIFICATE----- icons: - src: /img/logo.svg title: M365 logo size: 32x32 type: image/svg+xml +screenshots: + - src: /img/m365-defender-dashboard.png + title: Microsoft 365 Defender Alert Dashboard Screenshot + size: 600x600 + type: image/png owner: github: elastic/security-external-integrations