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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
|
[
{
"table_name": "result-0",
"query": "select qname as CertainQnames, qtype as Qtype, count(1) as count from dns where (qname='localhost' or qname like '%.root-servers.net') and qr==0 group by CertainQnames,Qtype order by count desc;",
"head": [
{ "name": "CertainQnames","type": "text" },
{ "name": "Qtype","type": "int" },
{ "name": "count","type": "int" }
],
"data": [
]
}
]
[
{
"table_name": "result-0",
"query": "select qtype as Qtype, qname as Qname, count(1) as count from dns where qclass==3 and qr==0 group by Qtype,Qname order by count desc;",
"head": [
{ "name": "Qtype","type": "int" },
{ "name": "Qname","type": "text" },
{ "name": "count","type": "int" }
],
"data": [
]
}
]
[
{
"table_name": "result-0",
"query": "select rcode as Rcode, if(qr==1,dst_addr,src_addr) as ClientAddr, count(1) as count from dns where qr==1 group by Rcode,ClientAddr order by count,Rcode,ClientAddr desc limit 50;",
"head": [
{ "name": "Rcode","type": "int" },
{ "name": "ClientAddr","type": "text" },
{ "name": "count","type": "int" }
],
"data": [
[3,"172.18.24.52",1],
[0,"172.18.24.52",3]
]
}
]
[
{
"table_name": "result-0",
"query": "select 'ALL' as All, if(ether_type==34525,rsplit(src_addr,7,':')||':'||rsplit(src_addr,6,':')||':'||rsplit(src_addr,5,':')||':'||rsplit(src_addr,4,':')||':'||rsplit(src_addr,3,':')||'::',rsplit(src_addr,3)||'.'||rsplit(src_addr,2)||'.'||rsplit(src_addr,1)||'.0') as ClientSubnet, count(1) as count from dns where qr==0 group by All,ClientSubnet order by count,ClientSubnet desc limit 200;",
"head": [
{ "name": "All","type": "text" },
{ "name": "ClientSubnet","type": "text" },
{ "name": "count","type": "int" }
],
"data": [
["ALL","172.18.24.0",4]
]
}
]
[
{
"table_name": "result-0",
"query": "select if(rsplit(qname,1)='de','ok','non-auth-tld') as Class, if(ether_type==34525,rsplit(src_addr,7,':')||':'||rsplit(src_addr,6,':')||':'||rsplit(src_addr,5,':')||':'||rsplit(src_addr,4,':')||':'||rsplit(src_addr,3,':')||'::',rsplit(src_addr,3)||'.'||rsplit(src_addr,2)||'.'||rsplit(src_addr,1)||'.0') as ClientSubnet, count(1) as count from dns where qr==0 group by Class,ClientSubnet order by count,ClientSubnet,Class desc limit 200;",
"head": [
{ "name": "Class","type": "text" },
{ "name": "ClientSubnet","type": "text" },
{ "name": "count","type": "int" }
],
"data": [
["non-auth-tld","172.18.24.0",4]
]
}
]
[
{
"table_name": "result-0",
"query": "select if(qr==1,'sent','recv') as Direction, if(protocol==6,'tcp',if(protocol==17,'udp',if(protocol==1,'icmp',if(protocol==58,'ipv6-icmp',protocol)))) as IPProto, count(1) as count from dns group by Direction,IPProto order by count,Direction,IPProto desc;",
"head": [
{ "name": "Direction","type": "text" },
{ "name": "IPProto","type": "text" },
{ "name": "count","type": "int" }
],
"data": [
["recv","udp",4],
["sent","udp",4]
]
}
]
[
{
"table_name": "result-0",
"query": "select if(ether_type==34525,'IPv6','IPv4') as IPVersion, qtype as Qtype, count(1) as count from dns where qr==0 group by IPVersion,Qtype order by count,IPVersion,Qtype desc;",
"head": [
{ "name": "IPVersion","type": "text" },
{ "name": "Qtype","type": "int" },
{ "name": "count","type": "int" }
],
"data": [
["IPv4",12,2],
["IPv4",1,2]
]
}
]
[
{
"table_name": "result-0",
"query": "select 'ALL' as All, do, edns0, edns_version, extended_rcode, z, if(do==1,'set','clr') as D0, count(1) as count from dns where qr==0 group by All,do,D0,edns0,edns_version,extended_rcode,z order by count desc;",
"head": [
{ "name": "All","type": "text" },
{ "name": "do","type": "bool" },
{ "name": "edns0","type": "bool" },
{ "name": "edns_version","type": "int" },
{ "name": "extended_rcode","type": "int" },
{ "name": "z","type": "int" },
{ "name": "D0","type": "text" },
{ "name": "count","type": "int" }
],
"data": [
["ALL",0,0,0,0,0,"clr",4]
]
}
]
[
{
"table_name": "result-0",
"query": "select 'ALL' as All, if(edns0,edns_version,'none') as EDNSVersion, count(1) as count from dns where qr==0 group by All,EDNSVersion order by count desc;",
"head": [
{ "name": "All","type": "text" },
{ "name": "EDNSVersion","type": "text" },
{ "name": "count","type": "int" }
],
"data": [
["ALL","none",4]
]
}
]
[
{
"table_name": "result-0",
"query": "select 'ALL' as All, if(qname like 'xn--%','idn','normal') as IDNQname, count(1) as count from dns where qr==0 group by All,IDNQname order by count desc;",
"head": [
{ "name": "All","type": "text" },
{ "name": "IDNQname","type": "text" },
{ "name": "count","type": "int" }
],
"data": [
["ALL","normal",4]
]
}
]
[
{
"table_name": "result-0",
"query": "select 'ALL' as All, lower(rsplit(qname,1)) as TLD, count(1) as count from dns where qr==0 and (qname like 'xn--%') group by All,TLD order by count,TLD desc;",
"head": [
{ "name": "All","type": "text" },
{ "name": "TLD","type": "text" },
{ "name": "count","type": "int" }
],
"data": [
]
}
]
[
{
"table_name": "result-0",
"query": "select 'ALL' as All, if(qr==1,dst_addr,src_addr) as ClientAddr, count(1) as count from dns where qr==0 and (qtype=28 or qtype=38) and (qname like '%.root-servers.net') group by All,ClientAddr order by count desc limit 50;",
"head": [
{ "name": "All","type": "text" },
{ "name": "ClientAddr","type": "text" },
{ "name": "count","type": "int" }
],
"data": [
]
}
]
[
{
"table_name": "result-0",
"query": "select 'ALL' as All, opcode as Opcode, count(1) as count from dns where qr==0 group by All,Opcode order by count,Opcode desc;",
"head": [
{ "name": "All","type": "text" },
{ "name": "Opcode","type": "int" },
{ "name": "count","type": "int" }
],
"data": [
["ALL",0,4]
]
}
]
[
{
"table_name": "result-0",
"query": "select 'ALL' as All, qtype as Qtype, count(1) as count from dns where qr==0 group by All,Qtype order by count,Qtype desc;",
"head": [
{ "name": "All","type": "text" },
{ "name": "Qtype","type": "int" },
{ "name": "count","type": "int" }
],
"data": [
["ALL",12,2],
["ALL",1,2]
]
}
]
[
{
"table_name": "result-0",
"query": "select qtype as Qtype, len(qname) as QnameLen, count(1) as count from dns where qr==0 group by Qtype,QnameLen order by count,QnameLen,Qtype desc;",
"head": [
{ "name": "Qtype","type": "int" },
{ "name": "QnameLen","type": "int" },
{ "name": "count","type": "int" }
],
"data": [
[1,7,1],
[1,13,1],
[12,25,1],
[12,27,1]
]
}
]
[
{
"table_name": "result-0",
"query": "select qtype as Qtype, lower(rsplit(qname,1)) as TLD, count(1) as count from dns where qr==0 and (qtype=1 or qtype=2 or qtype=5 or qtype=6 or qtype=12 or qtype=15 or qtype=28 or qtype=38 or qtype=255) group by Qtype,TLD order by count,TLD,Qtype desc limit 200;",
"head": [
{ "name": "Qtype","type": "int" },
{ "name": "TLD","type": "text" },
{ "name": "count","type": "int" }
],
"data": [
[1,"org",1],
[1,"se",1],
[12,"arpa",2]
]
}
]
[
{
"table_name": "result-0",
"query": "select 'ALL' as All, rcode as Rcode, count(1) as count from dns where qr==1 group by All,Rcode order by count,Rcode desc;",
"head": [
{ "name": "All","type": "text" },
{ "name": "Rcode","type": "int" },
{ "name": "count","type": "int" }
],
"data": [
["ALL",3,1],
["ALL",0,3]
]
}
]
[
{
"table_name": "result-0",
"query": "select rcode as Rcode, msg_size as ReplyLen, count(1) as count from dns where qr==1 group by Rcode,ReplyLen order by count,Rcode,ReplyLen desc;",
"head": [
{ "name": "Rcode","type": "int" },
{ "name": "ReplyLen","type": "int" },
{ "name": "count","type": "int" }
],
"data": [
[0,96,1],
[0,78,1],
[0,40,1],
[3,119,1]
]
}
]
[
{
"table_name": "result-0",
"query": "select 'ALL' as All, rd as RD, count(1) as count from dns where qr==0 group by All,RD order by count desc;",
"head": [
{ "name": "All","type": "text" },
{ "name": "RD","type": "bool" },
{ "name": "count","type": "int" }
],
"data": [
["ALL",1,4]
]
}
]
[
{
"table_name": "result-0",
"query": "select if(protocol==6,'tcp',if(protocol==17,'udp',protocol)) as Transport, qtype as Qtype, count(1) as count from dns where qr==0 group by Transport,Qtype order by Transport,Qtype,count desc;",
"head": [
{ "name": "Transport","type": "text" },
{ "name": "Qtype","type": "int" },
{ "name": "count","type": "int" }
],
"data": [
["udp",1,2],
["udp",12,2]
]
}
]
[
{
"table_name": "result-0",
"query": "select s, dst_addr as Dst_addr, qtype as questiontype, lower(src_addr) as lower_src, if(1 and s < 1 or s <= 1 or s > 1 or s >= 1, 't', 'f'), trim(trim('foofoo' || rsplit(src_addr, 1) || 'foofoo', 'foo'), 'bar'), count(*), len(src_addr), sum(msg_size + -1 - 2 % 4 << 3 >> 2 | 3 & ~4) + 1, min(msg_size), max(msg_size), truncate(1.1) as integer, 1.1 as float, sum(src_port + 1.0 - 2.0 / 1.5 * -2.5) + 1.0, max(src_port + 1.0), min(src_port + 1.0), avg(src_port), stdev(src_port), name('rcode', 0) from dns where src_addr like '%' and (qr or not qr) group by src_addr, s having s >= 0 order by s, dst_addr, lower_src, integer, float;",
"head": [
{ "name": "s","type": "int" },
{ "name": "Dst_addr","type": "text" },
{ "name": "questiontype","type": "int" },
{ "name": "lower_src","type": "text" },
{ "name": "if((1and((((s<1)or(s<=1))or(s>1))or(s>=1))),t,f)","type": "text" },
{ "name": "trim(trim(((foofoo||rsplit(src_addr,1))||foofoo),foo),bar)","type": "text" },
{ "name": "count(1)","type": "int" },
{ "name": "len(src_addr)","type": "int" },
{ "name": "(sum((msg_size+-((((((1-(2%4))<<3)>>2)|3)&~(4)))))+1)","type": "int" },
{ "name": "min(msg_size)","type": "int" },
{ "name": "max(msg_size)","type": "int" },
{ "name": "integer","type": "int" },
{ "name": "float","type": "float" },
{ "name": "(sum(((src_port+1.0)-((2.0/1.5)*-(2.5))))+1.0)","type": "float" },
{ "name": "max((src_port+1.0))","type": "float" },
{ "name": "min((src_port+1.0))","type": "float" },
{ "name": "avg(src_port)","type": "float" },
{ "name": "stdev(src_port)","type": "float" },
{ "name": "name(rcode,0)","type": "text" }
],
"data": [
[1297433016,"172.18.24.52",12,"212.247.204.2","t","204",1,13,125,119,119,1,1.1,58.3333,54,54,53,0,"NoError"],
[1297433016,"212.247.204.2",12,"172.18.24.52","t","24",1,12,48,42,42,1,1.1,52271.3,52267,52267,52266,0,"NoError"],
[1297433026,"212.247.204.2",1,"172.18.24.52","t","24",1,12,36,30,30,1,1.1,54066.3,54062,54062,54061,0,"NoError"],
[1297433027,"172.18.24.52",1,"212.247.204.2","t","204",1,13,84,78,78,1,1.1,58.3333,54,54,53,0,"NoError"],
[1297433030,"172.18.24.52",1,"212.247.204.2","t","204",1,13,46,40,40,1,1.1,58.3333,54,54,53,0,"NoError"],
[1297433030,"212.247.204.2",1,"172.18.24.52","t","24",1,12,30,24,24,1,1.1,59489.3,59485,59485,59484,0,"NoError"],
[1297433038,"212.247.204.2",12,"172.18.24.52","t","24",1,12,50,44,44,1,1.1,49372.3,49368,49368,49367,0,"NoError"],
[1297433039,"172.18.24.52",12,"212.247.204.2","t","204",1,13,102,96,96,1,1.1,58.3333,54,54,53,0,"NoError"]
]
}
]
[
{
"table_name": "result-0",
"query": "select name( 'qtype' , qtype ) as qt, count(*) as count from dns group by qtype order by count, qt desc;",
"head": [
{ "name": "qt","type": "text" },
{ "name": "count","type": "int" }
],
"data": [
["PTR",4],
["A",4]
]
}
]
[
{
"table_name": "result-0",
"query": "select * from icmp;",
"head": [
{ "name": "id","type": "int" },
{ "name": "s","type": "int" },
{ "name": "us","type": "int" },
{ "name": "ether_type","type": "int" },
{ "name": "src_port","type": "int" },
{ "name": "dst_port","type": "int" },
{ "name": "src_addr","type": "text" },
{ "name": "dst_addr","type": "text" },
{ "name": "protocol","type": "int" },
{ "name": "ip_ttl","type": "int" },
{ "name": "ip_version","type": "int" },
{ "name": "fragments","type": "int" },
{ "name": "type","type": "int" },
{ "name": "code","type": "int" },
{ "name": "echo_identifier","type": "int" },
{ "name": "echo_sequence","type": "int" },
{ "name": "du_protocol","type": "int" },
{ "name": "du_src_addr","type": "text" },
{ "name": "du_dst_addr","type": "text" },
{ "name": "desc","type": "text" }
],
"data": [
]
}
]
[
{
"table_name": "result-0",
"query": "select count(*) from icmp;",
"head": [
{ "name": "count(1)","type": "int" }
],
"data": [
]
}
]
|