source: postlfs/security/tripwire.xml@ 305e60de

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.0 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 305e60de was 305e60de, checked in by Randy McMurchy <randy@…>, 19 years ago

Added indexing tags to Tripwire; more Chapter 4 clean-up

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@3344 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 9.3 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY tripwire-download-http "http://www.frenchfries.net/paul/tripwire/tripwire-&tripwire-version;.tar.gz">
8 <!ENTITY tripwire-download-ftp " ">
9 <!ENTITY tripwire-size "869 KB">
10 <!ENTITY tripwire-buildsize "22 MB">
11 <!ENTITY tripwire-time "2.96 SBU">
12]>
13
14<sect1 id="tripwire-portable" xreflabel="Tripwire-&tripwire-version;">
15<sect1info>
16<othername>$LastChangedBy$</othername>
17<date>$Date$</date>
18</sect1info>
19<?dbhtml filename="tripwire.html"?>
20<title>Tripwire-&tripwire-version;</title>
21<indexterm zone="tripwire-portable">
22<primary sortas="a-Tripwire">Tripwire</primary>
23</indexterm>
24
25<sect2>
26<title>Introduction to <application>Tripwire</application></title>
27
28<para>The <application>Tripwire</application> package contains programs used
29to verify the integrity of the files on a given system.</para>
30
31<sect3><title>Package information</title>
32<itemizedlist spacing='compact'>
33<listitem><para>Download (HTTP): <ulink
34url="&tripwire-download-http;"/></para></listitem>
35<listitem><para>Download (FTP): <ulink
36url="&tripwire-download-ftp;"/></para></listitem>
37<listitem><para>Download size: &tripwire-size;</para></listitem>
38<listitem><para>Estimated disk space required:
39&tripwire-buildsize;</para></listitem>
40<listitem><para>Estimated build time:
41&tripwire-time;</para></listitem></itemizedlist>
42</sect3>
43
44<sect3><title><application>Tripwire</application> dependencies</title>
45<sect4><title>Optional</title>
46<para><acronym>MTA</acronym> (See <xref linkend="server-mail"/>)</para>
47</sect4>
48</sect3>
49
50</sect2>
51
52<sect2>
53<title>Installation of <application>Tripwire</application></title>
54
55<para>Compile <application>Tripwire</application> by running the following
56commands:</para>
57
58<screen><userinput><command>sed -i -e 's@TWDB="${prefix}@TWDB="/var@' install/install.cfg &amp;&amp;
59./configure --prefix=/usr --sysconfdir=/etc/tripwire &amp;&amp;
60make</command></userinput></screen>
61
62<para>Now, as the root user:</para>
63
64<screen><userinput role='root'><command>make install &amp;&amp;
65cp policy/*.txt /usr/share/doc/tripwire</command></userinput></screen>
66
67<para>The default configuration is to use a local <acronym>MTA</acronym>. If
68you don't have an <acronym>MTA</acronym> installed and have no wish to install
69one, modify <filename>install.cfg</filename> to use an <acronym>SMTP</acronym>
70server instead.</para>
71
72</sect2>
73
74<sect2>
75<title>Command explanations</title>
76
77<para><command>sed -i -e 's@TWDB="${prefix}@TWDB="/var@'
78install/install.cfg</command>: This command tells the package to install the
79program database and reports in
80<filename>/var/lib/tripwire</filename>.</para>
81
82<para><command>make install</command>: This command creates the
83<application>Tripwire</application> security keys as well as installing the
84binaries. There are two keys: a site key and a local key which are stored in
85<filename class="directory">/etc/tripwire/</filename>.</para>
86
87<para><command>cp policy/*.txt /usr/share/doc/tripwire</command>: This command
88installs the documentation.</para>
89
90</sect2>
91
92<sect2>
93<title>Configuring <application>Tripwire</application></title>
94
95<sect3 id="tripwire-config"><title>Config files</title>
96<para><filename>/etc/tripwire/*</filename></para>
97<indexterm zone="tripwire-portable tripwire-config">
98<primary sortas="e-etc-tripwire">/etc/tripwire/*</primary>
99</indexterm>
100</sect3>
101
102<sect3><title>Configuration Information</title>
103
104<para><application>Tripwire</application> uses a policy file to determine which
105files are integrity checked. The default policy file
106(<filename>/etc/tripwire/twpol.txt</filename>) is for a default
107installation Redhat and will need to be updated for your system.</para>
108
109<para>Policy files should be tailored to each individual distribution and/or
110installation. Some custom policy files can be found below: </para>
111
112<screen><ulink url="http://home.iprimus.com.au/glombowski/blfs/twpol-all.txt"/>
113Checks integrity of all files
114<ulink url="http://home.iprimus.com.au/glombowski/blfs/twpol-lfs.txt"/>
115Custom policy file for Base LFS 3.0 system
116<ulink url="http://home.iprimus.com.au/glombowski/blfs/twpol-suse7.2.txt"/>
117Custom policy file for SuSE 7.2 system</screen>
118
119<para>Download the custom policy file you'd like to try, copy it into
120<filename class="directory">/etc/tripwire/</filename>, and use it instead of
121<filename>twpol.txt</filename>. It is, however, recommended that you make
122your own policy file. Get ideas from the examples above and read
123<filename>/usr/share/doc/tripwire/policyguide.txt</filename> for additional
124information. <filename>twpol.txt</filename> is a good policy file for beginners
125as it will note any changes to the file system and can even be used as an
126annoying way of keeping track of changes for uninstallation of software.</para>
127
128<para>After your policy file has been transferred to
129<filename class="directory">/etc/tripwire/</filename> you may begin the
130configuration steps:</para>
131
132<screen><userinput role='root'><command>twadmin --create-polfile --site-keyfile /etc/tripwire/site.key \
133 /etc/tripwire/twpol.txt &amp;&amp;
134tripwire --init</command></userinput></screen>
135
136</sect3>
137
138<sect3><title>Usage Information</title>
139<para>To use <application>Tripwire</application> after creating a policy file
140to run a report, use the following command:</para>
141
142<screen><userinput role='root'><command>tripwire --check &gt; /etc/tripwire/report.txt</command></userinput></screen>
143
144<para>View the output to check the integrity of your files. An automatic
145integrity report can be produced by using a cron facility to schedule
146the runs.</para>
147
148<para>Please note that after you run an integrity check, you must examine
149the report (or email) and then modify the <application>Tripwire</application>
150database to reflect the changed files on your system. This is so that
151<application>Tripwire</application> will not continually notify you that
152files you intentionally changed are a security violation. To do this you
153must first <command>ls -l /var/lib/tripwire/report/</command> and note
154the name of the newest file which starts with <filename>linux-</filename> and
155ends in <filename>.twr</filename>. This encrypted file was created during the
156last report creation and is needed to update the
157<application>Tripwire</application> database of your
158system. Then, type in the following command making the appropriate
159substitutions for <replaceable>[?]</replaceable>:</para>
160
161<screen><userinput role='root'><command>tripwire --update -twrfile \
162 /var/lib/tripwire/report/linux-<replaceable>[???????]</replaceable>-<replaceable>[??????]</replaceable>.twr</command></userinput></screen>
163
164<para>You will be placed into <application>vim</application> with a copy of
165the report in front of you. If all the changes were good, then just type
166<command>:x</command> and after entering your local key, the database will be
167updated. If there are files which you still want to be warned about, remove the
168'x' before the filename in the report and type <command>:x</command>.</para>
169
170</sect3>
171
172<sect3><title>Changing the Policy File</title>
173
174<para>If you are unhappy with your policy file and would like to modify it or
175use a new one, modify the policy file and then execute the following
176commands:</para>
177
178<screen><userinput role='root'><command>twadmin --create-polfile /etc/tripwire/twpol.txt &amp;&amp;
179tripwire --init</command></userinput></screen>
180</sect3>
181
182</sect2>
183
184<sect2>
185<title>Contents</title>
186<segmentedlist>
187 <segtitle>Installed Programs</segtitle>
188 <segtitle>Installed Directories</segtitle>
189 <seglistitem>
190 <seg>siggen, tripwire, twadmin and twprint.</seg>
191 <seg>/etc/tripwire, /usr/share/doc/tripwire and /var/lib/tripwire</seg>
192 </seglistitem>
193</segmentedlist>
194
195<variablelist>
196 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
197 <?dbfo list-presentation="list"?>
198
199 <varlistentry id="siggen">
200 <term><command>siggen</command></term>
201 <listitem><para>is a signature gathering utility that displays
202 the hash function values for the specified files.</para>
203 <indexterm zone="tripwire-portable siggen">
204 <primary sortas="b-siggen">siggen</primary>
205 </indexterm>
206 </listitem>
207 </varlistentry>
208
209 <varlistentry id='tripwire'>
210 <term><command>tripwire</command></term>
211 <listitem><para>is the main file integrity checking program.</para>
212 <indexterm zone="tripwire-portable tripwire">
213 <primary sortas="b-tripwire">tripwire</primary>
214 </indexterm>
215 </listitem>
216 </varlistentry>
217
218 <varlistentry id='twadmin'>
219 <term><command>twadmin</command></term>
220 <listitem><para>administrative and utility tool used to perform
221 certain administrative functions related to
222 <application>Tripwire</application> files and configuration
223 options.</para>
224 <indexterm zone="tripwire-portable twadmin">
225 <primary sortas="b-twadmin">twadmin</primary>
226 </indexterm>
227 </listitem>
228 </varlistentry>
229
230 <varlistentry id='twprint'>
231 <term><command>twprint</command></term>
232 <listitem><para>prints <application>Tripwire</application>
233 database and report files in clear text format.</para>
234 <indexterm zone="tripwire-portable twprint">
235 <primary sortas="b-twprint">twprint</primary>
236 </indexterm>
237 </listitem>
238 </varlistentry>
239</variablelist>
240
241</sect2>
242
243</sect1>
244
Note: See TracBrowser for help on using the repository browser.