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