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