Pick a Free OS

Intrusion Detection Systems, Part IV: Logcheck

If a man can write a better book,

preach a better sermon,

or make a better mouse trap than his neighbor,

though he builds his house in the woods,

the world would eventually make a beaten path to this door.

- Emerson

In the last three articles in this series, we looked at the concept of an Intrusion Detection System (IDS) and its implementation on your network. We discussed some of the top-notch tools like Tripwire and Snort, that you could use as your Swiss army knife in detecting intrusions into your network.

But position yourself in this scenario: you have a tough security framework in place scanning almost every packet that tries to get into your network, you even have some of the most sophisticated Intrusion Detection Systems implemented for your whole network. However, you erred on the permissions of your log files and never bother to monitor the logs until you have been hit very hard. Of course, the well known distributions, work in a way such that they have certain scripts running in cron, which from time to time, tars the logs and back them up, so file permissions aren?t anything you should worry about. You should also make sure that no one apart from root, has write access to the logs.

The first thing any intruder would do is to wipe out any tell tale signs of intrusions. This task would be of high priority to the cracker, so that there are no fingerprints to follow up on, or no other leads that would eventually lead to disclosing the origin of the attack. Therefore, a good system administrator will always implement a log file monitor. There are various tools out there, which will help you get this task done, among them being Logcheck and Swatch. In this article we take a look the working and implementation of Logcheck. The author of Logcheck is Craig H. Rowland. As with most of the other Open Source projects, this too is distributed under the GNU GPL license.

Logcheck is a software package that is designed to automatically run and check system log files for security violations and unusual activity. Logcheck uses a program called logtail that remembers the last position it read from in a log file and will use this position on subsequent runs to process new information. All source code is available for review and the implementation has been kept simple to avoid problems. This package is a clone of the frequentcheck.sh script from the Trusted Information Systems Gauntlet(tm) firewall package.