Skip to content

Commit cb785e1

Browse files
committed
Add windows defender problem detection custom plugin
1 parent c7ce65d commit cb785e1

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# This plugin checks to see if windows defender detects any threats to the node.
2+
3+
$windowsDefenderThreats = Get-MpThreatDetection
4+
5+
if ($windowsDefenderThreats.length -ne 0) {
6+
exit 1
7+
} else {
8+
exit 0
9+
}

config/windows-defender-monitor.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"plugin": "custom",
3+
"pluginConfig": {
4+
"invoke_interval": "10m",
5+
"timeout": "5s",
6+
"max_output_length": 80,
7+
"concurrency": 3
8+
},
9+
"source": "windows-defender-custom-plugin-monitor",
10+
"metricsReporting": true,
11+
"conditions": [],
12+
"rules": [
13+
{
14+
"type": "temporary",
15+
"reason": "WindowsDefenderThreatsDetected",
16+
"path": "./config/plugin/windows_defender_problem.ps1",
17+
"timeout": "3s"
18+
}
19+
]
20+
}
21+

0 commit comments

Comments
 (0)