How To Install checksec on Rocky Linux 8

In this tutorial we learn how to install checksec on Rocky Linux 8. checksec is Tool to check system for binary-hardening

Introduction

In this tutorial we learn how to install checksec on Rocky Linux 8.

What is checksec

Modern Linux distributions offer some mitigation techniques to make it harder to exploit software vulnerabilities reliably. Mitigations such as RELRO, NoExecute (NX), Stack Canaries, Address Space Layout Randomization (ASLR) and Position Independent Executables (PIE) have made reliably exploiting any vulnerabilities that do exist far more challenging. The checksec script is designed to test what standard Linux OS and PaX (http security features are being used. As of version 1.3 the script also lists the status of various Linux kernel protection mechanisms. checksec can check binary-files and running processes for hardening features.

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

Install checksec on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install checksec

Install checksec on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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

sudo yum -y install checksec

How To Uninstall checksec on Rocky Linux 8

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

sudo dnf remove checksec

checksec Package Contents on Rocky Linux 8

/usr/bin/checksec
/usr/share/doc/checksec
/usr/share/doc/checksec/ChangeLog
/usr/share/doc/checksec/README.md
/usr/share/licenses/checksec
/usr/share/licenses/checksec/LICENSE.txt
/usr/share/man/man1/checksec.1.gz

References

Summary

In this tutorial we learn how to install checksec on Rocky Linux 8 using yum and dnf.