In a local network, set up a secure UNIX machine without ANY
network services running. The only access to it is at the console. This is
going to be the tripwire monitor host; it hosts all tripwire binaries for
different OSes on the network, and stores all tw.db_* files. A cron job is
running on this machine to log on remote hosts on the network through ssh
secure shell to run tripwire at randomly selected time and collect data
when tripwire is done. RSA authentication is used and the private key
never leaves this secure host. Before each tripwire run on a remote host,
tripwire binary and database for that host are copied over to a randomly
selected directory. Then the following command is issued immediately
through the ssh connection:
tripwire -tsig 2ChmQx2X43JfLdfRVKbvqo
-dsig 2t3FRZSoXbtjRx88DZQxgq
-csig 1Lq2wfGJJWTtIicS9wvJSj
where -tsig is the MD5 signature of the tripwire binary itself, -dsig the
signature of the database, -csig the signature of the config file. In
tripwire source code, MD5 signature is calculated for every fgets and
fprintf. If any of the signatures doesn't match, the program quits and
reports to admin staff at once. The temporary database is written to this
randomly selected directory instead of /tmp and has its MD5 signature
reported back to the secure host through the secure connection. After each
run, the secure host collects all the temporary databases, check their
signatures, and generates report, etc. The temporary databases will be
used to update the databases when needed.
We have changed the setup somewhat since then. For example, it now won't send the
database to the client anymore, and a sampling scheme is used to reduce
the number of reported changes. We'll describe it in more detail later in
this article. Advantages of our setup over the current tripwire-2.3.x default install include:
cat tw.config | timer -7200 ssh -x -l root $rhost \
"cd $dir && ./tripwire -tsig md5_sig"
where timer is an alarm to kill the connection if the run takes more than 2 hours,