1 TITLE: Port Scan Detection
3 AUTHOR: yoonsoo <yoonsoo@gmx.net>
7 How to detect port scans
17 2. packages needed to be downloaded
18 3. installation of the packages
24 The first step of an attacker may be the scanning of your box
25 to find out what services you have running. Other way round it
26 could be helpful for yourself to scan your own machine to find
27 some security leaks. So both, a port scanner and a scan detector
28 could help to raise the security a little bit.
30 2. packages needed to be downloaded
31 --------------------------------
33 libpcap-0.7.1 ( www.tcpdump.org/release/ )
34 Libnet-1.0.2a ( www.packetfactory.net/Projects/Libnet/ )
35 libnids-1.16 ( www.packetfactory.net/Projects/Libnids/ )
36 scanlogd-2.2 ( www.openwall.com/scanlogd/ )
37 nmap-2.54BETA34 ( www.insecure.org/nmap/ )
43 ./configure --prefix=/usr
47 /* optional (will be needed for additiona packages maybe)
64 mv scanlogd.8 /usr/share/man/man8
65 useradd -g daemon scanlogd
66 echo "daemon.alert -/var/log/alert.log" >> /etc/syslog.conf
68 creating Startscript :
70 cat > /etc/rc.d/init.d/scanlogd << "EOF"
77 echo "Starting PortScan Logging Facility..."
81 echo "Stopping Portscan Logging..."
85 echo "Usage: $0 {start|stop}"
94 export GTK_CONFIG=/usr/X11R6/bin/gtk-config *)
95 configure --prefix=/usr
99 *) if you dont have gtk and gnome installed, you will have to
100 disable gtk and compile it without gtk support. In this case you will
101 not have nmapfe (the gtk-frontend to nmap), otherwise specify the path
107 Now you can test both. Scan your box with nmap (or nmapfe) and check the
108 file /var/log/alert.log.
112 http://scan.sysgatetech.com
114 As it is already mentioned on the documentations of scanlogd, this does
115 NOT prevent any port scan but just logging them.
121 add some more programs and daemons to raise the security of LFS
123 ---------------------------------------------------
124 For additions remarks and bugs please contact me on
126 yoonsoo@gmx.net. thx.
127 ----------------------------------------------------