File tree 2 files changed +36
-0
lines changed
2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ # This plugin checks to see if windows defender detects any threats to the node.
2
+
3
+ $windowsDefenderThreats = Get-MpThreat
4
+ $currentThreatDetected = $false
5
+
6
+ foreach ($threat in $windowsDefenderThreats ) {
7
+ $currentThreatDetected = $currentThreatDetected -or $threat.IsActive -or $threat.DidThreatExecute
8
+ }
9
+
10
+ if ($currentThreatDetected ) {
11
+ echo $windowsDefenderThreats
12
+ exit 1
13
+ } else {
14
+ exit 0
15
+ }
Original file line number Diff line number Diff line change
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
+
You can’t perform that action at this time.
0 commit comments