How To Install yara on Fedora 34

yara is Pattern matching Swiss knife for malware researchers Pattern matching Swiss knife for malware researchers

Introduction

In this tutorial we learn how to install yara on Fedora 34.

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. yara 4.1.0 1.fc34 x86_64 199 k yara-4.1.0-1.fc34.src.rpm updates Pattern matching Swiss knife for malware researchers http ASL 2.0 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 Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install yara.

Install yara on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 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 Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 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 Fedora 34

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

sudo dnf remove yara

yara Package Contents on Fedora 34

/usr/bin/yara
/usr/bin/yarac
/usr/lib/.build-id
/usr/lib/.build-id/09
/usr/lib/.build-id/09/07ef6bcf87d0cce95e8236f158b4ef7228d5fc
/usr/lib/.build-id/59
/usr/lib/.build-id/59/390b30371f12add8be419329dac675f6476466
/usr/lib/.build-id/9f
/usr/lib/.build-id/9f/035be733b8014383d8db41426c366e0fbcc98b
/usr/lib/libyara.so.8
/usr/lib/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
/usr/bin/yara
/usr/bin/yarac
/usr/lib/.build-id
/usr/lib/.build-id/0d
/usr/lib/.build-id/0d/18f193fff5b3856ddcc65b41ba5d27c07480e5
/usr/lib/.build-id/16
/usr/lib/.build-id/16/a2723419c22c512891ae61be7b69ac013d1915
/usr/lib/.build-id/7f
/usr/lib/.build-id/7f/a6be2997df9f32e43ef160ff00df6cd67cd66b
/usr/lib/libyara.so.4
/usr/lib/libyara.so.4.0.5
/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
/usr/bin/yara
/usr/bin/yarac
/usr/lib/.build-id
/usr/lib/.build-id/29
/usr/lib/.build-id/29/dba84a628c5c84fdb9e2c74cb602a86678af6b
/usr/lib/.build-id/80
/usr/lib/.build-id/80/c6d3a4863925975fb80e433bc4979e7fbb6d0e
/usr/lib/.build-id/c8
/usr/lib/.build-id/c8/6095ee1ad5edbe8b0d8a2908a3d3cd62cdd12d
/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
/usr/bin/yara
/usr/bin/yarac
/usr/lib/.build-id
/usr/lib/.build-id/a4
/usr/lib/.build-id/a4/6865d4dc8c2fe9a9729ec2d069be46d20a4973
/usr/lib/.build-id/b4
/usr/lib/.build-id/b4/fc99e0e648d47547c9f9a32707f647da89229f
/usr/lib/.build-id/e0
/usr/lib/.build-id/e0/9ffb6b4e1d094954f4e583e998060543143464
/usr/lib64/libyara.so.4
/usr/lib64/libyara.so.4.0.5
/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 Fedora 34 using yum and dnf.