How to Set Up and Use Tripwire
Immediately after any system change, be it due to installation, update or removal of software or configuration files, it is mandatory to update the plain-text policy file and regenerate the binary database. Any successive Tripwire check would be meaningless otherwise. Therefore, run this command whenever it's necessary:
tripwire -update-policy -twrfile ↪a_previous_integrity_report.twr
Because it is so critical, this operation requires both your local and site passphrases. When launched in this way, Tripwire detects as violations any changes that happened after the specified integrity check. In such a case, an actual update of the policy, ignoring such violations, is possible only if the user explicitly tells the program to run in low security mode. The corresponding option is -Z low and is explained in detail in the Tripwire man page.
Reading the twfiles and twintro man pages, which contain short and up-to-date overviews of all the files and programs that compose the Tripwire suite, is highly recommended before starting the installation. The actual Tripwire binary, if called with the -help option, lists all the available options. Like many FOSS programs, all the utilities of this package accept both short and long forms of their command-line options.
For example, tripwire -check also can be written as tripwire -m c. The second form is faster when one already knows Tripwire and has to use it interactively, but the explicit command is recommended in scripts, for documentation or didactical purposes. The -v option puts any Tripwire command in verbose mode. Common wisdom also suggests that both the binary and text versions of the Tripwire system files be stored on a separate computer, write-protected floppy disk or USB drive.
Remember that one of the first things a determined cracker will do is to replace just those files with her own copies, to hide any trace of attack. The periodical reports placed by Tripwire in /var/lib/tripwire are in binary, optionally signed format. Consequently, they can't be read straight from the prompt, and they also can't even be processed directly by a shell script for automatic comparison or other purposes. The solution is to use the twprint command, which comes with its own complete man page, as in this example (note that you must pass the binary configuration file for it to work):
twprint --print-report --cfgfile twcfg.enc --twrfile ↪/var/lib/tripwire/report/my_tripwire_report
The digital signatures of each binary file can be checked directly with the siggen utility, which also has its own man page:
/usr/sbin/siggen /etc/tripwire/twcfg.enc --------------------------------------------- Signatures for file: /etc/tripwire/twcfg.enc CRC32 Dmjk1z MD5 DTn311w6Wx3+7TXv7SHPjA SHA D5N1Pv4biCnd14igf/anGM3pvVH HAVAL BEJmfzpcA/Txq5nf9kgsVb
Tripwire Competitors
Tripwire certainly isn't the only IDS solution for GNU/Linux systems. Its more popular competitors are briefly described below. Other similar packages in the same category are listed on a Purdue University Web page (see the on-line Resources).
AIDE: the Advanced Intrusion Detection Environment is proposed as a free software replacement for everything Tripwire does and then some. The integrity database is defined by writing regular expressions in the configuration file. Besides MD5, several other algorithms can be added to verify file the integrity. Today, AIDE already supports sha1, tormd160, tiger, haval and some others.
Tripwire for Servers: this is a proprietary product by Tripwire, Inc., the company created by the original Tripwire developers. It is targeted at centralized monitoring of groups of Linux, UNIX or Windows servers.
Tripwire Enterprise: the flagship product of Tripwire, Inc., is for automated monitoring of mixed networks of up to thousands of servers, desktops, directory servers and network devices. Starting with version 5.2, Tripwire Enterprise includes centralized management through a Web interface, as well as customizable reporting and control.
The Open Source Tripwire Project had been quiescent for some time. Luckily, just a few days before the deadline of this article, version 2.4.0.1 was released on SourceForge, and it is the one you'll likely find packaged for your distribution by the time you read this. Besides the source tarball, it is also possible to download x86 static binaries built on a Gentoo 2005 distribution. There are no remarkable changes in functionality, so everything explained in this article should still apply as is. The other good news is that this is the first release in which the old build system has been replaced by a standard autoconf/configure environment. Unfortunately, due to some gcc 4 compatibility problems on Fedora Core 4, it wasn't possible to test this version in time. However, as soon as this porting is completed, it should be much easier to add new features and package Open Source Tripwire for all modern GNU/Linux distributions. You're welcome to join the effort and report bugs on the developers mailing list (see Resources). Thanks to Paul Herman and Ron Forrester for releasing this new version and the time they spent to answer my questions.
Resources for this article: /article/8950.
Marco Fioretti is a hardware systems engineer interested in free software both as an EDA platform and, as the current leader of the RULE Project, as an efficient desktop. Marco lives with his family in Rome, Italy.
Articles about Digital Rights and more at http://stop.zona-m.net CV, talks and bio at http://mfioretti.com
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
- RSS Feeds
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- Dynamic DNS—an Object Lesson in Problem Solving
- New Products
- Validate an E-Mail Address with PHP, the Right Way
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Download the Free Red Hat White Paper "Using an Open Source Framework to Catch the Bad Guy"
- Tech Tip: Really Simple HTTP Server with Python
- myip
47 min 21 sec ago - Keeping track of IP address
2 hours 38 min ago - Roll your own dynamic dns
7 hours 51 min ago - Please correct the URL for Salt Stack's web site
11 hours 3 min ago - Android is Linux -- why no better inter-operation
13 hours 18 min ago - Connecting Android device to desktop Linux via USB
13 hours 47 min ago - Find new cell phone and tablet pc
14 hours 45 min ago - Epistle
16 hours 13 min ago - Automatically updating Guest Additions
17 hours 22 min ago - I like your topic on android
18 hours 9 min ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




Comments
Worked perfect
Article seems old (2006), It worked exactly as it described. Great article. I am using tripwire now without any problem. Thanks a lot Mr. author.
--
anil
(anil.softx@gmail.com)
Tripwire Missing tw.cfg
I have followed you instructions but get:
tripwire --check
### Error: File could not be opened.
### Filename: /etc/tripwire/tw.cfg
### No such file or directory
### Configuration file could not be read.
### Exiting..
Can you please help
Try running the command as
Try running the command as superuser, such as "sudo tripwire --check".
Typo?
Great Article! :)
tripwire --init --cfgfile twcfg.enc --polfile tw.pol
↪--site-keyfile my_home_key --local-keyfile my_local_key
should be...
tripwire --init --cfgfile twcfg.enc --polfile twpol.enc
↪--site-keyfile my_home_key --local-keyfile my_local_key
tw.pol missing.
Under Database Creation:
You have the commnad argument:
--polfile tw.pol
I got the error:
### Error: File could not be found.
### tw.pol
### Exiting...
I checked the directory it was never created. At what step does it get created in this process?
nice tutorial. my tripwire
nice tutorial. my tripwire rpm also did not have the /etc/tripwire/twinstall.sh script. i used tripwire-2.3.1-21
'tripwire --check ' was not good enough
### Error: File could not be opened.
### Filename: /etc/tripwire/tw.cfg
### No such file or directory
### Configuration file could not be read.
### Exiting...
i needed to explicitly list it as an arg to tripwire
Stuck on the encrypting steps...
I'm using Tripwire 2.4.0.1 on RHEL 4 and I am having problems at the encryption step. I don't have the twcfg.enc file needed to encrypt the config and policy files. Any ideas?
Read those steps again. You
Read those steps again. You don't have it initially. You create twcfg.enc.
twinstall.sh
If you look through the docs it mentions twinstall.sh has been replaced by tripwire-setup-keyfiles.
It should also be noted that the prelinker will affect the md5 sums etc when it runs.
Rob