How To Install yara on CentOS 8
Introduction
In this tutorial we learn how to install yara on CentOS 8.
What is yara
YARA is a tool aimed at (but not limited to) helping malware researchers to identify and classify malware samples. With YARA you can create descriptions of malware families (or whatever you want to describe) based on textual or binary patterns. Each description, a.k.a rule, consists of a set of strings and a Boolean expression which determine its logic.
We can use yum or dnf to install yara on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install yara.
Install yara 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 yara using dnf by running the following command:
sudo dnf -y install yara
Install yara 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 yara using yum by running the following command:
sudo yum -y install yara
How To Uninstall yara on CentOS 8
To uninstall only the yara package we can use the following command:
sudo dnf remove yara
yara Package Contents on CentOS 8
/usr/bin/yara
/usr/bin/yarac
/usr/lib/.build-id
/usr/lib/.build-id/a9
/usr/lib/.build-id/a9/3eca260fabed5f3fd1c29ae6cbb386455591c7
/usr/lib/.build-id/ac
/usr/lib/.build-id/ac/6fc559ad30980eadcb0fbf1a4942d7010a98a1
/usr/lib/.build-id/fe
/usr/lib/.build-id/fe/3eb6032c800d446b1ddc6266562d0a35ad9927
/usr/lib64/libyara.so.8
/usr/lib64/libyara.so.8.0.0
/usr/share/doc/yara
/usr/share/doc/yara/AUTHORS
/usr/share/doc/yara/CONTRIBUTORS
/usr/share/doc/yara/README.md
/usr/share/licenses/yara
/usr/share/licenses/yara/COPYING
/usr/share/man/man1/yara.1.gz
/usr/share/man/man1/yarac.1.gz
References
Summary
In this tutorial we learn how to install yara on CentOS 8 using yum and dnf.