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