![]() ![]() ![]() ![]() ![]() |
|
Tripwire is a useful intrusion detection system. It will monitor files on your system and notify you if something has been modified. Before starting I would like to point out that everything that I describe in this guide is listed in greater detail on your redhat documentation cd. This is merely a quick start guide for the newbie. I would read the entire guide and then follow along here you will be more familiar with the process and that should make implementing tripwire pretty easy. Also, in the official guide, there is additional info about operating tripwire, creating reports, and updating your tripwire database as to remove repetitive warnings on files that you have verified are ok. So basically, you need to read the guide and check the man pages eventually. verify that you haven't already installed tripwire If it is not installed get it from your cd or download from your favorite redhat mirror. install the tripwire rpm configure tripwire insert pass phrases when asked and make a note of them as you will need them in the future. initialize the tripwire database check your tripwire database run a report and pipe the output to less so you
can compare items in the twpol.txt file and comment out unwanted #twprint -m r --twrfile /var/lib/tripwire/report/SERVER.NAME-XXXXXXXX-XXXXXX.twr | less Scroll through the output of the report and in another terminal edit /etc/tripwire/twpol.txt. Comment out any items that show up as "No such file or Directory". change the server name from "localhost" to your server name. add the emalto directive to your rule directives so it looks like below example. ( if you didn't get it perfect repeat until running "tripwire --check" gives a nice clean report without listing lots of files that don't exist now automate it to run daily and send an email
to the address you specified in the twpol.txt file to manually configure the time to run your script now edit your crontab this will open your crontab in your default editor "vi". 00 06 * * * /scriptfoldername/tripwire-check save and exit To set up the nightly check so it will send an email to the user(s) specified in the "emailto =" directive under each rulename directive modify the "tripwire-check" script line that looks like this: test -f /etc/tripwire/tw.cfg && /usr/sbin/tripwire --check and add --email-report to the end, like this test -f /etc/tripwire/tw.cfg && /usr/sbin/tripwire --check --email-report You can test the scripts email functionality by manually
running the script or setting your now you are set to run tripwire automatically and get the results emailed to you daily. you now need to clean up a bit. If you want to verify that tripwire is actually
working run tripwire check you should see that tripwire will notify you that /boot/boot.b has been modified. Now if you want to get the warning from /boot/boot.b being modified to not show up on all subsequent reports read the tripwire guide that came with your redhat doc cd. reference: man tripwire, redhat documentation
cd installing tripwire section
|