{
    "id": "BetterMTD",
    "title": "BETTER Mobile Threat Defense (MTD)",
    "publisher": "BETTER Mobile",
    "descriptionMarkdown": "The BETTER MTD Connector allows Enterprises to connect their Better MTD instances with Microsoft Sentinel, to view their data in Dashboards, create custom alerts, use it to trigger playbooks and expands threat hunting capabilities. This gives users more insight into their organization's mobile devices and ability to quickly analyze current mobile security posture which improves their overall SecOps capabilities.",
    "graphQueries": [
        {
            "metricName": "Total incidents received",
            "legend": "BetterMTDIncidentLog_CL",
            "baseQuery": "BetterMTDIncidentLog_CL"
        },
        {
            "metricName": "Total devcie enrolled",
            "legend": "BetterMTDDeviceLog_CL",
            "baseQuery": "BetterMTDDeviceLog_CL"
        },
        {
            "metricName": "Total netflow traffic recieved",
            "legend": "BetterMTDNetflowLog_CL",
            "baseQuery": "BetterMTDNetflowLog_CL"
        },
        {
            "metricName": "Total device applications",
            "legend": "BetterMTDAppLog_CL",
            "baseQuery": "BetterMTDAppLog_CL"
        }
    ],
    "sampleQueries": [
        {
            "description": "All threats in the past 24 hour",
            "query": "BetterMTDIncidentLog_CL\n            | where TimeGenerated > ago(24h)\n            | sort by TimeGenerated\n            | limit 100"
        },
        {
            "description": "Enrolled Devices in the past 24 hour",
            "query": "BetterMTDDeviceLog_CL\n            | where TimeGenerated > ago(24h)\n            | sort by TimeGenerated\n            | limit 100"
        },
        {
            "description": "Installed applications in the last 24 hour",
            "query": "BetterMTDAppLog_CL\n            | where TimeGenerated > ago(24h)  and  AppStatus_s  == \"installed\" \n            | sort by TimeGenerated            \n| limit 100"
        },
        {
            "description": "Blocked Network traffics in the last 24 hour",
            "query": "BetterMTDNetflowLog_CL\n            | where TimeGenerated > ago(24h)  and  Status_s == \"blocked\"\n            | sort by TimeGenerated\n            | limit 100"
        }
    ],
    "dataTypes": [
        {
            "name": "BetterMTDIncidentLog_CL",
            "lastDataReceivedQuery": "BetterMTDIncidentLog_CL\n            | summarize Time = max(TimeGenerated)\n            | where isnotempty(Time)"
        },
        {
            "name": "BetterMTDDeviceLog_CL",
            "lastDataReceivedQuery": "BetterMTDDeviceLog_CL\n            | summarize Time = max(TimeGenerated)\n            | where isnotempty(Time)"
        },
        {
            "name": "BetterMTDAppLog_CL",
            "lastDataReceivedQuery": "BetterMTDAppLog_CL\n            | summarize Time = max(TimeGenerated)\n            | where isnotempty(Time)"
        },
        {
            "name": "BetterMTDNetflowLog_CL",
            "lastDataReceivedQuery": "BetterMTDNetflowLog_CL\n            | summarize Time = max(TimeGenerated)\n            | where isnotempty(Time)"
        }
    ],
    "connectivityCriterias": [
        {
            "type": "IsConnectedQuery",
            "value": [
                "BetterMTDIncidentLog_CL\n            | summarize LastLogReceived = max(TimeGenerated)\n            | project IsConnected = LastLogReceived > ago(30d)",
                "BetterMTDDeviceLog_CL\n            | summarize LastLogReceived = max(TimeGenerated)\n            | project IsConnected = LastLogReceived > ago(30d)",
                "BetterMTDAppLog_CL\n            | summarize LastLogReceived = max(TimeGenerated)\n            | project IsConnected = LastLogReceived > ago(30d)",
                "BetterMTDNetflowLog_CL\n            | summarize LastLogReceived = max(TimeGenerated)\n            | project IsConnected = LastLogReceived > ago(30d)"
            ]
        }
    ],
    "availability": {
        "status": 1,
        "isPreview": false
    },
    "permissions": {
        "resourceProvider": [
            {
                "provider": "Microsoft.OperationalInsights/workspaces",
                "permissionsDisplayText": "read and write permissions are required.",
                "providerDisplayName": "Workspace",
                "scope": "Workspace",
                "requiredPermissions": {
                    "write": true,
                    "read": true,
                    "delete": true
                }
            },
            {
                "provider": "Microsoft.OperationalInsights/workspaces/sharedKeys",
                "permissionsDisplayText": "read permissions to shared keys for the workspace are required. [See the documentation to learn more about workspace keys](https://docs.microsoft.com/azure/azure-monitor/platform/agent-windows#obtain-workspace-id-and-key).",
                "providerDisplayName": "Keys",
                "scope": "Workspace",
                "requiredPermissions": {
                    "action": true
                }
            }
        ]
    },
    "instructionSteps": [
        {
            "title": "",
            "description": "1. In **Better MTD Console**, click on **Integration** on the side bar.\n2. Select  **Others** tab.\n3. Click the **ADD ACCOUNT** button and Select **Microsoft Sentinel** from the available integrations.\n4. Create the Integration:\n  - set `ACCOUNT NAME` to a descriptive name that identifies the integration then click **Next**\n  - Enter your `WORKSPACE ID` and `PRIMARY KEY` from the fields below, click **Save**\n  - Click **Done**\n5.  Threat Policy setup (Which Incidents should be reported to `Microsoft Sentinel`):\n  - In **Better MTD Console**, click on **Policies** on the side bar\n  - Click on the **Edit** button of the Policy that you are using.\n  - For each Incident types that you want to be logged go to **Send to Integrations** field and select **Sentinel**\n6. For additional information, please refer to our [Documentation](https://mtd-docs.bmobi.net/integrations/how-to-setup-azure-sentinel-integration#mtd-integration-configuration).",
            "instructions": [
                {
                    "parameters": {
                        "fillWith": [
                            "WorkspaceId"
                        ],
                        "label": "Workspace ID"
                    },
                    "type": "CopyableLabel"
                },
                {
                    "parameters": {
                        "fillWith": [
                            "PrimaryKey"
                        ],
                        "label": "Primary Key"
                    },
                    "type": "CopyableLabel"
                }
            ]
        }
    ],
    "metadata": {
        "id": "31f0ea52-dcd4-443b-9d04-a3e709addebc",
        "version": "1.0.0",
        "kind": "dataConnector",
        "source": {
            "kind": "community"
        },
        "author": {
            "name": "Better Mobile"
        },
        "support": {
            "name": "Better Mobile",
            "email": "support@better.mobi",
            "tier": "developer"
        }
    }
}