Carter Bullard | 1 Oct 2010 01:21

Re: Nondeterministic output

Hey George,
OMG, did you uncover a most interesting bug !!!  Seems that we had a race condition in
one of the memory allocation structures, and poor placement of a mutex, resulting in
us not always getting a message buffer when we want one (exacerbated because
when writing to stdout, we use a lot of message passing buffers to hold the data on
the device output queue), so we would schedule the message from the flow modeler
to the output processor (allowing us to continue to aggregate into the flow record, causing
inconsistent output), or we would throw the message away, resulting in lost flow records.

Wow.  Its fixed, and a lot of routines are now very clean as a result.
I'll be uploading a new version of argus tonight onto the server, and I'll send mail to the list.

Carter

On Sep 30, 2010, at 5:55 AM, George Jones wrote:

Thanks.  Look forward to testing the fix....my whole process is stdout pipelines...

On Sep 30, 2010 2:34 AM, "Carter Bullard" <carter <at> qosient.com> wrote:
> Hey George,
> Well, there are a number of things going on at the same time, but I'm getting a grip
> on this issue. When writing to a file, argus seems to be very consistent. When
> writing to stdout, it seems to be having some issues with getting all the records out
> of the engine, and it seems that when we zero out a record (when we write a flow
> status record, we maintain the cache, but zero out the metrics) things may not behave
> as we would like, ....., but only when we have to queue records for output. We do this
> when we are delivering flow records to the output socket/file descriptor faster than they
> can be written out the device. When we have partially written a record, and we are
> still queuing outgoing flow records, we get into a bad situation where we only clear
> one record every turn, and we have a turn every 0.020 seconds, so we get really slow.
> That is where the trouble then begins.
>
> So the short story is, when you write to disk, all is good, when you write to stdout, all
> is not. I'm working this now, but it is a head scratcher and so it may take a few days.
>
> Sorry for the inconvenience,
>
> Carter
>
> On Sep 21, 2010, at 11:05 AM, George Jones wrote:
>
>> The following command produces different output:
>>
>> cat foo.pcap | argus -U 64 -r - -w /tmp/foo.ar
>> cat foo.pcap | argus -U 64 -r - -w /tmp/bar.ar
>>
>> cksum(1) shows the content differs (but byte count is the same).
>>
>> More disturbing is different numbers of records output from identical runs on the same input, etc.
>>
>> cat foo.pcap | argus -U 64 -r - -w - | racluster -r - -w - | ra -r - | tee /tmp/1.out
>> cat foo.pcap | argus -U 64 -r - -w - | racluster -r - -w - | ra -r - | tee /tmp/2.out
>>
>> results in slightly different output. Sometimes there are slight differences in the flgs (packet ordering, I think),
>> but in a file of several thousand records, I'm getting 6 or so additional records in one output file vs the other.
>>
>> Confused,
>> ---George Jones
>
Attachment (smime.p7s): application/pkcs7-signature, 3815 bytes
Mark Bartlett | 1 Oct 2010 18:08
Picon

Flag Question

Hello all,

is there any documentation available showing argus flag output and how
it compares to flag options?? (E = ?, D = ?, SYN = ?, etc)

I am storing all my argus data in a database and want to create a
couple of sql queries to display different traffic, like all SYN
traffic, etc.

And Carter.. The "Mail Archive" link is giving me an error:
http://news.gmane.org/gmane.network.argus.

I get this error message:
Error GMANE-03252: Something is wrong. Perhaps something didn't match
a group name. Perhaps something else.

Thanks.

Bartlett

Carter Bullard | 1 Oct 2010 18:50

Re: Flag Question

Hey Bartlett,
Mail list site looks good, using the link you provided.  Maybe just a transient error?

So not sure what you are asking.  Is it comparisons/descriptions of the "State" variable
with the "Flags" variable?  Both fields are pretty well documented in the ra.1 man page?

Being able to pick out these states from MySQL calls maybe a challenge, as you end up
with a string in the database, say if you printed out the State field using the -z option, and
I'm not sure how to ask MySQL to match on the str[3] character, as an example.

The better question maybe to ask, how can we pre-process the data to generate indexes
that can deal with this type of query?  radium() could be used to enrich/label the argus data
as it is collected, and rasqltimeindex() is right now only indexing time, but the strategy could
easily handle any field in the data.  If we had some dialog as to what we would
want to query for, that maybe easiest.

