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