[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 |
|
---|
| 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 |
|
---|
[79f87f94] | 14 | <sect1 id="tripwire" xreflabel="Tripwire-&tripwire-version;">
|
---|
[bae6e15] | 15 | <?dbhtml filename="tripwire.html"?>
|
---|
[79f87f94] | 16 | <title>Tripwire-&tripwire-version;</title>
|
---|
[f45b1953] | 17 |
|
---|
[b4b71892] | 18 | <sect2>
|
---|
| 19 | <title>Introduction to <application>Tripwire</application></title>
|
---|
| 20 |
|
---|
[e40cb61] | 21 | <para>The <application>Tripwire</application> package contains programs used
|
---|
| 22 | to verify the integrity of the files on a given system.</para>
|
---|
[b4b71892] | 23 |
|
---|
| 24 | <sect3><title>Package information</title>
|
---|
| 25 | <itemizedlist spacing='compact'>
|
---|
| 26 | <listitem><para>Download (HTTP): <ulink
|
---|
| 27 | url="&tripwire-download-http;"/></para></listitem>
|
---|
| 28 | <listitem><para>Download (FTP): <ulink
|
---|
| 29 | url="&tripwire-download-ftp;"/></para></listitem>
|
---|
| 30 | <listitem><para>Download size: &tripwire-size;</para></listitem>
|
---|
| 31 | <listitem><para>Estimated Disk space required:
|
---|
| 32 | &tripwire-buildsize;</para></listitem>
|
---|
| 33 | <listitem><para>Estimated build time:
|
---|
| 34 | &tripwire-time;</para></listitem></itemizedlist>
|
---|
| 35 | </sect3>
|
---|
| 36 |
|
---|
| 37 | <sect3><title>Additional downloads</title>
|
---|
| 38 | <itemizedlist spacing='compact'>
|
---|
[e40cb61] | 39 | <listitem><para>Required patch to fix multiple build issues (see patch for
|
---|
| 40 | more information): <ulink
|
---|
| 41 | url="&patch-root;/tripwire-&tripwire-version;-gcc3_build_fixes-1.patch"/></para></listitem>
|
---|
[b4b71892] | 42 | </itemizedlist>
|
---|
| 43 | </sect3>
|
---|
| 44 |
|
---|
[d140e26] | 45 | <sect3><title><application>Tripwire</application> dependencies</title>
|
---|
[b4b71892] | 46 | <sect4><title>Optional</title>
|
---|
[e40cb61] | 47 | <para><acronym>MTA</acronym> (See <xref linkend="server-mail"/>)</para></sect4>
|
---|
[b4b71892] | 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 |
|
---|
[2744e401] | 58 | <screen><userinput><command>patch -Np1 -i ../tripwire-&tripwire-version;-gcc3_build_fixes-1.patch &&
|
---|
[b4b71892] | 59 | make -C src release &&
|
---|
| 60 | cp install/install.{sh,cfg} .</command></userinput></screen>
|
---|
| 61 |
|
---|
[e40cb61] | 62 | <para>The default configuration is to use a local <acronym>MTA</acronym>. If
|
---|
| 63 | you don't have an <acronym>MTA</acronym> installed and have no wish to install
|
---|
| 64 | one, modify <filename>install.cfg</filename> to use an <acronym>SMTP</acronym>
|
---|
| 65 | server instead. Install <application>Tripwire</application> by running the
|
---|
| 66 | following commands:</para>
|
---|
[b4b71892] | 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 |
|
---|
[d140e26] | 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>
|
---|
[b4b71892] | 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>
|
---|
[e40cb61] | 93 | <para><filename>/etc/tripwire/*</filename></para>
|
---|
[b4b71892] | 94 | </sect3>
|
---|
| 95 |
|
---|
| 96 | <sect3><title>Configuration Information</title>
|
---|
| 97 |
|
---|
| 98 | <para><application>Tripwire</application> uses a policy file to determine which
|
---|
[e40cb61] | 99 | files are integrity checked. The default policy file
|
---|
| 100 | (<filename>/etc/tripwire/twpol.txt</filename>) is for a default
|
---|
[b4b71892] | 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>
|
---|
[e40cb61] | 106 |
|
---|
| 107 | <screen><ulink url="http://home.iprimus.com.au/glombowski/blfs/twpol-all.txt"/>
|
---|
[b4b71892] | 108 | Checks integrity of all files
|
---|
[e40cb61] | 109 | <ulink url="http://home.iprimus.com.au/glombowski/blfs/twpol-lfs.txt"/>
|
---|
[b4b71892] | 110 | Custom policy file for Base LFS 3.0 system
|
---|
[e40cb61] | 111 | <ulink url="http://home.iprimus.com.au/glombowski/blfs/twpol-suse7.2.txt"/>
|
---|
[b4b71892] | 112 | Custom policy file for SuSE 7.2 system</screen>
|
---|
| 113 |
|
---|
| 114 | <para>Download the custom policy file you'd like to try, copy it into
|
---|
| 115 | <filename class="directory">/etc/tripwire/</filename>, and use it instead of
|
---|
[d140e26] | 116 | <filename>twpol.txt</filename>. It is, however, recommended that you make
|
---|
| 117 | your own policy file. Get ideas from the examples above and read
|
---|
[e40cb61] | 118 | <filename>/usr/share/doc/tripwire/policyguide.txt</filename> for additional
|
---|
| 119 | information. <filename>twpol.txt</filename> is a good policy file for beginners
|
---|
| 120 | as it will note any changes to the file system and can even be used as an
|
---|
| 121 | annoying way of keeping track of changes for uninstallation of software.</para>
|
---|
[b4b71892] | 122 |
|
---|
[e40cb61] | 123 | <para>After your policy file has been transferred to
|
---|
| 124 | <filename class="directory">/etc/tripwire/</filename> you may begin the
|
---|
| 125 | configuration steps:</para>
|
---|
[b4b71892] | 126 |
|
---|
| 127 | <screen><userinput><command>twadmin -m P /etc/tripwire/twpol.txt &&
|
---|
| 128 | tripwire -m i</command></userinput></screen>
|
---|
| 129 |
|
---|
| 130 | <para>During installation <application>Tripwire</application> will create two
|
---|
[e40cb61] | 131 | keys: a site key and a local key which are stored in
|
---|
| 132 | <filename class="directory">/etc/tripwire/</filename>.</para>
|
---|
[b4b71892] | 133 |
|
---|
| 134 | </sect3>
|
---|
| 135 |
|
---|
| 136 | <sect3><title>Usage Information</title>
|
---|
[e40cb61] | 137 | <para>To use <application>Tripwire</application> after creating a policy file
|
---|
| 138 | to run a report, use the following command:</para>
|
---|
[b4b71892] | 139 |
|
---|
| 140 | <screen><userinput><command>tripwire -m c > /etc/tripwire/report.txt</command></userinput></screen>
|
---|
| 141 |
|
---|
| 142 | <para>View the output to check the integrity of your files. An automatic
|
---|
| 143 | integrity report can be produced by using a cron facility to schedule
|
---|
[e40cb61] | 144 | the runs.</para>
|
---|
[b4b71892] | 145 |
|
---|
[d140e26] | 146 | <para>Please note that after you run an integrity check, you must examine
|
---|
| 147 | the report (or email) and then modify the <application>Tripwire</application>
|
---|
| 148 | database to reflect the changed files on your system. This is so that
|
---|
| 149 | <application>Tripwire</application> will not continually notify you that
|
---|
[b4b71892] | 150 | files you intentionally changed are a security violation. To do this you
|
---|
| 151 | must first <command>ls -l /var/lib/tripwire/report/</command> and note
|
---|
| 152 | the name of the newest file which starts with <filename>linux-</filename> and
|
---|
| 153 | ends in <filename>.twr</filename>. This encrypted file was created during the
|
---|
| 154 | last report creation and is needed to update the
|
---|
| 155 | <application>Tripwire</application> database of your
|
---|
| 156 | system. Then, type in the following command making the appropriate
|
---|
[e40cb61] | 157 | substitutions for <replaceable>[?]</replaceable>:</para>
|
---|
[b4b71892] | 158 |
|
---|
[e40cb61] | 159 | <screen><userinput><command>tripwire -m u -r /var/lib/tripwire/report/linux-<replaceable>[???????]</replaceable>-<replaceable>[??????]</replaceable>.twr</command></userinput></screen>
|
---|
| 160 |
|
---|
| 161 | <para>You will be placed into <application>vim</application> with a copy of
|
---|
| 162 | the report in front of you. If all the changes were good, then just type
|
---|
| 163 | <command>:x</command> and after entering your local key, the database will be
|
---|
| 164 | updated. If there are files which you still want to be warned about, remove the
|
---|
| 165 | 'x' before the filename in the report and type <command>:x</command>.</para>
|
---|
[b4b71892] | 166 |
|
---|
| 167 | </sect3>
|
---|
| 168 |
|
---|
| 169 | <sect3><title>Changing the Policy File</title>
|
---|
| 170 |
|
---|
| 171 | <para>If you are unhappy with your policy file and would like to modify it or
|
---|
| 172 | use a new one, modify the policy file and then execute the following
|
---|
| 173 | commands:</para>
|
---|
[e40cb61] | 174 |
|
---|
[b4b71892] | 175 | <screen><userinput><command>twadmin -m P /etc/tripwire/twpol.txt &&
|
---|
| 176 | tripwire -m i</command></userinput></screen>
|
---|
| 177 |
|
---|
| 178 | </sect3>
|
---|
| 179 |
|
---|
| 180 | </sect2>
|
---|
| 181 |
|
---|
| 182 | <sect2>
|
---|
| 183 | <title>Contents</title>
|
---|
| 184 |
|
---|
[d140e26] | 185 | <para>The <application>Tripwire</application> package contains
|
---|
| 186 | <command>siggen</command>, <command>tripwire</command>,
|
---|
| 187 | <command>twadmin</command> and <command>twprint</command>.</para>
|
---|
[b4b71892] | 188 |
|
---|
| 189 | </sect2>
|
---|
[f45b1953] | 190 |
|
---|
[e40cb61] | 191 | <sect2>
|
---|
| 192 | <title>Description</title>
|
---|
| 193 |
|
---|
| 194 | <sect3>
|
---|
| 195 | <title>siggen</title>
|
---|
| 196 | <para><command>siggen</command> is a signature gathering utility that displays
|
---|
| 197 | the hash function values for the specified files.</para></sect3>
|
---|
| 198 |
|
---|
| 199 | <sect3>
|
---|
| 200 | <title>tripwire</title>
|
---|
| 201 | <para><command>tripwire</command> is the main file integrity checking program.
|
---|
| 202 | </para></sect3>
|
---|
| 203 |
|
---|
| 204 | <sect3>
|
---|
| 205 | <title>twadmin</title>
|
---|
| 206 | <para><command>twadmin</command> is <application>Tripwire</application>'s
|
---|
| 207 | administrative and utility tool used to perform certain administrative
|
---|
| 208 | functions related to <application>Tripwire</application> files and
|
---|
| 209 | configuration options.</para></sect3>
|
---|
| 210 |
|
---|
| 211 | <sect3>
|
---|
| 212 | <title>twprint</title>
|
---|
| 213 | <para><command>twprint</command> prints <application>Tripwire</application>
|
---|
| 214 | database and report files in clear text format.</para></sect3>
|
---|
| 215 |
|
---|
| 216 | </sect2>
|
---|
| 217 |
|
---|
[f45b1953] | 218 | </sect1>
|
---|
[ce2adc3] | 219 |
|
---|