Carter

On Oct 1, 2010, at 12:08 PM, Mark Bartlett wrote:

Hello all,

is there any documentation available showing argus flag output and how
it compares to flag options?? (E = ?, D = ?, SYN = ?, etc)

I am storing all my argus data in a database and want to create a
couple of sql queries to display different traffic, like all SYN
traffic, etc.

And Carter.. The "Mail Archive" link is giving me an error:
http://news.gmane.org/gmane.network.argus.

I get this error message:
Error GMANE-03252: Something is wrong. Perhaps something didn't match
a group name. Perhaps something else.



Thanks.

Bartlett




Attachment (smime.p7s): application/pkcs7-signature, 3815 bytes
maketsi | 4 Oct 2010 09:23
Picon

rabins does not process all records

Hi,

Rabins 3.0.3.17 does not seem to work the way it should. I don't know
if the problem is related to client (rabins) or server (argus 3.0.2)
problems. I have tried all 3.x versions of rabins and none of them
work.

# ratimerange -r t5.2010.09.28.10.50.00
2010-09-28T10:50:00 - 2010-09-28T10:55:00

The following is correct (i.e. matches with actual data seen with ra):

# rabins -M hard time 1m -r t5.2010.09.28.10.50.00  -m srcid -s stime
trans - host x.x.x.x
2010-09-28T10:50:00      2
2010-09-28T10:51:00      2
2010-09-28T10:52:00      1
2010-09-28T10:53:00      3

These are not correct:

# rabins -M hard time 1m -r t5.2010.09.28.10.50.00 -m srcid -s stime trans
2010-09-28T10:54:00  30237
2010-09-28T10:55:00   1850

# rabins -M hard time 1m -r t5.2010.09.28.10.50.00 -m srcid -s stime trans - tcp
2010-09-28T10:52:00  30131
2010-09-28T10:53:00  29577
2010-09-28T10:54:00  29542
2010-09-28T10:55:00   1746

See how the result changes with flow filter, but to the wrong
direction (i.e. more filtered = more data)?
The most bizarre result is this:

# rabins -M nomodify hard time 1m -r t5.2010.09.28.10.50.00 -m srcid
-s stime trans
2010-09-28T10:54:00  22070

This is what the data really looks like, without rabins:

# rasplit -r t5.2010.09.28.10.50.00 -M hard time 1m -w t1.
# for i in t1.*; do racluster -r $i -m srcid -s stime trans; done
2010-09-28T10:50:00  36992
2010-09-28T10:51:00  38443
2010-09-28T10:52:00  30744
2010-09-28T10:53:00  30202
2010-09-28T10:54:00  30237
2010-09-28T10:55:00   1850

Can you confirm the issue or do you need some debug data to play with?

carter | 4 Oct 2010 14:31

Re: rabins does not process all records

Hey Maketsi,
Several possibilities.
If the records are not time sorted, rabins() could be throwing records away.  You can test this by:
   rasort -r file -w - | rabins .......

The issue is that rabins() has to figure out what the startime and range is, in one pass of the data.

However, if you specify the time range with a "-t" option, you by-pass this logic.  Try a time filter that
spans the records to see if it gets better.

In all cases, if you run with some debug information, using the "-D" option, rabins() may tell us the problem.

Please send any results, so we can address this problem.

Carter

Carter
Carter
Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: maketsi <maketsi <at> gmail.com>
Sender: argus-info-bounces+carter=qosient.com <at> lists.andrew.cmu.edu
Date: Mon, 4 Oct 2010 10:23:16 
To: <argus-info <at> lists.andrew.cmu.edu>
Subject: [ARGUS] rabins does not process all records

Hi,

Rabins 3.0.3.17 does not seem to work the way it should. I don't know
if the problem is related to client (rabins) or server (argus 3.0.2)
problems. I have tried all 3.x versions of rabins and none of them
work.

# ratimerange -r t5.2010.09.28.10.50.00
2010-09-28T10:50:00 - 2010-09-28T10:55:00

The following is correct (i.e. matches with actual data seen with ra):

# rabins -M hard time 1m -r t5.2010.09.28.10.50.00  -m srcid -s stime
trans - host x.x.x.x
2010-09-28T10:50:00      2
2010-09-28T10:51:00      2
2010-09-28T10:52:00      1
2010-09-28T10:53:00      3

