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 | &lfs77_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">Recommended</bridgehead>
|
---|
62 | <para role="recommended"><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 &&
|
---|
80 | sed -i -e 's/!Equal/!this->Equal/' src/cryptlib/algebra.h &&
|
---|
81 | sed -i -e '/stdtwadmin.h/i#include <unistd.h>' src/twadmin/twadmincl.cpp &&
|
---|
82 | sed -i -e '/TWMAN/ s|${prefix}|/usr/share|' \
|
---|
83 | -e '/TWDOCS/s|${prefix}/doc/tripwire|/usr/share/doc/tripwire-&tripwire-version;|' \
|
---|
84 | install/install.cfg &&
|
---|
85 | sed -i -e 's/eArchiveOpen e\([^)]*)\)/throw ( eArchiveOpen\1 )/' \
|
---|
86 | -e '/throw e;/d' src/core/archive.cpp &&
|
---|
87 |
|
---|
88 | ./configure --prefix=/usr --sysconfdir=/etc/tripwire &&
|
---|
89 | make</userinput></screen>
|
---|
90 |
|
---|
91 | <note><para>The default configuration is to use a local MTA. If
|
---|
92 | you don't have an MTA installed and have no wish to install
|
---|
93 | one, modify <filename>install/install.cfg</filename> to use an SMTP
|
---|
94 | server instead. Otherwise the install will fail.</para></note>
|
---|
95 |
|
---|
96 | <para>This package does not come with a test suite.</para>
|
---|
97 |
|
---|
98 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
99 |
|
---|
100 | <screen role="root"><userinput>make install &&
|
---|
101 | cp -v policy/*.txt /usr/share/doc/tripwire-&tripwire-version;</userinput></screen>
|
---|
102 |
|
---|
103 | </sect2>
|
---|
104 |
|
---|
105 | <sect2 role="commands">
|
---|
106 | <title>Command Explanations</title>
|
---|
107 |
|
---|
108 | <para><command>sed -i -e 's@TWDB="${prefix}@TWDB="/var@'
|
---|
109 | install/install.cfg</command>: This command tells the package to install
|
---|
110 | the program database and reports in
|
---|
111 | <filename class="directory">/var/lib/tripwire</filename>.</para>
|
---|
112 |
|
---|
113 | <para><command>sed ... src/cryptlib/algebra.h</command>:
|
---|
114 | Fix a compilation issue with gcc-4.7.</para>
|
---|
115 |
|
---|
116 | <para><command>sed ... src/twadmin/twadmincl.cpp</command>:
|
---|
117 | Fix a compilation issue with gcc-4.7.</para>
|
---|
118 |
|
---|
119 | <para><command>sed ... install/install.cfg</command>:
|
---|
120 | Fix the location of the man and doc directories.</para>
|
---|
121 |
|
---|
122 | <para><command>sed ... src/core/archive.cpp</command>:
|
---|
123 | Fix compilation with gcc-4.9.</para>
|
---|
124 |
|
---|
125 | <para><command>make install</command>: This command creates the
|
---|
126 | <application>Tripwire</application> security keys as well as installing
|
---|
127 | the binaries. There are two keys: a site key and a local key which are
|
---|
128 | stored in <filename class="directory">/etc/tripwire/</filename>.</para>
|
---|
129 |
|
---|
130 | <note><para>During <command>make install</command>, several questions
|
---|
131 | are asked, including passwords. If you want to make a script, you have
|
---|
132 | to apply a <application>sed</application> before running
|
---|
133 | <command>make install</command>:</para>
|
---|
134 |
|
---|
135 | <para>
|
---|
136 | <command>sed -i -e 's@install/install.sh@& -n -s<replaceable><site-password></replaceable> -l<replaceable><local-password></replaceable>@' Makefile</command>
|
---|
137 | </para>
|
---|
138 |
|
---|
139 | <para>Of course, you should do this with dummy passwords and change them
|
---|
140 | later.</para></note>
|
---|
141 |
|
---|
142 | <para><command>cp -v policy/*.txt /usr/doc/tripwire</command>: This command
|
---|
143 | installs the <application>tripwire</application> sample policy files with
|
---|
144 | the other <application>tripwire</application> documentation.</para>
|
---|
145 |
|
---|
146 | </sect2>
|
---|
147 |
|
---|
148 | <sect2 role="configuration">
|
---|
149 | <title>Configuring Tripwire</title>
|
---|
150 |
|
---|
151 | <sect3 id="tripwire-config">
|
---|
152 | <title>Config Files</title>
|
---|
153 |
|
---|
154 | <para><filename>/etc/tripwire/*</filename></para>
|
---|
155 |
|
---|
156 | <indexterm zone="tripwire tripwire-config">
|
---|
157 | <primary sortas="e-etc-tripwire">/etc/tripwire/*</primary>
|
---|
158 | </indexterm>
|
---|
159 |
|
---|
160 | </sect3>
|
---|
161 |
|
---|
162 | <sect3>
|
---|
163 | <title>Configuration Information</title>
|
---|
164 |
|
---|
165 | <para><application>Tripwire</application> uses a policy file to
|
---|
166 | determine which files are integrity checked. The default policy
|
---|
167 | file (<filename>/etc/tripwire/twpol.txt</filename>) is for a
|
---|
168 | default installation and will need to be updated for your
|
---|
169 | system.</para>
|
---|
170 |
|
---|
171 | <para>Policy files should be tailored to each individual distribution
|
---|
172 | and/or installation. Some example policy files can be found in <filename
|
---|
173 | class="directory">/usr/share/doc/tripwire/</filename>.</para>
|
---|
174 |
|
---|
175 | <para>If desired, copy the policy file you'd like to try into <filename
|
---|
176 | class="directory">/etc/tripwire/</filename> instead of using the default
|
---|
177 | policy file, <filename>twpol.txt</filename>. It is, however, recommended
|
---|
178 | that you edit your policy file. Get ideas from the examples above and
|
---|
179 | read <filename>/usr/share/doc/tripwire/policyguide.txt</filename> for
|
---|
180 | additional information. <filename>twpol.txt</filename> is a good policy
|
---|
181 | file for learning about <application>Tripwire</application> as it will
|
---|
182 | note any changes to the file system and can even be used as an annoying
|
---|
183 | way of keeping track of changes for uninstallation of software.</para>
|
---|
184 |
|
---|
185 | <para>After your policy file has been edited to your satisfaction you may
|
---|
186 | begin the configuration steps (perform as the <systemitem
|
---|
187 | class='username'>root</systemitem>) user:</para>
|
---|
188 |
|
---|
189 | <screen role="root"><userinput>twadmin --create-polfile --site-keyfile /etc/tripwire/site.key \
|
---|
190 | /etc/tripwire/twpol.txt &&
|
---|
191 | tripwire --init</userinput></screen>
|
---|
192 |
|
---|
193 | <para>Depending on your system and the contents of the policy file, the
|
---|
194 | initialization phase above can take a relatively long time.</para>
|
---|
195 |
|
---|
196 | </sect3>
|
---|
197 |
|
---|
198 | <sect3>
|
---|
199 | <title>Usage Information</title>
|
---|
200 |
|
---|
201 | <para><application>Tripwire</application> will identify file changes in
|
---|
202 | the critical system files specified in the policy file. Using
|
---|
203 | <application>Tripwire</application> while making frequent changes to
|
---|
204 | these directories will flag all these changes. It is most useful after a
|
---|
205 | system has reached a configuration that the user considers stable.</para>
|
---|
206 |
|
---|
207 | <para>To use <application>Tripwire</application> after creating a policy
|
---|
208 | file to run a report, use the following command:</para>
|
---|
209 |
|
---|
210 | <screen role="root"><userinput>tripwire --check > /etc/tripwire/report.txt</userinput></screen>
|
---|
211 |
|
---|
212 | <para>View the output to check the integrity of your files. An automatic
|
---|
213 | integrity report can be produced by using a cron facility to schedule the
|
---|
214 | runs.</para>
|
---|
215 |
|
---|
216 | <para>Reports are stored in binary and, if desired, encrypted. View reports,
|
---|
217 | as the <systemitem class="username">root</systemitem> user, with:</para>
|
---|
218 |
|
---|
219 | <screen role="root">twprint --print-report -r /var/lib/tripwire/report/<replaceable><report-name.twr></replaceable></screen>
|
---|
220 |
|
---|
221 | <para>After you run an integrity check, you should examine the
|
---|
222 | report (or email) and then modify the <application>Tripwire</application>
|
---|
223 | database to reflect the changed files on your system. This is so that
|
---|
224 | <application>Tripwire</application> will not continually notify you that
|
---|
225 | files you intentionally changed are a security violation. To do this you
|
---|
226 | must first <command>ls -l /var/lib/tripwire/report/</command> and note
|
---|
227 | the name of the newest file which starts with your system name as
|
---|
228 | presented by the command <userinput>uname -n</userinput>
|
---|
229 | and ends in <filename>.twr</filename>. These files were created
|
---|
230 | during report creation and the most current one is needed to update the
|
---|
231 | <application>Tripwire</application> database of your system. As the
|
---|
232 | <systemitem class='username'>root</systemitem> user, type in the
|
---|
233 | following command making the appropriate report name:</para>
|
---|
234 |
|
---|
235 | <screen role="root"><userinput>tripwire --update --twrfile /var/lib/tripwire/report/<replaceable><report-name.twr></replaceable></userinput></screen>
|
---|
236 |
|
---|
237 | <para>You will be placed into <application>Vim</application> with a copy
|
---|
238 | of the report in front of you. If all the changes were good, then just
|
---|
239 | type <command>:wq</command> and after entering your local key, the database
|
---|
240 | will be updated. If there are files which you still want to be warned
|
---|
241 | about, remove the 'x' before the filename in the report and type
|
---|
242 | <command>:wq</command>.</para>
|
---|
243 |
|
---|
244 | <!-- 10-12-2013 bad URL and no good URL found
|
---|
245 | <para>A good summary of tripwire operations can be found at
|
---|
246 | <ulink url="http://va-holladays.no-ip.info:2200/tools/security-docs/tripwire-v1.0.pdf"/>.</para>
|
---|
247 | -->
|
---|
248 | </sect3>
|
---|
249 |
|
---|
250 | <sect3>
|
---|
251 | <title>Changing the Policy File</title>
|
---|
252 |
|
---|
253 | <para>If you are unhappy with your policy file and would like to modify
|
---|
254 | it or use a new one, modify the policy file and then execute the following
|
---|
255 | commands as the <systemitem class='username'>root</systemitem> user:</para>
|
---|
256 |
|
---|
257 | <screen role="root"><userinput>twadmin --create-polfile /etc/tripwire/twpol.txt &&
|
---|
258 | tripwire --init</userinput></screen>
|
---|
259 |
|
---|
260 | </sect3>
|
---|
261 |
|
---|
262 | </sect2>
|
---|
263 |
|
---|
264 | <sect2 role="content">
|
---|
265 | <title>Contents</title>
|
---|
266 |
|
---|
267 | <segmentedlist>
|
---|
268 | <segtitle>Installed Programs</segtitle>
|
---|
269 | <segtitle>Installed Libraries</segtitle>
|
---|
270 | <segtitle>Installed Directories</segtitle>
|
---|
271 |
|
---|
272 | <seglistitem>
|
---|
273 | <seg>siggen, tripwire, twadmin, and twprint</seg>
|
---|
274 | <seg>None</seg>
|
---|
275 | <seg>/etc/tripwire, /var/lib/tripwire, and /usr/share/doc/tripwire</seg>
|
---|
276 | </seglistitem>
|
---|
277 | </segmentedlist>
|
---|
278 |
|
---|
279 | <variablelist>
|
---|
280 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
281 | <?dbfo list-presentation="list"?>
|
---|
282 | <?dbhtml list-presentation="table"?>
|
---|
283 |
|
---|
284 | <varlistentry id="siggen">
|
---|
285 | <term><command>siggen</command></term>
|
---|
286 | <listitem>
|
---|
287 | <para>is a signature gathering utility that displays
|
---|
288 | the hash function values for the specified files.</para>
|
---|
289 | <indexterm zone="tripwire siggen">
|
---|
290 | <primary sortas="b-siggen">siggen</primary>
|
---|
291 | </indexterm>
|
---|
292 | </listitem>
|
---|
293 | </varlistentry>
|
---|
294 |
|
---|
295 | <varlistentry id='tripwire-program'>
|
---|
296 | <term><command>tripwire</command></term>
|
---|
297 | <listitem>
|
---|
298 | <para>is the main file integrity checking program.</para>
|
---|
299 | <indexterm zone="tripwire tripwire">
|
---|
300 | <primary sortas="b-tripwire">tripwire</primary>
|
---|
301 | </indexterm>
|
---|
302 | </listitem>
|
---|
303 | </varlistentry>
|
---|
304 |
|
---|
305 | <varlistentry id='twadmin'>
|
---|
306 | <term><command>twadmin</command></term>
|
---|
307 | <listitem>
|
---|
308 | <para>administrative and utility tool used to perform
|
---|
309 | certain administrative functions related to
|
---|
310 | <application>Tripwire</application> files and configuration
|
---|
311 | options.</para>
|
---|
312 | <indexterm zone="tripwire twadmin">
|
---|
313 | <primary sortas="b-twadmin">twadmin</primary>
|
---|
314 | </indexterm>
|
---|
315 | </listitem>
|
---|
316 | </varlistentry>
|
---|
317 |
|
---|
318 | <varlistentry id='twprint'>
|
---|
319 | <term><command>twprint</command></term>
|
---|
320 | <listitem>
|
---|
321 | <para>prints <application>Tripwire</application>
|
---|
322 | database and report files in clear text format.</para>
|
---|
323 | <indexterm zone="tripwire twprint">
|
---|
324 | <primary sortas="b-twprint">twprint</primary>
|
---|
325 | </indexterm>
|
---|
326 | </listitem>
|
---|
327 | </varlistentry>
|
---|
328 |
|
---|
329 | </variablelist>
|
---|
330 |
|
---|
331 | </sect2>
|
---|
332 |
|
---|
333 | </sect1>
|
---|