How To Install tripwire on CentOS 8

tripwire is IDS (Intrusion Detection System)

Introduction

In this tutorial we learn how to install tripwire on CentOS 8.

What is tripwire

Tripwire is a very valuable security tool for Linux systems, if it is installed to a clean system. Tripwire should be installed right after the OS installation, and before you have connected your system to a network (i.e., before any possibility exists that someone could alter files on your system). When Tripwire is initially set up, it creates a database that records certain file information. Then when it is run, it compares a designated set of files and directories to the information stored in the database. Added or deleted files are flagged and reported, as are any files that have changed from their previously recorded state in the database. When Tripwire is run against system files on a regular basis, any file changes will be spotted when Tripwire is run. Tripwire will report the changes, which will give system administrators a clue that they need to enact damage control measures immediately if certain files have been altered.

We can use yum or dnf to install tripwire on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install tripwire.

Install tripwire on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install tripwire using dnf by running the following command:

sudo dnf -y install tripwire

Install tripwire on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install tripwire using yum by running the following command:

sudo yum -y install tripwire

How To Uninstall tripwire on CentOS 8

To uninstall only the tripwire package we can use the following command:

sudo dnf remove tripwire

tripwire Package Contents on CentOS 8

/etc/cron.daily/tripwire-check
/etc/tripwire
/etc/tripwire/twcfg.txt
/etc/tripwire/twpol.txt
/usr/lib/.build-id
/usr/lib/.build-id/0b
/usr/lib/.build-id/0b/0d99d3bc8569dfced661a464b7e2a6d54ac769
/usr/lib/.build-id/6c
/usr/lib/.build-id/6c/a85c61cd0b02cbbee8c2519985d9bc8e26def7
/usr/lib/.build-id/f2
/usr/lib/.build-id/f2/0d1bb2290ba06292832791dcb95f9f9a7f096f
/usr/lib/.build-id/f8
/usr/lib/.build-id/f8/2a296060a48e068d65d87f612b239402b8e8c8
/usr/sbin/siggen
/usr/sbin/tripwire
/usr/sbin/tripwire-setup-keyfiles
/usr/sbin/twadmin
/usr/sbin/twprint
/usr/share/doc/tripwire
/usr/share/doc/tripwire/COMMERCIAL
/usr/share/doc/tripwire/COPYING
/usr/share/doc/tripwire/ChangeLog
/usr/share/doc/tripwire/License-Issues
/usr/share/doc/tripwire/README.Fedora
/usr/share/doc/tripwire/TRADEMARK
/usr/share/doc/tripwire/policyguide.txt
/usr/share/doc/tripwire/tripwire.gif
/usr/share/man/man4/twconfig.4.gz
/usr/share/man/man4/twpolicy.4.gz
/usr/share/man/man5/twfiles.5.gz
/usr/share/man/man8/siggen.8.gz
/usr/share/man/man8/tripwire.8.gz
/usr/share/man/man8/twadmin.8.gz
/usr/share/man/man8/twintro.8.gz
/usr/share/man/man8/twprint.8.gz
/var/lib/tripwire
/var/lib/tripwire/report

References

Summary

In this tutorial we learn how to install tripwire on CentOS 8 using yum and dnf.