Tripwire is an essential component for any security design - it provides a quick and simple meathod to determine the integrity of the physical system. There are a number of 'classic' problems with using tripwire:
The general problem that we set out to solve was to address a large number of appliences scattered across the internet. These machines would be connected via a series of ssh connections back to the centeral administrative area. We modified the standard tripwire source with the Yu patch (thanks!) in order to be able to operate with the following options:
-tsig: Expected MD5 hash of the tripwire executable. If it does not match, flag error and exit.Keeping individual databases for the possibly thousands of hosts would be quite complex. Instead, we leverage the appliance nature of the client hosts and just need to keep one database for each release number. This will grow at a much slower value than the number of clients. Since we control the upgrade process from the centeral area, we will always know at exactly what relaese level the client is at.
-csig: Expected MD5 hash of tripwire config file. This file contains the listing of all the files and directories that will be watched by the application. Like tsig, the app will error out if tis fails.
-d -: The database of expected values id passed in from the central administrative host via standard in. This way there is no way for a compromised host to pass trojened libs/binarys by modifying or replacing the local database.
From the centeral area, we issue a command similar to:
cat tripwire.db | ssh -i id_file -l logger_id client.host.name "/usr/secure/tripwire -tsigand then catch the rturn stream for processing into a stream of HTML via a (far too) simple script. Look here for the script.-csig -d - > ../logs/output"
The final output can be fit together into a web page that can be looked at every morning, allowing for hundreds of hosts to be scanned in little or no time.
Again, all the real work has been done by Yunliang Yu so look at his page for more details.