1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY tripwire-download-http "http://prdownloads.sourceforge.net/tripwire/tripwire-&tripwire-version;.tar.gz">
|
---|
8 | <!ENTITY tripwire-download-ftp "ftp://ftp.fu-berlin.de/unix/security/tripwire/tripwire-&tripwire-version;.tar.gz">
|
---|
9 | <!ENTITY tripwire-size "1.4 MB">
|
---|
10 | <!ENTITY tripwire-buildsize "63 MB">
|
---|
11 | <!ENTITY tripwire-time "2.35 SBU">
|
---|
12 | ]>
|
---|
13 |
|
---|
14 | <sect1 id="tripwire" xreflabel="Tripwire-&tripwire-version;">
|
---|
15 | <?dbhtml filename="tripwire.html"?>
|
---|
16 | <title>Tripwire-&tripwire-version;</title>
|
---|
17 |
|
---|
18 | <sect2>
|
---|
19 | <title>Introduction to <application>Tripwire</application></title>
|
---|
20 |
|
---|
21 | <para>The <application>Tripwire</application> package contains the programs
|
---|
22 | used by <application>Tripwire</application> to verify the integrity of the
|
---|
23 | files on a given system.</para>
|
---|
24 |
|
---|
25 | <sect3><title>Package information</title>
|
---|
26 | <itemizedlist spacing='compact'>
|
---|
27 | <listitem><para>Download (HTTP): <ulink
|
---|
28 | url="&tripwire-download-http;"/></para></listitem>
|
---|
29 | <listitem><para>Download (FTP): <ulink
|
---|
30 | url="&tripwire-download-ftp;"/></para></listitem>
|
---|
31 | <listitem><para>Download size: &tripwire-size;</para></listitem>
|
---|
32 | <listitem><para>Estimated Disk space required:
|
---|
33 | &tripwire-buildsize;</para></listitem>
|
---|
34 | <listitem><para>Estimated build time:
|
---|
35 | &tripwire-time;</para></listitem></itemizedlist>
|
---|
36 | </sect3>
|
---|
37 |
|
---|
38 | <sect3><title>Additional downloads</title>
|
---|
39 | <itemizedlist spacing='compact'>
|
---|
40 | <listitem><para>Required patch to fix multiple build issues (see patch for more information):
|
---|
41 | <ulink url="&patch-root;/tripwire-&tripwire-version;-gcc3_build_fixes-1.patch"/></para></listitem>
|
---|
42 | </itemizedlist>
|
---|
43 | </sect3>
|
---|
44 |
|
---|
45 | <sect3><title><application>Tripwire</application> dependencies</title>
|
---|
46 | <sect4><title>Optional</title>
|
---|
47 | <para>MTA (See <xref linkend="server-mail"/>)</para></sect4>
|
---|
48 | </sect3>
|
---|
49 |
|
---|
50 | </sect2>
|
---|
51 |
|
---|
52 | <sect2>
|
---|
53 | <title>Installation of <application>Tripwire</application></title>
|
---|
54 |
|
---|
55 | <para>Compile <application>Tripwire</application> by running the following
|
---|
56 | commands:</para>
|
---|
57 |
|
---|
58 | <screen><userinput><command>patch -Np1 -i ../tripwire-&tripwire-version;-gcc3_build_fixes-1.patch &&
|
---|
59 | make -C src release &&
|
---|
60 | cp install/install.{sh,cfg} .</command></userinput></screen>
|
---|
61 |
|
---|
62 | <para>The default configuration is to use a local MTA. If you don't have
|
---|
63 | an MTA installed and have no wish to install one, modify
|
---|
64 | <filename>install.cfg</filename> to use an SMTP server instead.
|
---|
65 | Install <application>Tripwire</application> by running the following
|
---|
66 | commands:</para>
|
---|
67 |
|
---|
68 | <screen><userinput><command>./install.sh &&
|
---|
69 | cp /etc/tripwire/tw.cfg /usr/sbin &&
|
---|
70 | cp policy/*.txt /usr/share/doc/tripwire</command></userinput></screen>
|
---|
71 |
|
---|
72 | </sect2>
|
---|
73 |
|
---|
74 | <sect2>
|
---|
75 | <title>Command explanations</title>
|
---|
76 |
|
---|
77 | <para><command>make release</command>: This command creates the
|
---|
78 | <application>Tripwire</application> binaries.</para>
|
---|
79 |
|
---|
80 | <para><command>cp install.{sh,cfg} .</command>: These files are copied to
|
---|
81 | the main <application>Tripwire</application> directory so that the script
|
---|
82 | can be used to install the package.</para>
|
---|
83 |
|
---|
84 | <para><command>cp policy/*.txt /usr/share/doc/tripwire</command>: This command
|
---|
85 | installs the documentation.</para>
|
---|
86 |
|
---|
87 | </sect2>
|
---|
88 |
|
---|
89 | <sect2>
|
---|
90 | <title>Configuring <application>Tripwire</application></title>
|
---|
91 |
|
---|
92 | <sect3><title>Config files</title>
|
---|
93 | <para><filename class="directory">/etc/tripwire</filename></para>
|
---|
94 | </sect3>
|
---|
95 |
|
---|
96 | <sect3><title>Configuration Information</title>
|
---|
97 |
|
---|
98 | <para><application>Tripwire</application> uses a policy file to determine which
|
---|
99 | files are integrity checked. The default policy file (<filename>twpol.txt
|
---|
100 | </filename> found in <filename class="directory">/etc/tripwire/</filename>) is for a default
|
---|
101 | installation of Redhat 7.0 and is woefully outdated.</para>
|
---|
102 |
|
---|
103 | <para>Policy files are also a custom thing and should be tailored to each
|
---|
104 | individual distribution and/or installation. Some custom policy files can be
|
---|
105 | found below: </para>
|
---|
106 | <screen><ulink url="http://home.iprimus.com.au/glombowski/blfs/twpol-all.txt">http://home.iprimus.com.au/glombowski/blfs/twpol-all.txt</ulink>
|
---|
107 | Checks integrity of all files
|
---|
108 | <ulink url="http://home.iprimus.com.au/glombowski/blfs/twpol-lfs.txt">http://home.iprimus.com.au/glombowski/blfs/twpol-lfs.txt</ulink>
|
---|
109 | Custom policy file for Base LFS 3.0 system
|
---|
110 | <ulink url="http://home.iprimus.com.au/glombowski/blfs/twpol-suse7.2.txt">http://home.iprimus.com.au/glombowski/blfs/twpol-suse7.2.txt</ulink>
|
---|
111 | Custom policy file for SuSE 7.2 system</screen>
|
---|
112 |
|
---|
113 | <para>Download the custom policy file you'd like to try, copy it into
|
---|
114 | <filename class="directory">/etc/tripwire/</filename>, and use it instead of
|
---|
115 | <filename>twpol.txt</filename>. It is, however, recommended that you make
|
---|
116 | your own policy file. Get ideas from the examples above and read
|
---|
117 | <filename> /usr/share/doc/tripwire/policyguide.txt</filename>.
|
---|
118 | <filename>twpol.txt</filename> is a good policy file for beginners as it
|
---|
119 | will note any changes to the file system and can even be used as an annoying
|
---|
120 | way of keeping track of changes for uninstallation of software.</para>
|
---|
121 |
|
---|
122 | <para>After your policy file has been transferred to <filename
|
---|
123 | class="directory">/etc/tripwire/</filename> you may begin the configuration
|
---|
124 | steps:</para>
|
---|
125 |
|
---|
126 | <screen><userinput><command>twadmin -m P /etc/tripwire/twpol.txt &&
|
---|
127 | tripwire -m i</command></userinput></screen>
|
---|
128 |
|
---|
129 | <para>During installation <application>Tripwire</application> will create two
|
---|
130 | (2) keys: a site key and a local key which will be stored in <filename
|
---|
131 | class="directory">/etc/tripwire/</filename>.</para>
|
---|
132 |
|
---|
133 | </sect3>
|
---|
134 |
|
---|
135 | <sect3><title>Usage Information</title>
|
---|
136 | <para>To use <application>Tripwire</application> after this and run a report,
|
---|
137 | use the following command:</para>
|
---|
138 |
|
---|
139 | <screen><userinput><command>tripwire -m c > /etc/tripwire/report.txt</command></userinput></screen>
|
---|
140 |
|
---|
141 | <para>View the output to check the integrity of your files. An automatic
|
---|
142 | integrity report can be produced by using a cron facility to schedule
|
---|
143 | the runs. </para>
|
---|
144 |
|
---|
145 | <para>Please note that after you run an integrity check, you must examine
|
---|
146 | the report (or email) and then modify the <application>Tripwire</application>
|
---|
147 | database to reflect the changed files on your system. This is so that
|
---|
148 | <application>Tripwire</application> will not continually notify you that
|
---|
149 | files you intentionally changed are a security violation. To do this you
|
---|
150 | must first <command>ls -l /var/lib/tripwire/report/</command> and note
|
---|
151 | the name of the newest file which starts with <filename>linux-</filename> and
|
---|
152 | ends in <filename>.twr</filename>. This encrypted file was created during the
|
---|
153 | last report creation and is needed to update the
|
---|
154 | <application>Tripwire</application> database of your
|
---|
155 | system. Then, type in the following command making the appropriate
|
---|
156 | substitutions for '?':</para>
|
---|
157 | <screen><userinput><command>tripwire -m u -r /var/lib/tripwire/report/linux-???????-??????.twr </command></userinput></screen>
|
---|
158 |
|
---|
159 | <para>You will be placed into vim with a copy of the report in front of you. If
|
---|
160 | all the changes were good, then just type <command>:x</command> and after
|
---|
161 | entering your local key, the database will be updated. If there are files which
|
---|
162 | you still want to be warned about, remove the x before the filename in
|
---|
163 | the report and type <command>:x</command>.</para>
|
---|
164 |
|
---|
165 | </sect3>
|
---|
166 |
|
---|
167 | <sect3><title>Changing the Policy File</title>
|
---|
168 |
|
---|
169 | <para>If you are unhappy with your policy file and would like to modify it or
|
---|
170 | use a new one, modify the policy file and then execute the following
|
---|
171 | commands:</para>
|
---|
172 | <screen><userinput><command>twadmin -m P /etc/tripwire/twpol.txt &&
|
---|
173 | tripwire -m i</command></userinput></screen>
|
---|
174 |
|
---|
175 | </sect3>
|
---|
176 |
|
---|
177 | </sect2>
|
---|
178 |
|
---|
179 | <sect2>
|
---|
180 | <title>Contents</title>
|
---|
181 |
|
---|
182 | <para>The <application>Tripwire</application> package contains
|
---|
183 | <command>siggen</command>, <command>tripwire</command>,
|
---|
184 | <command>twadmin</command> and <command>twprint</command>.</para>
|
---|
185 |
|
---|
186 | </sect2>
|
---|
187 |
|
---|
188 | </sect1>
|
---|
189 |
|
---|