source: postlfs/security/tripwire.xml@ b9d5573a

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since b9d5573a was b9d5573a, checked in by Bruce Dubbs <bdubbs@…>, 4 years ago

More tags
Remove libnftnl which was commented out

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

  • Property mode set to 100644
File size: 13.9 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 "https://github.com/Tripwire/tripwire-open-source/releases/download/&tripwire-version;/tripwire-open-source-&tripwire-version;.tar.gz">
8 <!ENTITY tripwire-download-ftp " ">
9 <!ENTITY tripwire-md5sum "a5cf1bc2f235f5d8ca458f00548db6ee">
10 <!ENTITY tripwire-size "980 KB">
11 <!ENTITY tripwire-buildsize "29 MB">
12 <!ENTITY tripwire-time "1.6 SBU (scripting 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>
33 The <application>Tripwire</application> package contains programs
34 used to verify the integrity of the files on a given system.
35 </para>
36
37 &lfs10_checked;
38
39 <bridgehead renderas="sect3">Package Information</bridgehead>
40 <itemizedlist spacing="compact">
41 <listitem>
42 <para>
43 Download (HTTP): <ulink url="&tripwire-download-http;"/>
44 </para>
45 </listitem>
46 <listitem>
47 <para>
48 Download (FTP): <ulink url="&tripwire-download-ftp;"/>
49 </para>
50 </listitem>
51 <listitem>
52 <para>
53 Download MD5 sum: &tripwire-md5sum;
54 </para>
55 </listitem>
56 <listitem>
57 <para>
58 Download size: &tripwire-size;
59 </para>
60 </listitem>
61 <listitem>
62 <para>
63 Estimated disk space required: &tripwire-buildsize;
64 </para>
65 </listitem>
66 <listitem>
67 <para>
68 Estimated build time: &tripwire-time;
69 </para>
70 </listitem>
71 </itemizedlist>
72
73 <bridgehead renderas="sect3">Tripwire Dependencies</bridgehead>
74<!--
75 <bridgehead renderas="sect4">Recommended</bridgehead>
76 <para role="recommended">
77 <xref linkend="openssl"/>
78 </para>
79-->
80
81 <bridgehead renderas="sect4">Optional</bridgehead>
82 <para role="optional">
83 An <xref linkend="server-mail"/>
84 </para>
85
86 <para condition="html" role="usernotes">User Notes:
87 <ulink url="&blfs-wiki;/tripwire"/></para>
88
89 </sect2>
90
91 <sect2 role="installation">
92 <title>Installation of Tripwire</title>
93
94 <para>
95 Compile <application>Tripwire</application> by running the following
96 commands:
97 </para>
98
99<screen><userinput>sed -e '/^CLOBBER/s/false/true/' \
100 -e 's|TWDB="${prefix}|TWDB="/var|' \
101 -e '/TWMAN/ s|${prefix}|/usr/share|' \
102 -e '/TWDOCS/s|${prefix}/doc/tripwire|/usr/share/doc/tripwire-&tripwire-version;|' \
103 -i installer/install.cfg &amp;&amp;
104
105find . -name Makefile.am | xargs \
106 sed -i 's/^[[:alpha:]_]*_HEADERS.*=/noinst_HEADERS =/' &amp;&amp;
107
108sed '/dist/d' -i man/man?/Makefile.am &amp;&amp;
109autoreconf -fi &amp;&amp;
110
111./configure --prefix=/usr --sysconfdir=/etc/tripwire &amp;&amp;
112make</userinput></screen>
113
114 <note>
115 <para>
116 The default configuration is to use a local MTA. If
117 you don't have an MTA installed and have no wish to install
118 one, modify <filename>install/install.cfg</filename> to use an SMTP
119 server instead. Otherwise the install will fail.
120 </para>
121 </note>
122
123 <para>
124 This package does not come with a test suite.
125 </para>
126
127 <para>
128 Now, as the <systemitem class="username">root</systemitem> user:
129 </para>
130
131<screen role="root"><userinput>make install &amp;&amp;
132cp -v policy/*.txt /usr/share/doc/tripwire-&tripwire-version;</userinput></screen>
133
134 <note>
135 <para>
136 During <command>make install</command>, several questions
137 are asked, including passwords. If you want to make a script, you have
138 to apply a <application>sed</application> before running
139 <command>make install</command>:
140 </para>
141
142<screen><userinput>sed -i -e 's@installer/install.sh@&amp; -n -s <replaceable>&lt;site-password&gt;</replaceable> -l <replaceable>&lt;local-password&gt;</replaceable>@' Makefile</userinput></screen>
143
144 <para>
145 Of course, you should do this with dummy passwords and change them
146 later.
147 </para>
148
149 <para>
150 Another issue when scripting is that the installer exits when the
151 standard input is not a terminal. You may disable this behavior
152 with the following sed:
153 </para>
154
155<screen><userinput>sed '/-t 0/,+3d' -i installer/install.sh</userinput></screen>
156
157 </note>
158
159 </sect2>
160
161 <sect2 role="commands">
162 <title>Command Explanations</title>
163
164 <para>
165 <command>sed ... installer/install.cfg</command>: This command tells
166 the package to install the program database and reports in
167 <filename class="directory">/var/lib/tripwire</filename> and sets the
168 proper location for man pages and documentation.
169 </para>
170
171 <para>
172 <command>find ...</command>, <command>sed ...</command>, and
173 <command>autoreconf -fi</command>: The build system is unusable as is, and
174 has to be modified for the build to succeed.
175 </para>
176
177 <para>
178 <command>make install</command>: This command creates the
179 <application>Tripwire</application> security keys as well as installing
180 the binaries. There are two keys: a site key and a local key which are
181 stored in <filename class="directory">/etc/tripwire/</filename>.
182 </para>
183
184 <para>
185 <command>cp -v policy/*.txt /usr/doc/tripwire-&tripwire-version;</command>:
186 This command installs the <application>tripwire</application> sample
187 policy files with the other <application>tripwire</application>
188 documentation.i
189 </para>
190
191 </sect2>
192
193 <sect2 role="configuration">
194 <title>Configuring Tripwire</title>
195
196 <sect3 id="tripwire-config">
197 <title>Config Files</title>
198
199 <para>
200 <filename>/etc/tripwire/*</filename>
201 </para>
202
203 <indexterm zone="tripwire tripwire-config">
204 <primary sortas="e-etc-tripwire">/etc/tripwire/*</primary>
205 </indexterm>
206
207 </sect3>
208
209 <sect3>
210 <title>Configuration Information</title>
211
212 <para>
213 <application>Tripwire</application> uses a policy file to
214 determine which files are integrity checked. The default policy
215 file (<filename>/etc/tripwire/twpol.txt</filename>) is for a
216 default installation and will need to be updated for your
217 system.
218 </para>
219
220 <para>
221 Policy files should be tailored to each individual distribution and/or
222 installation. Some example policy files can be found in <filename
223 class="directory">/usr/share/doc/tripwire/</filename>.
224 </para>
225
226 <para>
227 If desired, copy the policy file you'd like to try into <filename
228 class="directory">/etc/tripwire/</filename> instead of using the
229 default policy file, <filename>twpol.txt</filename>. It is, however,
230 recommended that you edit your policy file. Get ideas from the
231 examples above and read
232 <filename>/usr/share/doc/tripwire/policyguide.txt</filename> for
233 additional information. <filename>twpol.txt</filename> is a good
234 policy file for learning about <application>Tripwire</application>
235 as it will note any changes to the file system and can even be used
236 as an annoying way of keeping track of changes for uninstallation of
237 software.
238 </para>
239
240 <para>
241 After your policy file has been edited to your satisfaction you may
242 begin the configuration steps (perform as the <systemitem
243 class='username'>root</systemitem>) user:
244 </para>
245
246<screen role="root"><userinput>twadmin --create-polfile --site-keyfile /etc/tripwire/site.key \
247 /etc/tripwire/twpol.txt &amp;&amp;
248tripwire --init</userinput></screen>
249
250 <para>
251 Depending on your system and the contents of the policy file, the
252 initialization phase above can take a relatively long time.
253 </para>
254
255 </sect3>
256
257 <sect3>
258 <title>Usage Information</title>
259
260 <para>
261 <application>Tripwire</application> will identify file changes in
262 the critical system files specified in the policy file. Using
263 <application>Tripwire</application> while making frequent changes to
264 these directories will flag all these changes. It is most useful
265 after a system has reached a configuration that the user considers
266 stable.
267 </para>
268
269 <para>
270 To use <application>Tripwire</application> after creating a policy
271 file to run a report, use the following command:
272 </para>
273
274<screen role="root"><userinput>tripwire --check &gt; /etc/tripwire/report.txt</userinput></screen>
275
276 <para>
277 View the output to check the integrity of your files. An automatic
278 integrity report can be produced by using a cron facility to schedule
279 the runs.
280 </para>
281
282 <para>
283 Reports are stored in binary and, if desired, encrypted. View reports,
284 as the <systemitem class="username">root</systemitem> user, with:
285 </para>
286
287<screen role="nodump"><userinput>twprint --print-report -r /var/lib/tripwire/report/<replaceable>&lt;report-name.twr&gt;</replaceable></userinput></screen>
288
289 <para>
290 After you run an integrity check, you should examine the report (or
291 email) and then modify the <application>Tripwire</application> database
292 to reflect the changed files on your system. This is so that
293 <application>Tripwire</application> will not continually notify you
294 hat files you intentionally changed are a security violation. To do
295 this you must first <command>ls -l /var/lib/tripwire/report/</command>
296 and note the name of the newest file which starts with your system
297 name as presented by the command <userinput>uname -n</userinput> and
298 ends in <filename>.twr</filename>. These files were created during
299 report creation and the most current one is needed to update the
300 <application>Tripwire</application> database of your system. As the
301 <systemitem class='username'>root</systemitem> user, type in the
302 following command making the appropriate report name:
303 </para>
304
305<screen role="nodump"><userinput>tripwire --update --twrfile /var/lib/tripwire/report/<replaceable>&lt;report-name.twr&gt;</replaceable></userinput></screen>
306
307 <para>
308 You will be placed into <application>Vim</application> with a copy
309 of the report in front of you. If all the changes were good, then just
310 type <command>:wq</command> and after entering your local key, the
311 database will be updated. If there are files which you still want to
312 be warned about, remove the 'x' before the filename in the report and
313 type <command>:wq</command>.
314 </para>
315
316 </sect3>
317
318 <sect3>
319 <title>Changing the Policy File</title>
320
321 <para>
322 If you are unhappy with your policy file and would like to modify it
323 or use a new one, modify the policy file and then execute the following
324 commands as the <systemitem class='username'>root</systemitem> user:
325 </para>
326
327<screen role="nodump"><userinput>twadmin --create-polfile /etc/tripwire/twpol.txt &amp;&amp;
328tripwire --init</userinput></screen>
329
330 </sect3>
331
332 </sect2>
333
334 <sect2 role="content">
335 <title>Contents</title>
336
337 <segmentedlist>
338 <segtitle>Installed Programs</segtitle>
339 <segtitle>Installed Libraries</segtitle>
340 <segtitle>Installed Directories</segtitle>
341
342 <seglistitem>
343 <seg>siggen, tripwire, twadmin, and twprint</seg>
344 <seg>None</seg>
345 <seg>/etc/tripwire, /var/lib/tripwire,
346 and /usr/share/doc/tripwire-&tripwire-version;</seg>
347 </seglistitem>
348 </segmentedlist>
349
350 <variablelist>
351 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
352 <?dbfo list-presentation="list"?>
353 <?dbhtml list-presentation="table"?>
354
355 <varlistentry id="siggen">
356 <term><command>siggen</command></term>
357 <listitem>
358 <para>
359 is a signature gathering utility that displays
360 the hash function values for the specified files.
361 </para>
362 <indexterm zone="tripwire siggen">
363 <primary sortas="b-siggen">siggen</primary>
364 </indexterm>
365 </listitem>
366 </varlistentry>
367
368 <varlistentry id="tripwire-program">
369 <term><command>tripwire</command></term>
370 <listitem>
371 <para>
372 is the main file integrity checking program.
373 </para>
374 <indexterm zone="tripwire tripwire">
375 <primary sortas="b-tripwire">tripwire</primary>
376 </indexterm>
377 </listitem>
378 </varlistentry>
379
380 <varlistentry id="twadmin">
381 <term><command>twadmin</command></term>
382 <listitem>
383 <para>
384 administrative and utility tool used to perform
385 certain administrative functions related to
386 <application>Tripwire</application> files and configuration
387 options.
388 </para>
389 <indexterm zone="tripwire twadmin">
390 <primary sortas="b-twadmin">twadmin</primary>
391 </indexterm>
392 </listitem>
393 </varlistentry>
394
395 <varlistentry id="twprint">
396 <term><command>twprint</command></term>
397 <listitem>
398 <para>
399 prints <application>Tripwire</application>
400 database and report files in clear text format.
401 </para>
402 <indexterm zone="tripwire twprint">
403 <primary sortas="b-twprint">twprint</primary>
404 </indexterm>
405 </listitem>
406 </varlistentry>
407
408 </variablelist>
409
410 </sect2>
411
412</sect1>
Note: See TracBrowser for help on using the repository browser.