By Kerry J. Cox, Christopher Gerg
Book Price: $39.95 USD
£28.50 GBP
PDF Price: $27.99
Cover | Table of Contents | Colophon
|
Snort's homepage
|
http://www.snort.org
|
|
SecurityFocus IDS Page
|
http://www.securityfocus.com/ids
|
|
The SANS Institute
|
http://www.sans.org
|
|
CERT homepage
|
http://www.cert.org
|
|
The NSA Security Guides
|
http://www.nsa.gov/snac/index.cfm
|
|
tcpdump homepage
|
http://www.tcpdump.org
|
|
ethereal homepage
|
http://www.ethereal.com
|
# rpm -e tcpdump
# cp tcpdump-3.8.1.tar.gz /usr/local/src/ # cp libpcap-0.8.1.tar.gz /usr/local/src/ # cd /usr/local/src # tar -zxvf tcpdump-3.8.1.tar.gz # tar -zxvf libpcap-0.8.1.tar.gz
--help
flag following the configure command. In most
cases, though, you won't need any options.
Here's how to install libpcap and tcpdump from
source:# cd libpcap-0.8.1 # ./configure ; make ; make install # cd ../tcpdump-3.8.1 # ./configure ; make ; make install
07:00:48.036746 ping.net > myhost.com: icmp echo request (DF) 07:00:48.036776 myhost.com > ping.net: icmp: echo reply (DF) 07:02:12.622460 log.net.3155 > syslog.com.514: udp 101 07:03:01.132414 send.net.32938 > mail.com.25 S 248631:248631(0) win 8760
-x. It can also
write the "raw packets" to a file
using -w rather than sending them to standard
output or to the console. Writing the contents to a file is extremely
useful when you only have command-line access to a sniffer but want
to dump the capture to a file for later analysis (or analysis by
another tool). tcpdump filters assist in specifying data-only traffic
on a particular port, such as port 22, or by using a specific
protocol such as UDP, instead of collecting all data and filling up
the logs. These filters are applied directly within the kernel, so no
circular copying to the user space is needed.14:02:09.181190 specto.ksl.com.33248 > quasi.ksl.com.ftp: S 1191864640:1191864640(0) win 5840 <mss 1460,sackOK,timestamp 238617 0,nop,wscale 0> (DF)
# ./configure && make && make install
|
ethereal
|
http://www.ethereal.com
|
|
libpcap
|
http://www.tcpdump.org
|
|
libpcap tutorial
|
http://www.cet.nau.edu/~mc8/Socket/Tutorials/section1.html
|
|
Packetyzer
|
http://www.networkchemistry.com/products/packetyzer/
|
|
Pcap tutorial
|
http://www.tcpdump.org/pcap.htm
|
|
Sans TCP/IP Guide
|
http://www.sans.org/resources/tcpip.pdf
|
|
tcpdump
|
http://www.tcpdump.org
|
|
Tethereal
|
http://www.ethereal.com
|
|
WinDump
|
http://windump.polito.it
|
|
WinPcap
|
http://winpcap.polito.it |
http://www.snort.org, building it is easy. I
create a directory in /usr/local/src called
snort. I move the downloaded gzipped tarball to
that directory and perform the following commands:
$ tar xvft snort-2.1.x.tar.gz
$ cd snort-2.1.x
$ ./configure
$ make
# make install
-A
alert-mode
fast, full,
none, and unsock. Rather than
specifying the alert mode within a configuration file, you can
include it here at the command line.-b
-B
address-conversion-mask
-h (or HOME_NET) setting. This helps hide the real
internal network addresses inside binary logs.-c
config-file
-C
-d
-D
snort
-v)snort
-l)snort
-A or snort
-c
<path_to_conf_file>)-v flag:
# snort -v
Running in packet dump mode
Log directory = /var/log/snort
Initializing Network Interface eth0
--== Initializing Snort ==--
Initializing Output Plugins!
Decoding Ethernet on interface eth0
--== Initialization Complete ==--
-*> Snort! <*-
Version 2.1.x (Build 72)
By Martin Roesch (roesch@sourcefire.com, www.snort.org)
06/24-11:19:32.257859 64.147.136.193:3131 -> 192.168.0.15:9100
TCP TTL:128 TOS:0x0 ID:21742 IpLen:20 DgmLen:48 DF
******S* Seq: 0x5DB36D37 Ack: 0x0 Win: 0xFAF0 TcpLen: 28
TCP Options (4) => MSS: 1460 NOP NOP SackOK
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
06/24-11:19:32.261606 64.147.136.5 -> 224.0.0.10
EIGRP TTL:2 TOS:0x0 ID:0 IpLen:20 DgmLen:60
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
06/24-11:19:34.470931 64.147.136.1 -> 224.0.0.10
EIGRP TTL:2 TOS:0xC0 ID:0 IpLen:20 DgmLen:60
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
06/24-11:19:34.482799 64.147.136.1 -> 224.0.0.10
EIGRP TTL:2 TOS:0xC0 ID:0 IpLen:20 DgmLen:60
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
===========================================================================
Snort analyzed 38 out of 38 packets, dropping 0(0.000%) packets
Breakdown by protocol: Action Stats:
TCP: 1 (2.632%) ALERTS: 0
UDP: 0 (0.000%) LOGGED: 0
ICMP: 0 (0.000%) PASSED: 0
ARP: 0 (0.000%)
EAPOL: 0 (0.000%)
IPv6: 0 (0.000%)
IPX: 0 (0.000%)
OTHER: 37 (97.368%)
DISCARD: 0 (0.000%)
===========================================================================
Wireless Stats:
Breakdown by type:
Management Packets: 0 (0.000%)
Control Packets: 0 (0.000%)
Data Packets: 0 (0.000%)
===========================================================================
Fragmentation Stats:
Fragmented IP Packets: 0 (0.000%)
Fragment Trackers: 0
Rebuilt IP Packets: 0
Frag elements used: 0
Discarded(incomplete): 0
Discarded(timeout): 0
Frag2 memory faults: 0
===========================================================================
TCP Stream Reassembly Stats:
TCP Packets Used: 0 (0.000%)
Stream Trackers: 0
Stream flushes: 0
Segments used: 0
Stream4 Memory Faults: 0
===========================================================================
Snort exiting