source: postlfs/security/tripwire.xml@ 0d7900a

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 0d7900a was 0d7900a, checked in by Randy McMurchy <randy@…>, 11 years ago

Removed extraneous spaces from blank lines and at the end of lines in the .xml

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

  • Property mode set to 100644
File size: 12.2 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY tripwire-download-http "&sourceforge-repo;/tripwire/tripwire-&tripwire-version;-src.tar.bz2">
8 <!ENTITY tripwire-download-ftp " ">
9 <!ENTITY tripwire-md5sum "2462ea16fb0b5ae810471011ad2f2dd6">
10 <!ENTITY tripwire-size "704 KB">
11 <!ENTITY tripwire-buildsize "31 MB">
12 <!ENTITY tripwire-time "1.3 SBU (includes interactive time during install)">
13]>
14
15<sect1 id="tripwire" xreflabel="Tripwire-&tripwire-version;">
16 <?dbhtml filename="tripwire.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>Tripwire-&tripwire-version;</title>
24
25 <indexterm zone="tripwire">
26 <primary sortas="a-Tripwire">Tripwire</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to Tripwire</title>
31
32 <para>The <application>Tripwire</application> package contains programs
33 used to verify the integrity of the files on a given system.</para>
34
35 &lfs72_checked;
36
37 <bridgehead renderas="sect3">Package Information</bridgehead>
38 <itemizedlist spacing="compact">
39 <listitem>
40 <para>Download (HTTP): <ulink url="&tripwire-download-http;"/></para>
41 </listitem>
42 <listitem>
43 <para>Download (FTP): <ulink url="&tripwire-download-ftp;"/></para>
44 </listitem>
45 <listitem>
46 <para>Download MD5 sum: &tripwire-md5sum;</para>
47 </listitem>
48 <listitem>
49 <para>Download size: &tripwire-size;</para>
50 </listitem>
51 <listitem>
52 <para>Estimated disk space required: &tripwire-buildsize;</para>
53 </listitem>
54 <listitem>
55 <para>Estimated build time: &tripwire-time;</para>
56 </listitem>
57 </itemizedlist>
58
59 <bridgehead renderas="sect3">Tripwire Dependencies</bridgehead>
60
61 <bridgehead renderas="sect4">Required</bridgehead>
62 <para role="required"><xref linkend="openssl"/></para>
63
64
65 <bridgehead renderas="sect4">Optional</bridgehead>
66 <para role="optional">An <xref linkend="server-mail"/></para>
67
68 <para condition="html" role="usernotes">User Notes:
69 <ulink url="&blfs-wiki;/tripwire"/></para>
70
71 </sect2>
72
73 <sect2 role="installation">
74 <title>Installation of Tripwire</title>
75
76 <para>Compile <application>Tripwire</application> by running the following
77 commands:</para>
78
79<screen><userinput>sed -i -e 's@TWDB="${prefix}@TWDB="/var@' install/install.cfg &amp;&amp;
80sed -i -e 's/!Equal/!this->Equal/' src/cryptlib/algebra.h &amp;&amp;
81sed -i -e '/stdtwadmin.h/i#include &lt;unistd.h&gt;' src/twadmin/twadmincl.cpp &amp;&amp;
82
83./configure --prefix=/usr --sysconfdir=/etc/tripwire &amp;&amp;
84make</userinput></screen>
85
86 <note><para>The default configuration is to use a local MTA. If
87 you don't have an MTA installed and have no wish to install
88 one, modify <filename>install/install.cfg</filename> to use an SMTP
89 server instead. Otherwise the install will fail.</para></note>
90
91 <para>This package does not come with a test suite.</para>
92
93 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
94
95<screen role="root"><userinput>make install &amp;&amp;
96cp -v policy/*.txt /usr/doc/tripwire</userinput></screen>
97
98 </sect2>
99
100 <sect2 role="commands">
101 <title>Command Explanations</title>
102
103 <para><command>sed -i -e 's@TWDB="${prefix}@TWDB="/var@'
104 install/install.cfg</command>: This command tells the package to install
105 the program database and reports in
106 <filename class="directory">/var/lib/tripwire</filename>.</para>
107
108 <para><command>sed ... src/cryptlib/algebra.h</command>:
109 Fix a compilation issue with gcc-4.7.</para>
110
111 <para><command>sed ... src/twadmin/twadmincl.cpp</command>:
112 Fix a compilation issue with gcc-4.7.</para>
113
114 <para><command>make install</command>: This command creates the
115 <application>Tripwire</application> security keys as well as installing
116 the binaries. There are two keys: a site key and a local key which are
117 stored in <filename class="directory">/etc/tripwire/</filename>.</para>
118
119 <para><command>cp -v policy/*.txt /usr/doc/tripwire</command>: This command
120 installs the <application>tripwire</application> sample policy files with
121 the other <application>tripwire</application> documentation.</para>
122
123 </sect2>
124
125 <sect2 role="configuration">
126 <title>Configuring Tripwire</title>
127
128 <sect3 id="tripwire-config">
129 <title>Config Files</title>
130
131 <para><filename>/etc/tripwire/*</filename></para>
132
133 <indexterm zone="tripwire tripwire-config">
134 <primary sortas="e-etc-tripwire">/etc/tripwire/*</primary>
135 </indexterm>
136
137 </sect3>
138
139 <sect3>
140 <title>Configuration Information</title>
141
142 <para><application>Tripwire</application> uses a policy file to
143 determine which files are integrity checked. The default policy
144 file (<filename>/etc/tripwire/twpol.txt</filename>) is for a
145 default installation and will need to be updated for your
146 system.</para>
147
148 <para>Policy files should be tailored to each individual distribution
149 and/or installation. Some example policy files can be found in <filename
150 class="directory">/usr/doc/tripwire/</filename> (Note that <filename
151 class="directory">/usr/doc/</filename> is a symbolic link on LFS systems
152 to <filename class="directory">/usr/share/doc/</filename>).</para>
153
154 <para>If desired, copy the policy file you'd like to try into <filename
155 class="directory">/etc/tripwire/</filename> instead of using the default
156 policy file, <filename>twpol.txt</filename>. It is, however, recommended
157 that you edit your policy file. Get ideas from the examples above and
158 read <filename>/usr/doc/tripwire/policyguide.txt</filename> for
159 additional information. <filename>twpol.txt</filename> is a good policy
160 file for learning about <application>Tripwire</application> as it will
161 note any changes to the file system and can even be used as an annoying
162 way of keeping track of changes for uninstallation of software.</para>
163
164 <para>After your policy file has been edited to your satisfaction you may
165 begin the configuration steps (perform as the <systemitem
166 class='username'>root</systemitem>) user:</para>
167
168<screen role="root"><userinput>twadmin --create-polfile --site-keyfile /etc/tripwire/site.key \
169 /etc/tripwire/twpol.txt &amp;&amp;
170tripwire --init</userinput></screen>
171
172 <para>Depending on your system and the contents of the policy file, the
173 initialization phase above can take a relatively long time.</para>
174
175 </sect3>
176
177 <sect3>
178 <title>Usage Information</title>
179
180 <para><application>Tripwire</application> will identify file changes in
181 the critical system files specified in the policy file. Using
182 <application>Tripwire</application> while making frequent changes to
183 these directories will flag all these changes. It is most useful after a
184 system has reached a configuration that the user considers stable.</para>
185
186 <para>To use <application>Tripwire</application> after creating a policy
187 file to run a report, use the following command:</para>
188
189<screen role="root"><userinput>tripwire --check &gt; /etc/tripwire/report.txt</userinput></screen>
190
191 <para>View the output to check the integrity of your files. An automatic
192 integrity report can be produced by using a cron facility to schedule the
193 runs.</para>
194
195 <para>Reports are stored in binary and, if desired, encrypted. View reports,
196 as the <systemitem class="username">root</systemitem> user, with:</para>
197
198<screen role="root">twprint --print-report -r /var/lib/tripwire/report/<replaceable>&lt;report-name.twr&gt;</replaceable></screen>
199
200 <para>After you run an integrity check, you should examine the
201 report (or email) and then modify the <application>Tripwire</application>
202 database to reflect the changed files on your system. This is so that
203 <application>Tripwire</application> will not continually notify you that
204 files you intentionally changed are a security violation. To do this you
205 must first <command>ls -l /var/lib/tripwire/report/</command> and note
206 the name of the newest file which starts with your system name as
207 presented by the command <userinput>uname -n</userinput>
208 and ends in <filename>.twr</filename>. These files were created
209 during report creation and the most current one is needed to update the
210 <application>Tripwire</application> database of your system. As the
211 <systemitem class='username'>root</systemitem> user, type in the
212 following command making the appropriate report name:</para>
213
214<screen role="root"><userinput>tripwire --update --twrfile /var/lib/tripwire/report/<replaceable>&lt;report-name.twr&gt;</replaceable></userinput></screen>
215
216 <para>You will be placed into <application>Vim</application> with a copy
217 of the report in front of you. If all the changes were good, then just
218 type <command>:wq</command> and after entering your local key, the database
219 will be updated. If there are files which you still want to be warned
220 about, remove the 'x' before the filename in the report and type
221 <command>:wq</command>.</para>
222
223 <para>A good summary of tripwire operations can be found at
224 <ulink url="http://va-holladays.no-ip.info:2200/tools/security-docs/tripwire-v1.0.pdf"/>.</para>
225
226 </sect3>
227
228 <sect3>
229 <title>Changing the Policy File</title>
230
231 <para>If you are unhappy with your policy file and would like to modify
232 it or use a new one, modify the policy file and then execute the following
233 commands as the <systemitem class='username'>root</systemitem> user:</para>
234
235<screen role="root"><userinput>twadmin --create-polfile /etc/tripwire/twpol.txt &amp;&amp;
236tripwire --init</userinput></screen>
237
238 </sect3>
239
240 </sect2>
241
242 <sect2 role="content">
243 <title>Contents</title>
244
245 <segmentedlist>
246 <segtitle>Installed Programs</segtitle>
247 <segtitle>Installed Libraries</segtitle>
248 <segtitle>Installed Directories</segtitle>
249
250 <seglistitem>
251 <seg>siggen, tripwire, twadmin, and twprint</seg>
252 <seg>None</seg>
253 <seg>/etc/tripwire, /var/lib/tripwire, and /usr/share/doc/tripwire</seg>
254 </seglistitem>
255 </segmentedlist>
256
257 <variablelist>
258 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
259 <?dbfo list-presentation="list"?>
260 <?dbhtml list-presentation="table"?>
261
262 <varlistentry id="siggen">
263 <term><command>siggen</command></term>
264 <listitem>
265 <para>is a signature gathering utility that displays
266 the hash function values for the specified files.</para>
267 <indexterm zone="tripwire siggen">
268 <primary sortas="b-siggen">siggen</primary>
269 </indexterm>
270 </listitem>
271 </varlistentry>
272
273 <varlistentry id='tripwire-program'>
274 <term><command>tripwire</command></term>
275 <listitem>
276 <para>is the main file integrity checking program.</para>
277 <indexterm zone="tripwire tripwire">
278 <primary sortas="b-tripwire">tripwire</primary>
279 </indexterm>
280 </listitem>
281 </varlistentry>
282
283 <varlistentry id='twadmin'>
284 <term><command>twadmin</command></term>
285 <listitem>
286 <para>administrative and utility tool used to perform
287 certain administrative functions related to
288 <application>Tripwire</application> files and configuration
289 options.</para>
290 <indexterm zone="tripwire twadmin">
291 <primary sortas="b-twadmin">twadmin</primary>
292 </indexterm>
293 </listitem>
294 </varlistentry>
295
296 <varlistentry id='twprint'>
297 <term><command>twprint</command></term>
298 <listitem>
299 <para>prints <application>Tripwire</application>
300 database and report files in clear text format.</para>
301 <indexterm zone="tripwire twprint">
302 <primary sortas="b-twprint">twprint</primary>
303 </indexterm>
304 </listitem>
305 </varlistentry>
306
307 </variablelist>
308
309 </sect2>
310
311</sect1>
Note: See TracBrowser for help on using the repository browser.