source: postlfs/security/tripwire.xml@ cf67717

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 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 cf67717 was cf67717, checked in by Bruce Dubbs <bdubbs@…>, 10 years ago

Fix man/doc locations for docbook-utils, sgml-common, tripwire
Restore the ed editor
Finish tagging for Post LFS Part of the book

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

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