This file is indexed.

/usr/share/logsparser/normalizers/named-2.xml is in python-logsparser 0.4-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
<?xml version="1.0" encoding="UTF-8"?>
<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
<!--                                                            -->
<!-- pylogparser - Logs parsers python library                  -->
<!-- Copyright (C) 2011 Wallix Inc.                             -->
<!--                                                            -->
<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
<!--                                                            -->
<!-- This package is free software; you can redistribute        -->
<!-- it and/or modify it under the terms of the GNU Lesser      -->
<!-- General Public License as published by the Free Software   -->
<!-- Foundation; either version 2.1 of the License, or (at      -->
<!-- your option) any later version.                            -->
<!--                                                            -->
<!-- This package is distributed in the hope that it will be    -->
<!-- useful, but WITHOUT ANY WARRANTY; without even the implied -->
<!-- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR    -->
<!-- PURPOSE.  See the GNU Lesser General Public License for    -->
<!-- more details.                                              -->
<!--                                                            -->
<!-- You should have received a copy of the GNU Lesser General  -->
<!-- Public License along with this package; if not, write      -->
<!-- to the Free Software Foundation, Inc., 59 Temple Place,    -->
<!-- Suite 330, Boston, MA  02111-1307  USA                     -->
<!--                                                            -->
<!--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
<!DOCTYPE normalizer SYSTEM "normalizer.dtd">
<!--
Normalization for ISC BIND9 log lines

named normalizer complement (Reaching limit of 100 named groups)

TODO: handle view

-->
<normalizer name="named-2"
            version="0.99"
            unicode="yes"
            ignorecase="yes"
            matchtype="match"
            appliedTo="body"
            taxonomy="name resolution">
    <description>
        <localized_desc language="en"></localized_desc>
        <localized_desc language="fr"></localized_desc>
    </description>
    <authors>
        <author>fbo@wallix.com</author>
    </authors>
    <tagTypes>
        <tagType name="NonWhitespaceChar" type="basestring">
            <description>
                <localized_desc language="en"></localized_desc>
                <localized_desc language="fr"></localized_desc>
            </description>
            <regexp>\S+</regexp>
        </tagType>
        <tagType name="Class" type="basestring">
            <description>
                <localized_desc language="en"></localized_desc>
                <localized_desc language="fr"></localized_desc>
            </description>
            <!-- Be more restrictive ? http://www.iana.org/assignments/dns-parameters -->
           <regexp>\S+</regexp>
        </tagType>
        <tagType name="Type" type="basestring">
            <description>
                <localized_desc language="en"></localized_desc>
                <localized_desc language="fr"></localized_desc>
            </description>
            <!-- Be more restrictive ? http://www.iana.org/assignments/dns-parameters -->
            <regexp>\S+</regexp>
        </tagType>
        <tagType name="NamedDate" type="basestring">
            <description>
                <localized_desc language="en"></localized_desc>
                <localized_desc language="fr"></localized_desc>
            </description>
           <regexp>\d+-\w+-\d{4} \d+:\d+:\d+\.\d+</regexp>
        </tagType>
        <tagType name="NamedCategory" type="basestring">
            <description>
                <localized_desc language="en"></localized_desc>
                <localized_desc language="fr"></localized_desc>
            </description>
           <regexp>default:|general:|database:|security:|config:|resolver:|xfer-in:|xfer-out:|notify:|client:|unmatched:|network:|update:|update-security:|queries:|dispatch:|dnssec:|lame-servers:|edns-disabled:</regexp>
        </tagType>
        <tagType name="NamedSeverity" type="basestring">
            <description>
                <localized_desc language="en"></localized_desc>
                <localized_desc language="fr"></localized_desc>
            </description>
           <regexp>emerg:|alert:|crit:|error:|warn:|notice:|info:|debug:</regexp>
        </tagType>
    </tagTypes>
    <callbacks>
        <callback name="decode_named_category">
log['category'] = value.rstrip(':')
        </callback>
        <callback name="decode_named_severity">
# define severities
SEVERITIES = [ "emerg",
               "alert",
               "crit",
               "error",
               "warn",
               "notice",
               "info",
               "debug" ]
