Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions plugins/MicrosoftDefender/v1/configValidation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"steps": [
{
"displayName": "API Access",
"dataStream": {
"name": "validation"
},
"success": "Successfully connected to Endpoint",
"error": "Cannot access the Endpoint API - check your client ID, secret and permissions.",
"required": true
}
]
}
9 changes: 9 additions & 0 deletions plugins/MicrosoftDefender/v1/custom_types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[
{
"name": "device",
"sourceType": "device",
"icon": "server",
"singular": "Device",
"plural": "Devices"
}
]
44 changes: 44 additions & 0 deletions plugins/MicrosoftDefender/v1/dataStreams/Vulnerabilities.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "Vulnerabilities",
"displayName": "Vulnerabilities",
"baseDataSourceName": "httpRequestScoped",
"config": {
"httpMethod": "post",
"errorHandling": {
"type": "default"
},
"paging": {
"mode": "none"
},
"expandInnerObjects": true,
"endpointPath": "runHuntingQuery",
"postBody": {
"Query": "DeviceTvmSoftwareVulnerabilities | where DeviceId in ({{objects.map(o => {return `\"${o.deviceid}\"`}).join(\",\")}})",
"Timespan": "{{timeframe.enum != \"none\" ? `${timeframe.start}/${timeframe.end}` : \"\" }}"
},
"pathToData": "results",
"getArgs": [],
"headers": []
},
"metadata": [
{
"sourceId": "DeviceId",
"name": "DeviceName",
"shape": "string",
"role": "label",
"sourceType": "device"
},
{
"pattern": ".*"
}
],
"matches": {
"sourceType": {
"type": "equals",
"value": "device"
}
},
"timeframes": false,
"providesPluginDiagnostics": true,
"tags": []
}
51 changes: 51 additions & 0 deletions plugins/MicrosoftDefender/v1/dataStreams/advancedHuntingQuery.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"name": "advancedHuntingQuery",
"displayName": "Advanced Hunting Query",
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "post",
"errorHandling": {
"type": "default"
},
"paging": {
"mode": "none"
},
"expandInnerObjects": true,
"endpointPath": "runHuntingQuery",
"postBody": {
"Query": "{{query}}",
"Timespan": "{{timeframe.enum != \"none\" ? `${timeframe.start}/${timeframe.end}` : \"\" }}"
},
"pathToData": "results",
"getArgs": [],
"headers": []
},
"timeframes": [
"last1hour",
"last12hours",
"last24hours",
"last7days",
"last30days",
"thisMonth",
"thisQuarter",
"thisYear",
"lastMonth",
"lastQuarter",
"lastYear"
],
"supportsNoneTimeframe": true,
"providesPluginDiagnostics": true,
"manualConfigApply": true,
"tags": [],
"ui": [
{
"name": "query",
"language": "kusto",
"label": "Query",
"type": "code",
"validation": {
"required": true
}
}
]
}
221 changes: 221 additions & 0 deletions plugins/MicrosoftDefender/v1/dataStreams/alerts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
{
"name": "alerts",
"displayName": "Alerts",
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"errorHandling": {
"type": "default"
},
"paging": {
"mode": "nextUrl",
"pageSize": {
"realm": {
"value": "none",
"label": "none"
}
},
"in": {
"realm": {
"value": "payload",
"label": "payload"
},
"path": "@odata.nextLink"
}
},
"expandInnerObjects": true,
"endpointPath": "alerts_v2",
"pathToData": "value",
"getArgs": [
{
"key": "$filter",
"value": "{{ status && status.length > 0 ? \"(status eq \" + status.map((m) => { return `'${m}'` }).join(\" or status eq \") + \") and \" : \"\" }}{{ severity && severity.length > 0 ? \"(severity eq \" + severity.map((m) => { return `'${m}'` }).join(\" or severity eq \") + \") and \" : \"\" }}{{timeframe.enum !== \"none\" ? timeframeCol + \" ge \" + timeframe.start + \" and \" + timeframeCol + \" le \" + timeframe.end : \"1 eq 1\"}}"
}
],
"headers": []
},
"metadata": [
{
"name": "title",
"displayName": "Title",
"shape": "string",
"role": "label"
},
{
"name": "systemTags",
"displayName": "System Tags",
"shape": "string",
"role": "label"
},
{
"name": "severity",
"displayName": "Severity",
"shape": "string",
"role": "label"
},
{
"name": "status",
"displayName": "Status",
"shape": "string",
"role": "label"
},
{
"name": "category",
"displayName": "Category",
"shape": "string",
"role": "label"
},
{
"name": "detectionSource",
"displayName": "Detection Source",
"shape": "string",
"role": "label"
},
{
"name": "firstActivityDateTime",
"displayName": "First Activity",
"shape": "date",
"role": "label"
},
{
"name": "lastActivityDateTime",
"displayName": "Last Activity",
"shape": "date",
"role": "label"
},
{
"name": "classification",
"displayName": "Classification",
"shape": "string",
"role": "label"
},
{
"name": "determination",
"displayName": "Determination",
"shape": "string",
"role": "label"
},
{
"name": "assignedTo",
"displayName": "Assigned To",
"shape": "string",
"role": "label"
},
{
"pattern": ".*",
"visible": false
}
],
"timeframes": [
"last1hour",
"last12hours",
"last24hours",
"last7days",
"last30days",
"thisMonth",
"thisQuarter",
"thisYear",
"lastMonth",
"lastQuarter",
"lastYear"
],
"supportsNoneTimeframe": true,
"manualConfigApply": true,
"providesPluginDiagnostics": true,
"tags": [],
"ui": [
{
"name": "severity",
"label": "Severity",
"type": "autocomplete",
"data": {
"source": "fixed",
"values": [
{
"value": "low",
"label": "Low"
},
{
"value": "medium",
"label": "Medium"
},
{
"value": "high",
"label": "High"
},
{
"value": "informational",
"label": "Informational"
},
{
"value": "unknown",
"label": "Unknown"
},
{
"value": "unknownFutureValue",
"label": "Unknown Future Value"
}
]
},
"isClearable": true
},
{
"name": "status",
"label": "Status",
"type": "autocomplete",
"data": {
"source": "fixed",
"values": [
{
"value": "newAlert",
"label": "New"
},
{
"value": "inProgress",
"label": "In Progress"
},
{
"value": "resolved",
"label": "Resolved"
},
{
"value": "unknown",
"label": "Unknown"
},
{
"value": "unknownFutureValue",
"label": "Unknown Future Value"
}
]
},
"isClearable": true
},
{
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this field show on the Timeframe tab? You can use tileEditorStep to set this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's what I'm after! thanks

"tileEditorStep": ["Timeframe"],
"isMulti": false,
"help": "Select the column to apply the timeframe",
"data": {
"source": "fixed",
"values": [
{
"value": "createdDateTime",
"label": "Creation Time"
},
{
"value": "lastActivityDateTime",
"label": "Last Activity Time"
},
{
"value": "lastUpdateDateTime",
"label": "Last Update Time"
}
]
},
"defaultValue": "createdDateTime",
"name": "timeframeCol",
"label": "Timeframe Column",
"type": "autocomplete",
"isClearable": false
}
]
}
Loading
Loading