Penguin
Annotated edit history of LIDSNotes version 4 showing authors affecting page license. View with all changes included.
Rev Author # Line
1 GerwinVanDeSteeg 1 These notes refer to the [Linux Intrusion Detection System|LIDS]
2
3 !!Installation Instructions
4
5 If you have no experience in installing a new Kernel please refer to the KernelNotes section.
6
7 !Kernel 2.6.x
8
9 Assumes the lids package is installed in /usr/src/lids-{version}-{kernel-version}, and the kernel source is installed to /usr/src/linux-{kernel-version}. The examples will assume kernel 2.6.0 and lids 2.0.3 for 2.6.0.
10
11 * First ensure you have a working installtion of the 2.6.x kernel that you wish to add the LIDS patch to.
12 * Patch the source of the 2.6.x kernel with the [LIDS] patch
13
14 % cd /usr/src/linux-2.6.0
15 % patch -p1 < /usr/src/lids-2.0.3-2.6.0/lids-2.0.3-2.6.0.patch
16
17 * Configure the lidstools package
18
19 % cd /usr/src/lids-2.0.3-2.6.0/lidstools-0.5.1
20 % ./configure KERNEL_DIR=/usr/src/linux-2.6.0
21
22 * Install the lidstools package
23
24 % make
25 % make install
26
27 * Enter your [LIDS] password (Don't forget this)
28
29 * Configure the 2.6.x kernel (make config|menuconfig|xconfig) and enable [LIDS]
30
31 % cd /usr/src/linux-2.6.0
32 % make menuconfig
33
34 --> Security Options
35 [[*] Enable Different Security Models
36 < > Default Linux Capabilities
37 --> Linux Intrusion Detection System
38 <M> Linux Intrusion Detection System support (EXPERIMENTAL)
39
40 * As with any kernel upgrade ensure you have a backup kernel that can be loaded in the event of a failure.
41 * Build the new kernel
42
43 % make all
44 % make modules_install
45
46 * Setup the [ACL]s for your [LIDS] installation (/etc/lids)
47
48 % cd /etc/lids
49
50 check the files: lids.ini, lids.net, lids.*.cap, lids.*.conf
51
52 * Install the new kernel
53
54 Don't forget to update your BootLoader (GRUB, LILO, or other) to be able to load the new kernel.
55
56 * Test the kernel
57
58 % reboot
59
60 * Load the LIDS module
61
62 % modprobe lids
63
64 !!Installation Notes
65
66 * When compiling the [LIDS] module, you cannot load it if the default linux capabilities security module is already loaded.
2 GerwinVanDeSteeg 67
68 !!Fedora Core 1
69
70 After having updated the Kernel you may encounter problems with certain processes when starting or shutting down your system. These problems will be relating to the mounting and unmounting of your partitions, and adjusting the clock. Most of these problems lie in /etc/rc.d/rc.sysinit.
71
72 Here's a sample configuration used to setup your default LIDS values.
73
74 !Problem - error writing to /var/log/dmesg
75
76 rc.sysyinit:818: dmesg -s 131072 > /var/log/dmesg
77
78 Either comment out the line which updates /var/log/dmesg in rc.sysinit, apply the patch to the dmesg source available [here|http://www.kernel.org/pub/linux/utils/util-linux/] (util-linux-XXX/sys-utils/dmesg.c) or allow bash to modify the file. (I opted for the dmesg patch - GerwinVanDeSteeg).
79
80 rc.sysinit: dmesg -s 131072 -f /var/log/dmesg
81
82 !Problem - writing to /var/log/ksyms*
83 Just comment this out for now until a fix is found.
84
85 !Problem - writing to /etc/mtab
86 The way to do this is to replace the /etc/mtab file with a symbolic link to /proc/mounts.
87 % rm -rf /etc/mtab
88 % ln -sf /proc/mounts /etc/mtab
89 And then going through your initialization scripts (rc.sysinit) and modifying all mount and umount commands and adding the "-n" option, which will tell mount to not update /etc/mtab. You may then also get errors about being unable to mount a filesystem due to it already being mounted.
90
91 rc.sysinit:570: action $"Mounting local filesystems: " mount -a -t nonfs,smbfs,ncpfs -O no_netdev
92
93 replace with
94
95 rc.sysinit: action $"Mounting local filesystems: " mount -a -n -t nonfs,smbfs,ncpfs,sysfs,proc,devpts -O no_netdev
96
97 !Problem - updating /etc/adjtime
98 See sample configuration
99 !Problem - turning of filesystem quota's on restart, cannot stat() /dev/root
100 Solution not yet found.
101
1 GerwinVanDeSteeg 102
103 !!Usage
104
105 * Refer to the documentation or the installation instructions provided with the lidstools source and lids patch. (ie. RTFM)
3 PerryLorier 106
107 ----
108 CategoryNotes