These are not correct:

# rabins -M hard time 1m -r t5.2010.09.28.10.50.00 -m srcid -s stime trans
2010-09-28T10:54:00  30237
2010-09-28T10:55:00   1850

# rabins -M hard time 1m -r t5.2010.09.28.10.50.00 -m srcid -s stime trans - tcp
2010-09-28T10:52:00  30131
2010-09-28T10:53:00  29577
2010-09-28T10:54:00  29542
2010-09-28T10:55:00   1746

See how the result changes with flow filter, but to the wrong
direction (i.e. more filtered = more data)?
The most bizarre result is this:

# rabins -M nomodify hard time 1m -r t5.2010.09.28.10.50.00 -m srcid
-s stime trans
2010-09-28T10:54:00  22070


This is what the data really looks like, without rabins:

# rasplit -r t5.2010.09.28.10.50.00 -M hard time 1m -w t1.
# for i in t1.*; do racluster -r $i -m srcid -s stime trans; done
2010-09-28T10:50:00  36992
2010-09-28T10:51:00  38443
2010-09-28T10:52:00  30744
2010-09-28T10:53:00  30202
2010-09-28T10:54:00  30237
2010-09-28T10:55:00   1850

Can you confirm the issue or do you need some debug data to play with?

Berkay Celik | 4 Oct 2010 18:43
Picon

-s option problems, how to extract new features

  Hey,

After 2 week practice with argus (argus-clients-3.0.2), i'm facing some 
problems.
let me start:
1st Using 
http://bro-ids.org/enterprise-traces/hdr-traces05/lbl-internal.20041004-1303.port001.dump.anon
pcap file i'm trying to get some of -s features,

after converting arg file with the command :
argus -r lbl-internal.20041004-1303.port001.dump.anon -w output.arg

Simply ra -nr output.arg -s stime - ip | less : gives all black page. 
(exported to csv file again blank file, tried with other features such 
as saddr only gives these

without stime)
when i try the to see the default ra features :
everthing works fine (ra -nr output.arg -s stime - ip | less)

before posting i thought that what if my pcap file has problems, so i 
tried it with another pcap file however problem remains.

2nd when i read the man pages i see that there are alot of features i 
can extract:
spktsz: histogram for the src packet size distribution
smaxsz,dminsz etc. seems nice so i start trying...

Convert to arg file:
argus -r lbl-internal.20041004-1303.port001.dump.anon -w output.arg

simply i just wrote:

ra -L0 -nnr output.arg -s stime ltime dir saddr sport daddr dport proto 
dir spktsz smaxsz dpktsz dmaxs - ip

But the result is giving with these features as default
SrcAddr Sport DstAddr Dport Type Dir SrcPkt   DstPkt

okey there is a problem with stime, omit it and try it again see what 
happens:
again same results,

Maybe i remembered from Lee's blog i have to use -  -mAJZRU option, he 
says to get as much data as possible.

again i got error using -mAJZRU 512, probably version differences and 
some options i don't need.
so reducing the options by reading the help page.

argus -J -r lbl-internal.20041004-1303.port001.dump.anon -w majzru.arg

and tried all command same results.

3rd i need to get some other stats from the flows i defined in a 
timeslice, let says from destination to source median of the packets or 
variance of total bytes in packets etc. some unique features i'm looking 
for.

how can i add these to the -s option.

thanks

i really appreciate your help,

Berkay

George Jones | 5 Oct 2010 15:38
Picon

filtering on pkts == filtering on dst pkts ?

This does not look right.  Looks like "racluster ... -w - | ra -r - - pkts gt N" is filtering on "dst pkts gt N".   I expected it to
filter on total pkts gt N.

Bug in the code or my understanding ?

Thanks,
---George

george <at> antique:~/data/pcap$ ra -r anony.ra -w - | ra -r - -s +spkts,dpkts - port 53620
      StartTime    Flgs  Proto            SrcAddr  Sport   Dir            DstAddr  Dport  TotPkts   TotBytes State  SrcPkts  DstPkts
