@@ -15,10 +15,26 @@ parameters:
1515 type : regex
1616 description : View Processes with Executables matching this regex
1717 default : .
18-
1918 - name : IgnoreProcessRegex
2019 type : regex
2120 description : Ignore Processes with Executables matching this regex
21+ - name : DaddrRegex
22+ type : regex
23+ description : Target specific destination IP
24+ default : .
25+ - name : SaddrRegex
26+ type : regex
27+ description : Target specific source IP
28+ default : .
29+ - name : DportRegex
30+ type : regex
31+ description : Target specific destination port
32+ default : .
33+ - name : SportRegex
34+ type : regex
35+ description : Target specific source port
36+ default : .
37+
2238
2339 - name : Events
2440 type : multichoice
@@ -41,7 +57,7 @@ sources:
4157 LET ETW = SELECT *
4258 FROM watch_etw(guid='{7dd42a49-5329-4832-8dfd-43d979153a88}',
4359 description="Microsoft-Windows-Kernel-Network")
44-
60+
4561 SELECT System.ID AS EID,
4662 System AS _System,
4763 get(item=EIDLookup, field=str(str=System.ID)) AS EventType,
@@ -51,6 +67,10 @@ sources:
5167 FROM delay(query=ETW, delay=3)
5268 WHERE EventType IN Events
5369 AND EventData.ImageName =~ ProcessRegex
70+ AND EventData.daddr =~ DaddrRegex
71+ AND EventData.saddr =~ SaddrRegex
72+ AND EventData.dport =~ DportRegex
73+ AND EventData.sport =~ SportRegex
5474 AND if(condition=IgnoreProcessRegex,
5575 then=NOT EventData.ImageName =~ IgnoreProcessRegex,
5676 else=TRUE)
0 commit comments