• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

COPYINGH A D18-Jan-200517.6 KiB341281

ChangeLogH A D05-Dec-20061 KiB3117

Class.hH A D18-Oct-20062.7 KiB12694

FlowNode.cppH A D24-Oct-20063.1 KiB155116

FlowTree.cppH A D27-Nov-200611.1 KiB449361

HostNode.cppH A D24-Oct-20061.6 KiB6640

HostTree.cppH A D24-Oct-200610.7 KiB443356

INSTALLH A D18-Jan-200517 31

Makefile.amH A D18-Jan-2005134 43

Makefile.inH A D18-Oct-200617.7 KiB554482

READMEH A D05-Dec-20063.9 KiB7363

[config.h].inH A D18-Jan-20050

aclocal.m4H A D18-Oct-200630.8 KiB863773

config.guessH A D18-Jan-200541.1 KiB1,4081,211

config.h.inH A D18-Jan-20054.3 KiB176117

config.subH A D18-Jan-200529.6 KiB1,5051,364

configureH A D03-May-2022242.9 KiB8,1386,831

configure.inH A D18-Oct-20063 KiB139127

defs.hH A D18-Oct-20065.8 KiB248170

depcompH A D18-Jan-200514.8 KiB527335

install-shH A D18-Jan-20059.3 KiB326189

main.cppH A D05-Dec-20068.6 KiB353296

missingH A D18-Jan-200510.4 KiB361270

README

1glFlow 0.1.4
2by Vlad GALU <dudu@dudu.ro> and
3   Andrei GAVRILOAIE <gavriloaie_andrei@yahoo.com>
4
5--[ 0x01 What's this ?
6        glFlow is a traffic analysis tool mainly intended for high-speed links.
7It detects DoS incidents by performing real time NetFlow traffic aggregation and
8analysis.
9
10--[ 0x02 What do I run it on ?
11        It was written on FreeBSD and tested on both FreeBSD and Linux. It
12should work on any OS to which libpcap and OpenSSL were ported. The rest of the
13code is perfectly portable.
14
15--[ 0x03 How does it work ?
16        Cisco Systems have defined the 'flow' as a four value tuplet:
17{srcaddr, srcport, dstaddr, dstport}. The format evolved over time. The complete
18structures for various NetFlow versions are available on Cisco's site. Now,
19let's assume that the attacker floods the victim with packets that keep the same
20characteristics throughout the duration of the attack. No source spoof, no
21source port increments or randomizations. That would lead to a very large packet
22rate inside that flow. glFlow calculates the average packet rate in every flow
23and raises an alarm signal if the threshold is hit.
24        What about spoofed attacks ? How are they detected ? Simple. glFlow
25keeps a history for every destination host that it sees. When a new flow is
26created, the flow counter for that host is incremented. The average number of
27newly created flows corresponding to a specific host in a specific amount of
28time is calculated, and, as above, an alarm is raised if the threshold is hit.
29        To prevent attacks that don't hit any of the above thresholds, there's
30a new one starting with v0.1, measuring the packet rate for a destination.
31
32--[ 0x04 Can't other tools, like SNORT, do this ?
33        We sincereley believe not. Remember, glFlow was written with high
34speeds in mind. We've been using it at over 500Mbps. At that speed, with an
35ordinary x86 machine, even with a strong motherboard/NIC combination, you can't
36do anything fancy. glFlow was specifically designed for detecting large floods
37in real time, or at least something close to that.
38
39--[ 0x05 How is it that it's so fast ?
40        Well, Andrei did a great job implementing a very fast binary tree.
41That allowed us to drop the threaded model and choose a single loop design. The
42new results were stunning. The tests were made on a P4 Xeon/3 GHz, with an
43Intel GigE NIC. The average traffic rate was about 500Mbps, with an average
44packet rate of 100kpps. That lead to about 200k active flows. glFlow managed to
45clean the inactive ones in less than 0.3 seconds. There was no alarm raised
46after more than 5 seconds of flooding. glFlow ate ~50% of the CPU, while
47consuming about 40MB of system memory.
48
49--[ 0x06 How do I install and run it ?
50	Run ./configure --help. You'll see two adjustable knobs: --with-hash and
51--enable-debug. The first one permits you to switch between MD4 and MD5 summing
52of the flow and host structures kept in the memory. The second lets you run
53glflow in the foreground, printing some statistics on stdout.
54        The thresholds are harcoded in defs.h. You shouldn't have any trouble
55tweaking them. However, we've observed that the best results are obtained when
56using the same values for flow lifetime and the time between flow cleanups. And
57they shouldn't be much over 20. The smaller the tree is, the faster it will be
58cleaned.
59        Finally, edit your /etc/syslog.conf and write something like this:
60"local6.*<tabs>/var/log/something". Restart sys[k]logd afterwards.
61        Fire glFlow up, like this: "./glFlow <interface> <bpf filter>" and
62watch /var/log/something for changes. You may play with nmap or some DoS
63programs to test it. The IP's in the syslog will be shown as integers rather
64than in dotted notation. We decided to leave this job to the log analyzer.
65
66--[ 0x07 Can it go even faster ?
67        Sure. There are a few methods which permit you to improve the packet
68capture. For more info read Luca Deri's paper: http://luca.ntop.org/Ring.pdf
69
70--[ 0x08 Licensing ?
71        GPL.
72
73