08:34:39.956574  e         tcp          100.0.1.7.53620     ->          100.0.3.1.www          62      39399   CON       29       33
08:34:45.818360  e         tcp          100.0.1.7.53620     ->          100.0.3.1.www           8       2174   CON        4        4
08:36:49.895042  e         tcp          100.0.1.7.53620    <?>          100.0.3.1.www           4        264   FIN        2        2
george <at> antique:~/data/pcap$
george <at> antique:~/data/pcap$ # clustered
george <at> antique:~/data/pcap$ racluster -r anony.ra -w - | ra -r - -s +spkts,dpkts - port 53620
      StartTime    Flgs  Proto            SrcAddr  Sport   Dir            DstAddr  Dport  TotPkts   TotBytes State  SrcPkts  DstPkts
08:34:39.956574  e         tcp          100.0.1.7.53620     ->          100.0.3.1.www          74      41837   FIN       35       39
george <at> antique:~/data/pcap$
george <at> antique:~/data/pcap$ # pkts gt dstpkts - 1
george <at> antique:~/data/pcap$ racluster -r anony.ra -w - | ra -r - -s +spkts,dpkts - port 53620 and pkts gt 38
      StartTime    Flgs  Proto            SrcAddr  Sport   Dir            DstAddr  Dport  TotPkts   TotBytes State  SrcPkts  DstPkts
08:34:39.956574  e         tcp          100.0.1.7.53620     ->          100.0.3.1.www          74      41837   FIN       35       39
george <at> antique:~/data/pcap$
george <at> antique:~/data/pcap$ #pkts gt dst pkts
george <at> antique:~/data/pcap$ racluster -r anony.ra -w - | ra -r - -s +spkts,dpkts - port 53620 and pkts gt 39
george <at> antique:~/data/pcap$

George Jones | 6 Oct 2010 14:55
Picon

extracting pcaps from argus records ?

Is there a way to extract/reconstruct pcap records from argus streams ?  What would be lost (ordering, timing, non-tcp/udp packets, packet content if not doing full capture...) ?

Thanks,
---George Jones

Carter Bullard | 6 Oct 2010 15:57

new argus on the dev server

Gentle people,
There is a new argus, argus-3.0.3.17.tar.gz on http://qosient.com/argus/dev that fixes a number
of memory management problems that generated some odd errors.  These bugs cause argus
to not report some traffic that it is tracking, so please grab the new software, and give it a run.

   http://qosient.com/argus/dev/argus-latest.tar.gz

Hopefully this is the last test release before we officially release argus-3.0.4.  New clients are
on the way, dealing with bugs on the dev list, sorry that I've been swamped on a new effort.

Hope all is most excellent, and thanks for all the help!!!!!

Carter
Attachment (smime.p7s): application/pkcs7-signature, 3815 bytes
Terry Burton | 6 Oct 2010 19:24
Picon
Favicon

Re: new argus on the dev server

On Wed, Oct 6, 2010 at 2:57 PM, Carter Bullard <carter <at> qosient.com> wrote:
> There is a new argus, argus-3.0.3.17.tar.gz on http://qosient.com/argus/dev that fixes a number
> of memory management problems that generated some odd errors.  These bugs cause argus
> to not report some traffic that it is tracking, so please grab the new software, and give it a run.
>
>   http://qosient.com/argus/dev/argus-latest.tar.gz
>
> Hopefully this is the last test release before we officially release argus-3.0.4.  New clients are
> on the way, dealing with bugs on the dev list, sorry that I've been swamped on a new effort.

Hi Carter,

I've upgraded to this release and find that the new argus processes
leak memory. See attached plots.

If you are unable to replicate this then let me know and I will try to
find time to help diagnose it. I invoke the process thus:

argus -X -J -R -Z -U 80 -m -M 60 -i eth4/0.0.0.0 -P 561 -w
argus-udp://1.2.3.4:10500

Also, is there any chance of disabling the Teredo detection by default
for the 3.0.4 release?

All the best,

Terry

----

System:  Linux sniff 2.6.32-bpo.5-amd64 #1 SMP Mon Aug 23 09:19:35 UTC
2010 x86_64 GNU/Linux
Paths:    /opt/argus/bin/ra /usr/bin/make /usr/bin/gcc /usr/bin/cc
GCC:     Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian
4.3.2-1.1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc
--enable-mpfr --enable-cld --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.3.2 (Debian 4.3.2-1.1)

Gmane