[b4b71892] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[7f76b96] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
---|
[b4b71892] | 3 | "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[dc94017e] | 7 | <!ENTITY tripwire-download-http "http://www.frenchfries.net/paul/tripwire/tripwire-&tripwire-version;.tar.gz">
|
---|
| 8 | <!ENTITY tripwire-download-ftp " ">
|
---|
[fb5327d] | 9 | <!ENTITY tripwire-md5sum "02610d0593fe04d35d809ff6c5becc02">
|
---|
[dc94017e] | 10 | <!ENTITY tripwire-size "869 KB">
|
---|
| 11 | <!ENTITY tripwire-buildsize "22 MB">
|
---|
| 12 | <!ENTITY tripwire-time "2.96 SBU">
|
---|
[b4b71892] | 13 | ]>
|
---|
| 14 |
|
---|
[dc94017e] | 15 | <sect1 id="tripwire-portable" xreflabel="Tripwire-&tripwire-version;">
|
---|
[a0f03b0] | 16 | <sect1info>
|
---|
[5cd0959d] | 17 | <othername>$LastChangedBy$</othername>
|
---|
| 18 | <date>$Date$</date>
|
---|
[a0f03b0] | 19 | </sect1info>
|
---|
[bae6e15] | 20 | <?dbhtml filename="tripwire.html"?>
|
---|
[79f87f94] | 21 | <title>Tripwire-&tripwire-version;</title>
|
---|
[305e60de] | 22 | <indexterm zone="tripwire-portable">
|
---|
| 23 | <primary sortas="a-Tripwire">Tripwire</primary>
|
---|
| 24 | </indexterm>
|
---|
[f45b1953] | 25 |
|
---|
[b4b71892] | 26 | <sect2>
|
---|
| 27 | <title>Introduction to <application>Tripwire</application></title>
|
---|
| 28 |
|
---|
[e40cb61] | 29 | <para>The <application>Tripwire</application> package contains programs used
|
---|
| 30 | to verify the integrity of the files on a given system.</para>
|
---|
[b4b71892] | 31 |
|
---|
| 32 | <sect3><title>Package information</title>
|
---|
| 33 | <itemizedlist spacing='compact'>
|
---|
| 34 | <listitem><para>Download (HTTP): <ulink
|
---|
| 35 | url="&tripwire-download-http;"/></para></listitem>
|
---|
| 36 | <listitem><para>Download (FTP): <ulink
|
---|
| 37 | url="&tripwire-download-ftp;"/></para></listitem>
|
---|
[fb5327d] | 38 | <listitem><para>Download MD5 sum: &tripwire-md5sum;</para></listitem>
|
---|
[b4b71892] | 39 | <listitem><para>Download size: &tripwire-size;</para></listitem>
|
---|
[518538f] | 40 | <listitem><para>Estimated disk space required:
|
---|
[b4b71892] | 41 | &tripwire-buildsize;</para></listitem>
|
---|
| 42 | <listitem><para>Estimated build time:
|
---|
| 43 | &tripwire-time;</para></listitem></itemizedlist>
|
---|
| 44 | </sect3>
|
---|
| 45 |
|
---|
[d140e26] | 46 | <sect3><title><application>Tripwire</application> dependencies</title>
|
---|
[b4b71892] | 47 | <sect4><title>Optional</title>
|
---|
[305e60de] | 48 | <para><acronym>MTA</acronym> (See <xref linkend="server-mail"/>)</para>
|
---|
| 49 | </sect4>
|
---|
[b4b71892] | 50 | </sect3>
|
---|
| 51 |
|
---|
| 52 | </sect2>
|
---|
| 53 |
|
---|
| 54 | <sect2>
|
---|
| 55 | <title>Installation of <application>Tripwire</application></title>
|
---|
| 56 |
|
---|
| 57 | <para>Compile <application>Tripwire</application> by running the following
|
---|
| 58 | commands:</para>
|
---|
| 59 |
|
---|
[104ecdc7] | 60 | <screen><userinput><command>sed -i -e 's@TWDB="${prefix}@TWDB="/var@' install/install.cfg &&
|
---|
[dc94017e] | 61 | ./configure --prefix=/usr --sysconfdir=/etc/tripwire &&
|
---|
[305e60de] | 62 | make</command></userinput></screen>
|
---|
| 63 |
|
---|
| 64 | <para>Now, as the root user:</para>
|
---|
| 65 |
|
---|
| 66 | <screen><userinput role='root'><command>make install &&
|
---|
[dc94017e] | 67 | cp policy/*.txt /usr/share/doc/tripwire</command></userinput></screen>
|
---|
[b4b71892] | 68 |
|
---|
[e40cb61] | 69 | <para>The default configuration is to use a local <acronym>MTA</acronym>. If
|
---|
| 70 | you don't have an <acronym>MTA</acronym> installed and have no wish to install
|
---|
| 71 | one, modify <filename>install.cfg</filename> to use an <acronym>SMTP</acronym>
|
---|
[dc94017e] | 72 | server instead.</para>
|
---|
[b4b71892] | 73 |
|
---|
| 74 | </sect2>
|
---|
| 75 |
|
---|
| 76 | <sect2>
|
---|
| 77 | <title>Command explanations</title>
|
---|
| 78 |
|
---|
[104ecdc7] | 79 | <para><command>sed -i -e 's@TWDB="${prefix}@TWDB="/var@'
|
---|
[dd362e5] | 80 | install/install.cfg</command>: This command tells the package to install the
|
---|
| 81 | program database and reports in
|
---|
[dc94017e] | 82 | <filename>/var/lib/tripwire</filename>.</para>
|
---|
[b4b71892] | 83 |
|
---|
[dc94017e] | 84 | <para><command>make install</command>: This command creates the
|
---|
| 85 | <application>Tripwire</application> security keys as well as installing the
|
---|
| 86 | binaries. There are two keys: a site key and a local key which are stored in
|
---|
| 87 | <filename class="directory">/etc/tripwire/</filename>.</para>
|
---|
[b4b71892] | 88 |
|
---|
| 89 | <para><command>cp policy/*.txt /usr/share/doc/tripwire</command>: This command
|
---|
| 90 | installs the documentation.</para>
|
---|
| 91 |
|
---|
| 92 | </sect2>
|
---|
| 93 |
|
---|
| 94 | <sect2>
|
---|
| 95 | <title>Configuring <application>Tripwire</application></title>
|
---|
| 96 |
|
---|
[305e60de] | 97 | <sect3 id="tripwire-config"><title>Config files</title>
|
---|
[e40cb61] | 98 | <para><filename>/etc/tripwire/*</filename></para>
|
---|
[305e60de] | 99 | <indexterm zone="tripwire-portable tripwire-config">
|
---|
| 100 | <primary sortas="e-etc-tripwire">/etc/tripwire/*</primary>
|
---|
| 101 | </indexterm>
|
---|
[b4b71892] | 102 | </sect3>
|
---|
| 103 |
|
---|
| 104 | <sect3><title>Configuration Information</title>
|
---|
| 105 |
|
---|
| 106 | <para><application>Tripwire</application> uses a policy file to determine which
|
---|
[e40cb61] | 107 | files are integrity checked. The default policy file
|
---|
| 108 | (<filename>/etc/tripwire/twpol.txt</filename>) is for a default
|
---|
[dc94017e] | 109 | installation Redhat and will need to be updated for your system.</para>
|
---|
[b4b71892] | 110 |
|
---|
[dc94017e] | 111 | <para>Policy files should be tailored to each individual distribution and/or
|
---|
| 112 | installation. Some custom policy files can be found below: </para>
|
---|
[e40cb61] | 113 |
|
---|
| 114 | <screen><ulink url="http://home.iprimus.com.au/glombowski/blfs/twpol-all.txt"/>
|
---|
[b4b71892] | 115 | Checks integrity of all files
|
---|
[e40cb61] | 116 | <ulink url="http://home.iprimus.com.au/glombowski/blfs/twpol-lfs.txt"/>
|
---|
[b4b71892] | 117 | Custom policy file for Base LFS 3.0 system
|
---|
[e40cb61] | 118 | <ulink url="http://home.iprimus.com.au/glombowski/blfs/twpol-suse7.2.txt"/>
|
---|
[b4b71892] | 119 | Custom policy file for SuSE 7.2 system</screen>
|
---|
| 120 |
|
---|
| 121 | <para>Download the custom policy file you'd like to try, copy it into
|
---|
| 122 | <filename class="directory">/etc/tripwire/</filename>, and use it instead of
|
---|
[d140e26] | 123 | <filename>twpol.txt</filename>. It is, however, recommended that you make
|
---|
| 124 | your own policy file. Get ideas from the examples above and read
|
---|
[e40cb61] | 125 | <filename>/usr/share/doc/tripwire/policyguide.txt</filename> for additional
|
---|
| 126 | information. <filename>twpol.txt</filename> is a good policy file for beginners
|
---|
| 127 | as it will note any changes to the file system and can even be used as an
|
---|
| 128 | annoying way of keeping track of changes for uninstallation of software.</para>
|
---|
[b4b71892] | 129 |
|
---|
[e40cb61] | 130 | <para>After your policy file has been transferred to
|
---|
| 131 | <filename class="directory">/etc/tripwire/</filename> you may begin the
|
---|
| 132 | configuration steps:</para>
|
---|
[b4b71892] | 133 |
|
---|
[305e60de] | 134 | <screen><userinput role='root'><command>twadmin --create-polfile --site-keyfile /etc/tripwire/site.key \
|
---|
[dd362e5] | 135 | /etc/tripwire/twpol.txt &&
|
---|
[dc94017e] | 136 | tripwire --init</command></userinput></screen>
|
---|
[b4b71892] | 137 |
|
---|
| 138 | </sect3>
|
---|
| 139 |
|
---|
| 140 | <sect3><title>Usage Information</title>
|
---|
[e40cb61] | 141 | <para>To use <application>Tripwire</application> after creating a policy file
|
---|
| 142 | to run a report, use the following command:</para>
|
---|
[b4b71892] | 143 |
|
---|
[305e60de] | 144 | <screen><userinput role='root'><command>tripwire --check > /etc/tripwire/report.txt</command></userinput></screen>
|
---|
[b4b71892] | 145 |
|
---|
| 146 | <para>View the output to check the integrity of your files. An automatic
|
---|
| 147 | integrity report can be produced by using a cron facility to schedule
|
---|
[e40cb61] | 148 | the runs.</para>
|
---|
[b4b71892] | 149 |
|
---|
[d140e26] | 150 | <para>Please note that after you run an integrity check, you must examine
|
---|
| 151 | the report (or email) and then modify the <application>Tripwire</application>
|
---|
| 152 | database to reflect the changed files on your system. This is so that
|
---|
| 153 | <application>Tripwire</application> will not continually notify you that
|
---|
[b4b71892] | 154 | files you intentionally changed are a security violation. To do this you
|
---|
| 155 | must first <command>ls -l /var/lib/tripwire/report/</command> and note
|
---|
| 156 | the name of the newest file which starts with <filename>linux-</filename> and
|
---|
| 157 | ends in <filename>.twr</filename>. This encrypted file was created during the
|
---|
| 158 | last report creation and is needed to update the
|
---|
| 159 | <application>Tripwire</application> database of your
|
---|
| 160 | system. Then, type in the following command making the appropriate
|
---|
[e40cb61] | 161 | substitutions for <replaceable>[?]</replaceable>:</para>
|
---|
[b4b71892] | 162 |
|
---|
[305e60de] | 163 | <screen><userinput role='root'><command>tripwire --update -twrfile \
|
---|
[dd362e5] | 164 | /var/lib/tripwire/report/linux-<replaceable>[???????]</replaceable>-<replaceable>[??????]</replaceable>.twr</command></userinput></screen>
|
---|
[e40cb61] | 165 |
|
---|
| 166 | <para>You will be placed into <application>vim</application> with a copy of
|
---|
| 167 | the report in front of you. If all the changes were good, then just type
|
---|
| 168 | <command>:x</command> and after entering your local key, the database will be
|
---|
| 169 | updated. If there are files which you still want to be warned about, remove the
|
---|
| 170 | 'x' before the filename in the report and type <command>:x</command>.</para>
|
---|
[b4b71892] | 171 |
|
---|
| 172 | </sect3>
|
---|
| 173 |
|
---|
| 174 | <sect3><title>Changing the Policy File</title>
|
---|
| 175 |
|
---|
| 176 | <para>If you are unhappy with your policy file and would like to modify it or
|
---|
| 177 | use a new one, modify the policy file and then execute the following
|
---|
| 178 | commands:</para>
|
---|
[e40cb61] | 179 |
|
---|
[305e60de] | 180 | <screen><userinput role='root'><command>twadmin --create-polfile /etc/tripwire/twpol.txt &&
|
---|
[dc94017e] | 181 | tripwire --init</command></userinput></screen>
|
---|
[b4b71892] | 182 | </sect3>
|
---|
| 183 |
|
---|
| 184 | </sect2>
|
---|
| 185 |
|
---|
| 186 | <sect2>
|
---|
| 187 | <title>Contents</title>
|
---|
[dc94017e] | 188 | <segmentedlist>
|
---|
| 189 | <segtitle>Installed Programs</segtitle>
|
---|
[25d03a51] | 190 | <segtitle>Installed Libraries</segtitle>
|
---|
[305e60de] | 191 | <segtitle>Installed Directories</segtitle>
|
---|
[dc94017e] | 192 | <seglistitem>
|
---|
| 193 | <seg>siggen, tripwire, twadmin and twprint.</seg>
|
---|
[25d03a51] | 194 | <seg>None</seg>
|
---|
[305e60de] | 195 | <seg>/etc/tripwire, /usr/share/doc/tripwire and /var/lib/tripwire</seg>
|
---|
[dc94017e] | 196 | </seglistitem>
|
---|
| 197 | </segmentedlist>
|
---|
| 198 |
|
---|
| 199 | <variablelist>
|
---|
| 200 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 201 | <?dbfo list-presentation="list"?>
|
---|
| 202 |
|
---|
| 203 | <varlistentry id="siggen">
|
---|
| 204 | <term><command>siggen</command></term>
|
---|
| 205 | <listitem><para>is a signature gathering utility that displays
|
---|
| 206 | the hash function values for the specified files.</para>
|
---|
[305e60de] | 207 | <indexterm zone="tripwire-portable siggen">
|
---|
| 208 | <primary sortas="b-siggen">siggen</primary>
|
---|
| 209 | </indexterm>
|
---|
[dc94017e] | 210 | </listitem>
|
---|
| 211 | </varlistentry>
|
---|
| 212 |
|
---|
| 213 | <varlistentry id='tripwire'>
|
---|
| 214 | <term><command>tripwire</command></term>
|
---|
[305e60de] | 215 | <listitem><para>is the main file integrity checking program.</para>
|
---|
| 216 | <indexterm zone="tripwire-portable tripwire">
|
---|
| 217 | <primary sortas="b-tripwire">tripwire</primary>
|
---|
| 218 | </indexterm>
|
---|
| 219 | </listitem>
|
---|
[dc94017e] | 220 | </varlistentry>
|
---|
| 221 |
|
---|
| 222 | <varlistentry id='twadmin'>
|
---|
| 223 | <term><command>twadmin</command></term>
|
---|
| 224 | <listitem><para>administrative and utility tool used to perform
|
---|
| 225 | certain administrative functions related to
|
---|
[305e60de] | 226 | <application>Tripwire</application> files and configuration
|
---|
| 227 | options.</para>
|
---|
| 228 | <indexterm zone="tripwire-portable twadmin">
|
---|
| 229 | <primary sortas="b-twadmin">twadmin</primary>
|
---|
| 230 | </indexterm>
|
---|
[dc94017e] | 231 | </listitem>
|
---|
| 232 | </varlistentry>
|
---|
| 233 |
|
---|
| 234 | <varlistentry id='twprint'>
|
---|
| 235 | <term><command>twprint</command></term>
|
---|
| 236 | <listitem><para>prints <application>Tripwire</application>
|
---|
| 237 | database and report files in clear text format.</para>
|
---|
[305e60de] | 238 | <indexterm zone="tripwire-portable twprint">
|
---|
| 239 | <primary sortas="b-twprint">twprint</primary>
|
---|
| 240 | </indexterm>
|
---|
[dc94017e] | 241 | </listitem>
|
---|
| 242 | </varlistentry>
|
---|
| 243 | </variablelist>
|
---|
[e40cb61] | 244 |
|
---|
| 245 | </sect2>
|
---|
| 246 |
|
---|
[f45b1953] | 247 | </sect1>
|
---|
[ce2adc3] | 248 |
|
---|