Home Linux ServerTools Install the Chkrootkit software on CentOS 7

Install the Chkrootkit software on CentOS 7

by Thạch Phạm

Install Chkrootkit software on CentOS 7 with 3 extremely simple steps.

What is Chkrokit?

Chkrootkit is a popular security scanner that helps administrators look for signs when a system is infected with a rootkit. You can use Chkrootkit to find files and rules associated with rootkits, but you cannot be 100% sure that all rootkits will be found and removed.

Install Chkrookit

You can install Chkrookit directly from the Repo repository, but in this article, AZDIGI will install it from the source to ensure that the installed version is the latest.

Step 1: SSH into your server

To upgrade the ProFTPD version on DirectAdmin, we first need to SSH or access your VPS/server with root privileges. If you don’t know how to SSH into your VPS/Server, you can refer to the following tutorial:

Step 2: Download and install Chkrookit

  • Install C/C++ compilers and libraries
AZDIGI Tutorial
yum update
yum install wget gcc-c++ glibc-static
    
  • Download latest chkrootkit
AZDIGI Tutorial
wget -c ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz
    
  • Download the md5 package
AZDIGI Tutorial
wget ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.md5
md5sum -c chkrootkit.md5
chkrootkit.tar.gz: OK
    
  • Decompression and install
AZDIGI Tutorial
tar -zxvf chkrootkit.tar.gz
mkdir /usr/local/chkrootkit
mv chkrootkit*/* /usr/local/chkrootkit
cd /usr/local/chkrootkit
make sense
    
  • Next, you can run chkrootkit to scan the server with the command below:
AZDIGI Tutorial
/usr/local/chkrootkit/chkrootkit
    

Step 3: Install automatic rootkit scanning on the system and report scanned information

You can add a cron entry to run chkrootkit automatically and send scan reports to your mailing address. Please create and add the following to/etc/cron.daily/chkrootkit-scan.sh.

AZDIGI Tutorial
vi /etc/cron.daily/chkrootkit-scan.sh
chmod 700 /etc/cron.daily/chkrootkit-scan.sh
    

And add the following content to the newly created file:

#!/bin/sh
(
/usr/local/chkrootkit/chkrootkit
) | /bin/mail -s 'CHROOTKIT Daily Run ServerName' your@email.com

So in this article, AZDIGI showed you how to install Chkrootkit on a complete CentOS 7 server. With Chkrootkit, you will have more options and security options for your data and your server. Hope this article will help you, wish you success!

You can refer to other instructions at the link below:

If you need assistance, you can contact support in the ways below:

Đánh giá

Bài viết cùng chuyên mục

AZDIGI – Không chỉ là đơn vị hàng đầu trong lĩnh vực Web Hosting và Máy chủ, chúng tôi mong muốn mang lại những kiến thức bổ ích nhất và luôn cập nhật thường xuyên cho cộng đồng người đam mê thiết kế website, công nghệ,…

Vui lòng không sao chép nội dung nếu chưa xin phép. Designed and Developed by PenciDesign