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
5 changes: 4 additions & 1 deletion plugins/MicrosoftDefender/v1/dataStreams/listDevices.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@
"expandInnerObjects": true,
"endpointPath": "runHuntingQuery",
"postBody": {
"Query": "DeviceInfo | where isnotempty(DeviceName) | project Timestamp, DeviceId, DeviceName | summarize arg_max(Timestamp, *) by DeviceId"
"Query": "DeviceInfo | where isnotempty(DeviceName) and hash(DeviceId, 4) == {{shardIndex}} | project Timestamp, DeviceId, DeviceName | summarize arg_max(Timestamp, *) by DeviceId"

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 you sort the data here to ensure the ordering is consistent when doing our custom paging?

},
"pathToData": "results",
"getArgs": [],
"headers": []
},
"ui": [
{ "name": "shardIndex", "label": "Shard Index", "type": "text", "defaultValue": "0" }
],
"providesPluginDiagnostics": true,
"manualConfigApply": true,
"timeframes": false,
Expand Down
50 changes: 48 additions & 2 deletions plugins/MicrosoftDefender/v1/indexDefinitions/default.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,55 @@
{
"steps": [
{
"name": "Import Devices",
"name": "Import Devices (1)",
"dataStream": {
"name": "listDevices"
"name": "listDevices",
"config": { "shardIndex": "0" }
},
"timeframe": "none",
"objectMapping": {
"id": "DeviceId",
"name": "DeviceName",
"type": {
"value": "Device"
}
}
},
{
"name": "Import Devices (2)",
"dataStream": {
"name": "listDevices",
"config": { "shardIndex": "1" }
},
"timeframe": "none",
"objectMapping": {
"id": "DeviceId",
"name": "DeviceName",
"type": {
"value": "Device"
}
}
},
{
"name": "Import Devices (3)",
"dataStream": {
"name": "listDevices",
"config": { "shardIndex": "2" }
},
"timeframe": "none",
"objectMapping": {
"id": "DeviceId",
"name": "DeviceName",
"type": {
"value": "Device"
}
}
},
{
"name": "Import Devices (4)",
"dataStream": {
"name": "listDevices",
"config": { "shardIndex": "3" }
},
"timeframe": "none",
"objectMapping": {
Expand Down
2 changes: 1 addition & 1 deletion plugins/MicrosoftDefender/v1/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "microsoft-defender",
"displayName": "Microsoft Defender",
"version": "1.0.3",
"version": "1.0.4",
"author": {
"name": "SquaredUp Labs",
"type": "labs"
Expand Down
Loading