-
Notifications
You must be signed in to change notification settings - Fork 14
/
query_examples.yaml
170 lines (138 loc) · 3.79 KB
/
query_examples.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# This YAML file contains data-plane count-distinct queries for simultaneous execution.
# For each query q, we define query key and the counting attribute.
# we group packets by key, then report when a particular key has many distinct attributes, exceeding the given threshold.
# Note: since every packet is distinct, "distinct: packets" is an alias of "distinct: ingress_metadata.ingress_timestamp".
- name : SuperSpanner
key: ipv4.srcAddr
conditions:
- distinct: ipv4.dstAddr
exceeds: 1000
- name : DoS
key: [ipv4.dstAddr, tcp.dstPort]
conditions:
- distinct: packets
exceeds: 10000
- name : DDoS
key: [ipv4.dstAddr, tcp.dstPort]
conditions:
- distinct: [ipv4.srcAddr, tcp.srcPort]
exceeds: 5000
- name : PortScanningTCP
key: [ipv4.srcAddr, ipv4.dstAddr]
conditions:
- distinct: tcp.dstPort
exceeds: 100
- name : PortScanningUDP
key: [ipv4.srcAddr, ipv4.dstAddr]
conditions:
- distinct: udp.dstPort
exceeds: 100
- name : DistributedPortScanning
key: ipv4.dstAddr
conditions:
- distinct: tcp.dstPort
exceeds: 100
# Enumerating different combinations of anomaly spanning
- name : SourceIPSpanDstIP
key: ipv4.srcAddr
conditions:
- distinct: ipv4.dstAddr
exceeds: 1000
- name : SourceIPSpanDstPort
key: ipv4.srcAddr
conditions:
- distinct: [ipv4.dstAddr, tcp.dstPort]
exceeds: 1000
- name : SourcePortSpanDstIP
key: [ipv4.srcAddr, tcp.dstPort]
conditions:
- distinct: ipv4.dstAddr
exceeds: 1000
- name : SourcePortSpanDstPort
key: [ipv4.srcAddr, tcp.dstPort]
conditions:
- distinct: [ipv4.dstAddr, tcp.dstPort]
exceeds: 1000
- name: DstIPSpanSrcIP
key: ipv4.dstAddr
conditions:
- distinct: ipv4.srcAddr
exceeds: 1000
- name: DstIPSpanSrcPort
key: ipv4.dstAddr
conditions:
- distinct: [ipv4.srcAddr, tcp.srcPort]
exceeds: 1000
- name: DstPortSpanSrcIP
key: [ipv4.dstAddr, tcp.dstPort]
conditions:
- distinct: ipv4.srcAddr
exceeds: 1000
- name: DstPortSpanSrcPort
key: [ipv4.dstAddr, tcp.dstPort]
conditions:
- distinct: [ipv4.srcAddr, tcp.srcPort]
exceeds: 1000
# UDP version
- name : UDPSourceIPSpanDstPort
key: ipv4.srcAddr
conditions:
- distinct: [ipv4.dstAddr, udp.dstPort]
exceeds: 1000
- name : UDPSourcePortSpanDstIP
key: [ipv4.srcAddr, udp.dstPort]
conditions:
- distinct: ipv4.dstAddr
exceeds: 1000
- name : UDPSourcePortSpanDstPort
key: [ipv4.srcAddr, udp.dstPort]
conditions:
- distinct: [ipv4.dstAddr, udp.dstPort]
exceeds: 1000
- name: UDPDstIPSpanSrcPort
key: ipv4.dstAddr
conditions:
- distinct: [ipv4.srcAddr, udp.srcPort]
exceeds: 1000
- name: UDPDstPortSpanSrcIP
key: [ipv4.dstAddr, udp.dstPort]
conditions:
- distinct: ipv4.srcAddr
exceeds: 1000
- name: UDPDstPortSpanSrcPort
key: [ipv4.dstAddr, udp.dstPort]
conditions:
- distinct: [ipv4.srcAddr, udp.srcPort]
exceeds: 1000
# Single Host Pecularity
- name: SingleHostPortScanVictim
key: [ipv4.srcAddr, ipv4.dstAddr, tcp.srcPort]
conditions:
- distinct: [tcp.dstPort]
exceeds: 500
- name: UDPSingleHostPortScanVictim
key: [ipv4.srcAddr, ipv4.dstAddr, udp.srcPort]
conditions:
- distinct: [udp.dstPort]
exceeds: 500
- name: ManyParallelSendSource
key: [ipv4.srcAddr, ipv4.dstAddr, tcp.dstPort]
conditions:
- distinct: [tcp.srcPort]
exceeds: 100
- name: UDPManyParallelSendSource
key: [ipv4.srcAddr, ipv4.dstAddr, udp.dstPort]
conditions:
- distinct: [udp.srcPort]
exceeds: 100
# Heavy Hitter flows
- name: IPpairHH
key: [ipv4.srcAddr, ipv4.dstAddr]
conditions:
- distinct: packets
exceeds: 10000
- name: 5tupleHH
key: [ipv4.srcAddr, ipv4.dstAddr, tcp.srcPort, tcp.dstPort]
conditions:
- distinct: packets
exceeds: 5000