severity = value.rstrip(':')
log["severity"] = severity
log["severity_code"] = SEVERITIES.index(severity)
        </callback>
    </callbacks>
    <patterns>
        <pattern name="named-001">
            <description>
                <localized_desc language="en"></localized_desc>
                <localized_desc language="fr"></localized_desc>
            </description>
            <text>(?:DATE )?(?:CATEGORY )?(?:SEVERITY )?client IP#PORT: transfer of 'ZONE/CLASS': TYPE ACTION$</text>
            <tags>
                <tag name="source_ip" tagType="IP">
                    <description>
                        <localized_desc language="en">Client IP address related to this request</localized_desc>
                        <localized_desc language="fr">Adresse IP du client ayant généré la requête</localized_desc>
                    </description>
                    <substitute>IP</substitute>
                </tag>
                <tag name="source_port" tagType="Integer">
                    <description>
                        <localized_desc language="en">UDP client port</localized_desc>
                        <localized_desc language="fr">Port UDP du client</localized_desc>
                    </description>
                    <substitute>PORT</substitute>
                </tag>
                <tag name="zone" tagType="NonWhitespaceChar">
                    <description>
                        <localized_desc language="en">DNS Zone related to this request</localized_desc>
                        <localized_desc language="fr">Zone DNS concernée par la requête</localized_desc>
                    </description>
                    <substitute>ZONE</substitute>
                </tag>
                <tag name="action" tagType="NonWhitespaceChar">
                    <description>
                        <localized_desc language="en">Action prise par le serveur</localized_desc>
                        <localized_desc language="fr">Action taken by server</localized_desc>
                    </description>
                    <substitute>ACTION</substitute>
                </tag>
                <tag name="class" tagType="Class">
                    <description>
                        <localized_desc language="en">Requested DNS Class (CLASS)</localized_desc>
                        <localized_desc language="fr">Classe DNS de la requête</localized_desc>
                    </description>
                    <substitute>CLASS</substitute>
                </tag>
                <tag name="type" tagType="Type">
                    <description>
                        <localized_desc language="en">Requested DNS recording Type (TYPE)</localized_desc>
                        <localized_desc language="fr">Type (TYPE) d'enregistrement DNS demandé</localized_desc>
                    </description>
                    <substitute>TYPE</substitute>
                </tag>
                <tag name="__nameddate" tagType="NamedDate">
                    <description>
                        <localized_desc language="en"></localized_desc>
                        <localized_desc language="fr"></localized_desc>
                    </description>
                    <substitute>DATE</substitute>
                    <callbacks>
                        <callback>dd-MMM-YYYY hh:mm:ss</callback>
                    </callbacks>
                </tag>
                <tag name="__namedcat" tagType="NamedCategory">
                    <description>
                        <localized_desc language="en">Subsystem category</localized_desc>
                        <localized_desc language="fr">Catégorie de sous-système</localized_desc>
                    </description>
                    <substitute>CATEGORY</substitute>
                    <callbacks>
                        <callback>decode_named_category</callback>
                    </callbacks>
                </tag>
                <tag name="__namedsev" tagType="NamedSeverity">
                    <description>
                        <localized_desc language="en">Message severity</localized_desc>
                        <localized_desc language="fr">Sévérité du message</localized_desc>
                    </description>
                    <substitute>SEVERITY</substitute>
                    <callbacks>
                        <callback>decode_named_severity</callback>
                    </callbacks>
                </tag>
            </tags>
            <commonTags>
                <commonTag name="event_id">zone_transfer</commonTag>
                <commonTag name="program">named</commonTag>
            </commonTags>
            <examples>
                <example>
                     <text>client 10.10.4.4#35129: transfer of 'qa.ifr.lan/IN': AXFR started</text>
                     <expectedTags>
                          <expectedTag name="source_ip">10.10.4.4</expectedTag>
                          <expectedTag name="event_id">zone_transfer</expectedTag>
                          <expectedTag name="zone">qa.ifr.lan</expectedTag>
                          <expectedTag name="class">IN</expectedTag>
                          <expectedTag name="action">started</expectedTag>
                          <expectedTag name="type">AXFR</expectedTag>
                          <expectedTag name="program">named</expectedTag>
                          <expectedTag name="taxonomy">name resolution</expectedTag>
                     </expectedTags>
                </example>
            </examples>
        </pattern>
        <pattern name="named-002">
            <description>
                <localized_desc language="en"></localized_desc>
                <localized_desc language="fr"></localized_desc>
            </description>
            <text>(?:DATE )?(?:CATEGORY )?(?:SEVERITY )?transfer of 'ZONE/CLASS' from IP#PORT: ACTION of transfer</text>
            <tags>
                <tag name="source_ip" tagType="IP">
                    <description>
                        <localized_desc language="en"></localized_desc>
                        <localized_desc language="fr"></localized_desc>
                    </description>
                    <substitute>IP</substitute>
                </tag>
                <tag name="source_port" tagType="Integer">
                    <description>
                        <localized_desc language="en"></localized_desc>
                        <localized_desc language="fr"></localized_desc>
                    </description>
                    <substitute>PORT</substitute>
                </tag>
                <tag name="zone" tagType="NonWhitespaceChar">
                    <description>
                        <localized_desc language="en"></localized_desc>
                        <localized_desc language="fr"></localized_desc>
                    </description>
                    <substitute>ZONE</substitute>
                </tag>
                <tag name="action" tagType="NonWhitespaceChar">
                    <description>
                        <localized_desc language="en"></localized_desc>
                        <localized_desc language="fr"></localized_desc>
                    </description>
                    <substitute>ACTION</substitute>
                </tag>
                <tag name="class" tagType="Class">
                    <description>
                        <localized_desc language="en"></localized_desc>
                        <localized_desc language="fr"></localized_desc>
                    </description>
                    <substitute>CLASS</substitute>
                </tag>
                <tag name="__nameddate" tagType="NamedDate">
                    <description>
                        <localized_desc language="en"></localized_desc>
                        <localized_desc language="fr"></localized_desc>
                    </description>
                    <substitute>DATE</substitute>
                    <callbacks>
                        <callback>dd-MMM-YYYY hh:mm:ss</callback>
                    </callbacks>
                </tag>
                <tag name="__namedcat" tagType="NamedCategory">
                    <description>
                        <localized_desc language="en"></localized_desc>
                        <localized_desc language="fr"></localized_desc>
                    </description>
                    <substitute>CATEGORY</substitute>
                    <callbacks>
                        <callback>decode_named_category</callback>
                    </callbacks>
                </tag>
                <tag name="__namedsev" tagType="NamedSeverity">
                    <description>
                        <localized_desc language="en"></localized_desc>
                        <localized_desc language="fr"></localized_desc>
                    </description>
                    <substitute>SEVERITY</substitute>
                    <callbacks>
                        <callback>decode_named_severity</callback>
                    </callbacks>
                </tag>
            </tags>
            <commonTags>
                <commonTag name="event_id">zone_transfer</commonTag>
                <commonTag name="program">named</commonTag>
            </commonTags>
            <examples>
                <example>
                     <text>transfer of 'localdomain/IN' from 192.168.1.3#53: end of transfer</text>
                     <expectedTags>
                          <expectedTag name="source_ip">192.168.1.3</expectedTag>
                          <expectedTag name="event_id">zone_transfer</expectedTag>
                          <expectedTag name="zone">localdomain</expectedTag>
                          <expectedTag name="class">IN</expectedTag>
                          <expectedTag name="action">end</expectedTag>
                          <expectedTag name="program">named</expectedTag>
                          <expectedTag name="taxonomy">name resolution</expectedTag>
                     </expectedTags>
                </example>
            </examples>
        </pattern>
        <pattern name="named-003">
            <description>
                <localized_desc language="en"></localized_desc>
                <localized_desc language="fr"></localized_desc>
            </description>
            <text>(?:DATE )?(?:CATEGORY )?(?:SEVERITY )?transfer of 'ZONE/CLASS' from IP#PORT: failed while receiving responses: REFUSED</text>
            <tags>
                <tag name="source_ip" tagType="IP">
                    <description>
                        <localized_desc language="en"></localized_desc>
                        <localized_desc language="fr"></localized_desc>
                    </description>
                    <substitute>IP</substitute>
                </tag>
                <tag name="source_port" tagType="Integer">
                    <description>
                        <localized_desc language="en"></localized_desc>
                        <localized_desc language="fr"></localized_desc>
                    </description>
                    <substitute>PORT</substitute>
                </tag>
                <tag name="zone" tagType="NonWhitespaceChar">
                    <description>
                        <localized_desc language="en"></localized_desc>
                        <localized_desc language="fr"></localized_desc>
                    </description>
                    <substitute>ZONE</substitute>
                </tag>
                <tag name="class" tagType="Class">
                    <description>
                        <localized_desc language="en"></localized_desc>
                        <localized_desc language="fr"></localized_desc>
                    </description>
                    <substitute>CLASS</substitute>
                </tag>
                <tag name="__nameddate" tagType="NamedDate">
                    <description>
                        <localized_desc language="en"></localized_desc>
                        <localized_desc language="fr"></localized_desc>
                    </description>
                    <substitute>DATE</substitute>
                    <callbacks>
                        <callback>dd-MMM-YYYY hh:mm:ss</callback>
                    </callbacks>
                </tag>
                <tag name="__namedcat" tagType="NamedCategory">
                    <description>
                        <localized_desc language="en"></localized_desc>
                        <localized_desc language="fr"></localized_desc>
                    </description>
                    <substitute>CATEGORY</substitute>
                    <callbacks>
                        <callback>decode_named_category</callback>
                    </callbacks>
                </tag>
                <tag name="__namedsev" tagType="NamedSeverity">
                    <description>
                        <localized_desc language="en"></localized_desc>
                        <localized_desc language="fr"></localized_desc>
                    </description>
                    <substitute>SEVERITY</substitute>
                    <callbacks>
                        <callback>decode_named_severity</callback>
                    </callbacks>
                </tag>
            </tags>
            <commonTags>
                <commonTag name="event_id">zone_transfer_failure</commonTag>
                <commonTag name="program">named</commonTag>
                <commonTag name="action">failed</commonTag>
            </commonTags>
            <examples>
                <example>
                     <text>transfer of 'ns2.domain.de/IN' from 192.168.0.5#53: failed while receiving responses: REFUSED</text>
                     <expectedTags>
                          <expectedTag name="source_ip">192.168.0.5</expectedTag>
                          <expectedTag name="event_id">zone_transfer_failure</expectedTag>
                          <expectedTag name="zone">ns2.domain.de</expectedTag>
                          <expectedTag name="class">IN</expectedTag>
                          <expectedTag name="action">failed</expectedTag>
                          <expectedTag name="program">named</expectedTag>
                          <expectedTag name="taxonomy">name resolution</expectedTag>
                     </expectedTags>
                </example>
            </examples>
        </pattern>
        <pattern name="named-004">
            <description>
                <localized_desc language="en"></localized_desc>
                <localized_desc language="fr"></localized_desc>
            </description>
            <text>(?:DATE )?(?:CATEGORY )?(?:SEVERITY )?lame server resolving 'DOMAIN' \(in 'ZONE'\?\): IP#PORT</text>
            <tags>
                <tag name="dest_ip" tagType="IP">
                    <description>
                        <localized_desc language="en"></localized_desc>
                        <localized_desc language="fr"></localized_desc>
                    </description>
                    <substitute>IP</substitute>
                </tag>
                <tag name="dest_port" tagType="Integer">
                    <description>
                        <localized_desc language="en"></localized_desc>
                        <localized_desc language="fr"></localized_desc>
                    </description>
                    <substitute>PORT</substitute>
                </tag>
                <tag name="zone" tagType="NonWhitespaceChar">
                    <description>
                        <localized_desc language="en"></localized_desc>
                        <localized_desc language="fr"></localized_desc>
                    </description>
                    <substitute>ZONE</substitute>
                </tag>
                <tag name="domain" tagType="NonWhitespaceChar">
                    <description>
                        <localized_desc language="en"></localized_desc>
                        <localized_desc language="fr"></localized_desc>
                    </description>
                    <substitute>DOMAIN</substitute>
                </tag>
                <tag name="__nameddate" tagType="NamedDate">
                    <description>
                        <localized_desc language="en"></localized_desc>
                        <localized_desc language="fr"></localized_desc>
                    </description>
                    <substitute>DATE</substitute>
                    <callbacks>
                        <callback>dd-MMM-YYYY hh:mm:ss</callback>
                    </callbacks>
                </tag>
                <tag name="__namedcat" tagType="NamedCategory">
                    <description>
                        <localized_desc language="en"></localized_desc>
                        <localized_desc language="fr"></localized_desc>
                    </description>
                    <substitute>CATEGORY</substitute>
                    <callbacks>
                        <callback>decode_named_category</callback>
                    </callbacks>
                </tag>
                <tag name="__namedsev" tagType="NamedSeverity">
                    <description>
                        <localized_desc language="en"></localized_desc>
                        <localized_desc language="fr"></localized_desc>
                    </description>
                    <substitute>SEVERITY</substitute>
                    <callbacks>
                        <callback>decode_named_severity</callback>
                    </callbacks>
                </tag>
            </tags>
            <commonTags>
                <commonTag name="event_id">lame_server_report</commonTag>
                <commonTag name="program">named</commonTag>
            </commonTags>
            <examples>
                <example>
                     <text>lame server resolving 'www.cadenhead.org' (in 'cadenhead.org'?): 67.19.3.218#53</text>
                     <expectedTags>
                          <expectedTag name="dest_ip">67.19.3.218</expectedTag>
                          <expectedTag name="event_id">lame_server_report</expectedTag>
                          <expectedTag name="zone">cadenhead.org</expectedTag>
                          <expectedTag name="domain">www.cadenhead.org</expectedTag>
                          <expectedTag name="program">named</expectedTag>
                          <expectedTag name="taxonomy">name resolution</expectedTag>
                     </expectedTags>
                </example>
            </examples>
        </pattern>
    </patterns>
</normalizer>