Remove lfs-uefi.txt symlink
[linux_from_scratch_hints.git] / PREVIOUS_FORMAT / portscan.txt
blobf1bf3049ab5ebe27cdf9b92d3f6020d4c5e929f3
1 TITLE:          Port Scan Detection 
2 LFS VERSION:    3.3
3 AUTHOR:         yoonsoo <yoonsoo@gmx.net>
6 SYNOPSIS:
7         How to detect port scans 
9 HINT:
10 Version 0.2
11 20/05/2002
13 Contents
14 --------
16     1. Preface
17     2. packages needed to be downloaded
18     3. installation of the packages
19     4. testing
20     5. TODO
22 1. Preface
23    -------
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    --------------------------------
32         
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/ )
39 3. Installation
40    ------------
41          
42         libpcap-0.7.1 
43                 ./configure --prefix=/usr
44                 make 
45                 make install
47 /* optional (will be needed for additiona packages maybe)
49         Libnet-1.0.2a
50                 ./configure 
51                 make
52                 make install
54         libnids-1.16
55                 ./configure 
56                 make
57                 make install
61         scanlogd-2.2
62                 make linux
63                 mv scanlogd /usr/sbin
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"
71 #!/bin/bash
73 source $rc_functions
75 case "$1" in
76         start)
77                 echo "Starting PortScan Logging Facility..."
78                 loadproc scanlogd
79                 ;;
80         stop)
81                 echo "Stopping Portscan Logging..."
82                 killproc scanlogd
83                 ;;
84         *)
85                 echo "Usage: $0 {start|stop}"
86                 exit 1
87                 ;;
88 esac
89 EOF
91                 nmap-2.54BETA34
92         ---------------
93                 
94                         export GTK_CONFIG=/usr/X11R6/bin/gtk-config *)
95                         configure --prefix=/usr
96                         make
97                         make install
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
102 to your gtk-config
104 4. Testing
105 ----------
107 Now you can test both. Scan your box with nmap (or nmapfe) and check the
108 file /var/log/alert.log.
110 or use 
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.
118 5.TODO
119 ------
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 ----------------------------------------------------