How To Install hardening-check on CentOS 7

In this tutorial we learn how to install hardening-check on CentOS 7. hardening-check is Tool to check ELF for being built hardened

Introduction

In this tutorial we learn how to install hardening-check on CentOS 7.

What is hardening-check

hardening-check is a tool to check whether an already compiled ELF file was built using hardening flags. It checks, using readelf, for these hardening characteristics * Position Independent Executable * Stack protected * Fortify source functions * Read-only relocations * Immediate binding

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

Install hardening-check on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install hardening-check using yum by running the following command:

sudo yum -y install hardening-check

Install hardening-check on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

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

sudo dnf -y install hardening-check

How To Uninstall hardening-check on CentOS 7

To uninstall only the hardening-check package we can use the following command:

sudo dnf remove hardening-check

References

Summary

In this tutorial we learn how to install hardening-check on CentOS 7 using yum and dnf.