| 1 |
/* |
| 2 |
* Argus-5.0 Client Software. Tools to read, analyze and manage Argus data. |
| 3 |
* Copyright (c) 2000-2024 QoSient, LLC |
| 4 |
* All rights reserved. |
| 5 |
* |
| 6 |
* This program is free software, released under the GNU General |
| 7 |
* Public License; you can redistribute it and/or modify it under the terms |
| 8 |
* of the GNU General Public License as published by the Free Software |
| 9 |
* Foundation; either version 3, or any later version. |
| 10 |
* |
| 11 |
* Other licenses are available through QoSient, LLC. |
| 12 |
* Inquire at [email protected]. |
| 13 |
* |
| 14 |
* This program is distributed WITHOUT ANY WARRANTY; without even the |
| 15 |
* implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 16 |
* See the * GNU General Public License for more details. |
| 17 |
* |
| 18 |
* You should have received a copy of the GNU General Public License |
| 19 |
* along with this program; if not, write to the Free Software |
| 20 |
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 21 |
* |
| 22 |
* radns - decode argus record DNS captured user data |
| 23 |
* and generate trees to hold the data |
| 24 |
* |
| 25 |
* Author: Carter Bullard [email protected] |
| 26 |
*/ |
| 27 |
|
| 28 |
Mon May 29 14:51:01 EDT 2017 |
| 29 |
|
| 30 |
Added radnsdb.pl as a helper application for using radns data from mysql. |
| 31 |
Radnsdb is passed a date, and it reads dns transactions from the appropriate |
| 32 |
dnsFlows/dns_%Y_%m_%d table, and writes json strings into a dnsNames database. |
| 33 |
|
| 34 |
This dnsNames database, can be used by the dnsq.pl to find json data for specific |
| 35 |
IP addresses for any given date. |
| 36 |
|
| 37 |
|
| 38 |
Used this to populate the dnsNames database from an existing dnsFlows database. |
| 39 |
|
| 40 |
for i in `mysql -u root dnsFlows --skip-column-names -Be "show tables"`; do echo $i; radnsdb -t `echo $i | awk 'BEGIN{FS="_"}{print $2"/"$3"/"$4}'` -w mysql://root@localhost/dnsNames/$i; done |
| 41 |
|
| 42 |
|
| 43 |
This directory contains source code for radns.1, an example program that |
| 44 |
uses the user data found in DNS argus records to track if the addresses |
| 45 |
in the flows were learned from DNS. |
| 46 |
|
| 47 |
The basic idea is that argus has parsed all the traditional network |
| 48 |
headers, TCP, UDP, ICMP, etc ... and the DNS payload data that argus |
| 49 |
captures is a binary copy of the complete data in the packet found |
| 50 |
after these headers. Using parsing engines, such as tcpdump or wireshark's, |
| 51 |
the DNS requests and responses are check for protocol conformity, and |
| 52 |
then categorized by DNS content. |
| 53 |
|
| 54 |
The addresses which were advertised as authoratative answers, are |
| 55 |
tracked and all flow records received has their addresses checked to see |
| 56 |
if they were learned through DNS. |
| 57 |
|
| 58 |
Because flows can live much longer than the DNS references to the addresses |
| 59 |
being used, you only really want to check the START records to see if there |
| 60 |
is a DNS cache at the time of the start of transaction. |
| 61 |
|
| 62 |
In gargoyle's end system approach for Linux/Mac OS X, we also have argus |
| 63 |
events to tell us if there are long lived flows to expect, which we can |
| 64 |
use to notify the DNS tracking engine that some of the flows addresses |
| 65 |
need not be searched. |
| 66 |
|
| 67 |
Because gargoyles argus may not capture the complete packet payload, the |
| 68 |
routines do ensure that they deal with truncation well. |
| 69 |
|
| 70 |
Radns.1 is an example, and as such, you should be able to add your own |
| 71 |
decoders, pretty quickly. |
| 72 |
|
| 73 |
|
| 74 |
See the manpage for radns.1 for details. |