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