GNU/Linux >> Linux の 問題 >  >> Linux

Linuxにルートキットハンターをインストールする方法

はじめに

rkhunter ルートキットハンター )は、オープンソースのUnix/Linuxベースのセキュリティ監視および分析ツールです。これは、ローカルシステムでさまざまなチェックを実行して、既知のルートキットとマルウェアを検出しようとするシェルスクリプトです。

rkhunter ルートキット、バックドア、およびローカルエクスプロイトの可能性をスキャンするUnixベースのツールです。これは、重要なファイルのSHA-1ハッシュを既知の良好なと比較することによって行われます。 オンラインデータベースにあるもの、(ルートキットの)デフォルトディレクトリの検索、間違った権限、隠しファイル、カーネルモジュール内の疑わしい文字列、およびLinuxとFreeBSDの特別なテスト。 rkhunterは、人気のあるOS(Fedora、Debianなど)に含まれているため注目に値します

このツールは、移植性を考慮してBourneシェルで記述されています。ほとんどすべてのUNIX派生システムで実行できます。

この記事は、インストールと構成に役立ちます。 rkhunter

以下の手順に従ってください:

Rkhunterをダウンロード

  • 以下のコマンドを実行してRkhunterをダウンロードします:
cd /mnt
wget https://netix.dl.sourceforge.net/project/rkhunter/rkhunter/1.4.6/rkhunter-1.4.6.tar.gz
[root@unixcop mnt]# wget https://netix.dl.sourceforge.net/project/rkhunter/rkhunter/1.4.6/rkhunter-1.4.6.tar.gz
--2021-10-03 10:36:20--  https://netix.dl.sourceforge.net/project/rkhunter/rkhunter/1.4.6/rkhunter-1.4.6.tar.gz
Resolving netix.dl.sourceforge.net (netix.dl.sourceforge.net)... 87.121.121.2
Connecting to netix.dl.sourceforge.net (netix.dl.sourceforge.net)|87.121.121.2|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 302137 (295K) [application/x-gzip]
Saving to: 'rkhunter-1.4.6.tar.gz'

rkhunter-1.4.6.tar.gz                 100%[=======================================================================>] 295.06K  90.0KB/s    in 3.3s    

2021-10-03 10:36:24 (90.0 KB/s) - 'rkhunter-1.4.6.tar.gz' saved [302137/302137]

[root@unixcop mnt]#

最新バージョンの場合下のボタンをクリックしてください

最新のRkH​​unter

Rkhunterをインストールする

  • RkHunter tarballを抽出し、次のようにインストールスクリプトを実行します。
tar -xvf rkhunter-1.4.6.tar.gz
cd rkhunter-1.4.6
./installer.sh --install
[root@unixcop rkhunter-1.4.6]# ./installer.sh --install

Checking system for:
 Rootkit Hunter installer files: found
 A web file download command: wget found
Starting installation:
 Checking installation directory "/usr/local": it exists and is writable.
 Checking installation directories:
  Directory /usr/local/share/doc/rkhunter-1.4.6: creating: OK
  Directory /usr/local/share/man/man8: exists and is writable.
  Directory /etc: exists and is writable.
  Directory /usr/local/bin: exists and is writable.
  Directory /usr/local/lib64: exists and is writable.
  Directory /var/lib: exists and is writable.
  Directory /usr/local/lib64/rkhunter/scripts: creating: OK
  Directory /var/lib/rkhunter/db: creating: OK
  Directory /var/lib/rkhunter/tmp: creating: OK
  Directory /var/lib/rkhunter/db/i18n: creating: OK
  Directory /var/lib/rkhunter/db/signatures: creating: OK
 Installing check_modules.pl: OK
 Installing filehashsha.pl: OK
 Installing stat.pl: OK
 Installing readlink.sh: OK
 Installing backdoorports.dat: OK
 Installing mirrors.dat: OK
 Installing programs_bad.dat: OK
 Installing suspscan.dat: OK
 Installing rkhunter.8: OK
 Installing ACKNOWLEDGMENTS: OK
 Installing CHANGELOG: OK
 Installing FAQ: OK
 Installing LICENSE: OK
 Installing README: OK
 Installing language support files: OK
 Installing ClamAV signatures: OK
 Installing rkhunter: OK
 Installing rkhunter.conf: OK
Installation complete
[root@unixcop rkhunter-1.4.6]#
  • ヘルプオプション付きのインストーラーは、次のコマンドで表示できます:
./installer.sh --help

メモ

  • インストール後、構成ファイル rkhunter.conf / etcに追加されます 。
  • rkhunter.conf.localを呼び出したこのファイル メインの構成ファイルと同じディレクトリに存在する必要があります。

Rkhunterを更新

  • rkhunterを更新するには、以下のコマンドを実行します。
rkhunter --update
  • 以下に示すように、ファイルプロパティデータベースに入力します。
rkhunter --propupd
[root@unixcop rkhunter-1.4.6]#  rkhunter --propupd
[ Rootkit Hunter version 1.4.6 ]
File created: searched for 176 files, found 132, missing hashes 1
[root@unixcop rkhunter-1.4.6]#

Rkhunterを実行する

  • ファイルシステムをスキャンする
rkhunter -c

このコマンドは、/var/log/rkhunter.logの下にログファイルを生成します

  • これらのログを確認するには、次のコマンドを実行します:
cat /var/log/rkhunter.log
  • grepコマンドを使用して警告のみを確認します:
grep Warning /var/log/rkhunter.log
  • RkHunterのマニュアルページを確認してください 。
man rkhunter

結論

ここでは、ルートキットハンター rkhunterをインストールする方法を説明しました。 Linuxで、 rkhunterについても説明しました 構成設定。

以上です、ありがとうございます!!


Linux
  1. LinuxにPythonをインストールする方法

  2. LinuxにFFmpegをインストールする方法

  3. LinuxにVagrantをインストールする方法

  1. LinuxにJavaをインストールする方法

  2. LinuxにNodeJSをインストールする方法

  3. LinuxにTeamViewer15をインストールする方法

  1. Linuxを3つのステップでインストールする方法

  2. KaliLinuxのインストール方法

  3. LinuxにPIPをインストールする方法