ലിനക്സിൽ റൂട്ട്കിറ്റ് ഹണ്ടർ ഉപയോഗിച്ച് റൂട്ട്കിറ്റുകൾ, ബാക്ക്ഡോറുകൾ, ചൂഷണങ്ങൾ എന്നിവ എങ്ങനെ സ്കാൻ ചെയ്യാം


സുഹൃത്തുക്കളേ, നിങ്ങൾ linux-console.net-ന്റെ സ്ഥിരം വായനക്കാരനാണെങ്കിൽ, സുരക്ഷാ ഉപകരണങ്ങളെക്കുറിച്ചുള്ള ഞങ്ങളുടെ മൂന്നാമത്തെ ലേഖനമാണിതെന്ന് നിങ്ങൾ ശ്രദ്ധിക്കും. ഞങ്ങളുടെ മുമ്പത്തെ രണ്ട് ലേഖനങ്ങളിൽ, എൽഎംഡി (ലിനക്സ് മാൽവെയർ ഡിറ്റക്റ്റ്) ഉപയോഗിച്ച് മാൽവെയർ, ഡോസ്, ഡിഡിഒഎസ് ആക്രമണങ്ങളിൽ നിന്ന് അപ്പാച്ചെ, ലിനക്സ് സിസ്റ്റങ്ങളെ എങ്ങനെ സുരക്ഷിതമാക്കാം എന്നതിനെക്കുറിച്ചുള്ള എല്ലാ മാർഗ്ഗനിർദ്ദേശങ്ങളും ഞങ്ങൾ നിങ്ങൾക്ക് നൽകിയിട്ടുണ്ട്.

Rkhunter (റൂട്ട്കിറ്റ് ഹണ്ടർ) എന്ന പേരിൽ ഒരു പുതിയ സുരക്ഷാ ഉപകരണം അവതരിപ്പിക്കാൻ ഞങ്ങൾ ഇവിടെയുണ്ട്. സോഴ്സ് കോഡ് ഉപയോഗിച്ച് ലിനക്സ് സിസ്റ്റങ്ങളിൽ RKH (റൂട്ട്കിറ്റ് ഹണ്ടർ) ഇൻസ്റ്റാൾ ചെയ്യാനും കോൺഫിഗർ ചെയ്യാനും ഈ ലേഖനം നിങ്ങളെ സഹായിക്കും.

എന്താണ് Rkhunter?

GPL-ന് കീഴിൽ പുറത്തിറക്കിയ Linux സിസ്റ്റങ്ങൾക്കായുള്ള ഒരു ഓപ്പൺ സോഴ്uസ് Unix/Linux അടിസ്ഥാനമാക്കിയുള്ള സ്കാനർ ടൂളാണ് Rkhunter (റൂട്ട്കിറ്റ് ഹണ്ടർ), അത് നിങ്ങളുടെ സിസ്റ്റങ്ങളിലെ ബാക്ക്uഡോറുകൾ, റൂട്ട്കിറ്റുകൾ, പ്രാദേശിക ചൂഷണങ്ങൾ എന്നിവ സ്കാൻ ചെയ്യുന്നു.

ഇത് മറഞ്ഞിരിക്കുന്ന ഫയലുകൾ, ബൈനറികളിൽ ക്രമീകരിച്ച തെറ്റായ അനുമതികൾ, കേർണലിലെ സംശയാസ്പദമായ സ്ട്രിംഗുകൾ മുതലായവ സ്കാൻ ചെയ്യുന്നു. Rkhunter-നെ കുറിച്ചും അതിന്റെ സവിശേഷതകളെ കുറിച്ചും കൂടുതൽ അറിയാൻ http://rkhunter.sourceforge.net/ സന്ദർശിക്കുക.

ലിനക്സ് സിസ്റ്റങ്ങളിൽ റൂട്ട്കിറ്റ് ഹണ്ടർ സ്കാനർ ഇൻസ്റ്റാൾ ചെയ്യുക

ആദ്യം, http://rkhunter.sourceforge.net/ എന്നതിലേക്ക് പോയി Rkhunter ടൂളിന്റെ ഏറ്റവും പുതിയ സ്ഥിരതയുള്ള പതിപ്പ് ഡൗൺലോഡ് ചെയ്യുക അല്ലെങ്കിൽ നിങ്ങളുടെ സിസ്റ്റങ്ങളിൽ ഇത് ഡൗൺലോഡ് ചെയ്യുന്നതിന് താഴെയുള്ള Wget കമാൻഡ് ഉപയോഗിക്കുക.

# cd /tmp
# wget http://downloads.sourceforge.net/project/rkhunter/rkhunter/1.4.6/rkhunter-1.4.6.tar.gz

നിങ്ങൾ ഏറ്റവും പുതിയ പതിപ്പ് ഡൗൺലോഡ് ചെയ്uതുകഴിഞ്ഞാൽ, അത് ഇൻസ്റ്റാൾ ചെയ്യുന്നതിന് ഒരു റൂട്ട് ഉപയോക്താവായി ഇനിപ്പറയുന്ന കമാൻഡുകൾ പ്രവർത്തിപ്പിക്കുക.

# tar -xvf rkhunter-1.4.6.tar.gz 
# cd rkhunter-1.4.6
# ./installer.sh --layout default --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.2: 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

ഇനിപ്പറയുന്ന കമാൻഡ് പ്രവർത്തിപ്പിച്ച് ഡാറ്റാബേസ് പ്രോപ്പർട്ടികൾ പൂരിപ്പിക്കുന്നതിന് RKH അപ്ഡേറ്റർ പ്രവർത്തിപ്പിക്കുക.

# /usr/local/bin/rkhunter --update
# /usr/local/bin/rkhunter --propupd
[ Rootkit Hunter version 1.4.6 ]

Checking rkhunter data files...
  Checking file mirrors.dat                                  [ Updated ]
  Checking file programs_bad.dat                             [ No update ]
  Checking file backdoorports.dat                            [ No update ]
  Checking file suspscan.dat                                 [ No update ]
  Checking file i18n/cn                                      [ No update ]
  Checking file i18n/de                                      [ No update ]
  Checking file i18n/en                                      [ No update ]
  Checking file i18n/tr                                      [ No update ]
  Checking file i18n/tr.utf8                                 [ No update ]
  Checking file i18n/zh                                      [ No update ]
  Checking file i18n/zh.utf8                                 [ No update ]
  Checking file i18n/ja                                      [ No update ]
File created: searched for 177 files, found 131, missing hashes 1

/etc/cron.daily/ എന്നതിന് കീഴിൽ rkhunter.sh എന്ന പേരിൽ ഒരു ഫയൽ സൃഷ്uടിക്കുക, അത് എല്ലാ ദിവസവും നിങ്ങളുടെ ഫയൽ സിസ്റ്റം സ്കാൻ ചെയ്യുകയും നിങ്ങളുടെ ഇമെയിൽ ഐഡിയിലേക്ക് ഇമെയിൽ അറിയിപ്പുകൾ അയയ്ക്കുകയും ചെയ്യുന്നു. നിങ്ങളുടെ പ്രിയപ്പെട്ട എഡിറ്ററുടെ സഹായത്തോടെ ഇനിപ്പറയുന്ന ഫയൽ സൃഷ്ടിക്കുക.

# vi /etc/cron.daily/rkhunter.sh

ഇതിലേക്ക് ഇനിപ്പറയുന്ന കോഡ് ലൈനുകൾ ചേർക്കുക, YourServerNameHere എന്നതിന് പകരം നിങ്ങളുടെ സെർവർ നാമം, [ഇമെയിൽ പരിരക്ഷിതം] എന്നിവയ്ക്ക് പകരം നിങ്ങളുടെ ഇമെയിൽ ഐഡി.

#!/bin/sh
(
/usr/local/bin/rkhunter --versioncheck
/usr/local/bin/rkhunter --update
/usr/local/bin/rkhunter --cronjob --report-warnings-only
) | /bin/mail -s 'rkhunter Daily Run (PutYourServerNameHere)' [email 

ഫയലിൽ എക്സിക്യൂട്ട് പെർമിഷൻ സജ്ജീകരിക്കുക.

# chmod 755 /etc/cron.daily/rkhunter.sh

മുഴുവൻ ഫയൽ സിസ്റ്റവും സ്കാൻ ചെയ്യുന്നതിന്, Rkhunter ഒരു റൂട്ട് ഉപയോക്താവായി പ്രവർത്തിപ്പിക്കുക.

# rkhunter --check
[ Rootkit Hunter version 1.4.6 ]

Checking system commands...

  Performing 'strings' command checks
    Checking 'strings' command                               [ OK ]

  Performing 'shared libraries' checks
    Checking for preloading variables                        [ None found ]
    Checking for preloaded libraries                         [ None found ]
    Checking LD_LIBRARY_PATH variable                        [ Not found ]

  Performing file properties checks
    Checking for prerequisites                               [ OK ]
    /usr/local/bin/rkhunter                                  [ OK ]
    /usr/sbin/adduser                                        [ OK ]
    /usr/sbin/chkconfig                                      [ OK ]
    /usr/sbin/chroot                                         [ OK ]
    /usr/sbin/depmod                                         [ OK ]
    /usr/sbin/fsck                                           [ OK ]
    /usr/sbin/fuser                                          [ OK ]
    /usr/sbin/groupadd                                       [ OK ]
    /usr/sbin/groupdel                                       [ OK ]
    /usr/sbin/groupmod                                       [ OK ]
    /usr/sbin/grpck                                          [ OK ]
    /usr/sbin/ifconfig                                       [ OK ]
    /usr/sbin/ifdown                                         [ Warning ]
    /usr/sbin/ifup                                           [ Warning ]
    /usr/sbin/init                                           [ OK ]
    /usr/sbin/insmod                                         [ OK ]
    /usr/sbin/ip                                             [ OK ]
    /usr/sbin/lsmod                                          [ OK ]
    /usr/sbin/lsof                                           [ OK ]
    /usr/sbin/modinfo                                        [ OK ]
    /usr/sbin/modprobe                                       [ OK ]
    /usr/sbin/nologin                                        [ OK ]
    /usr/sbin/pwck                                           [ OK ]
    /usr/sbin/rmmod                                          [ OK ]
    /usr/sbin/route                                          [ OK ]
    /usr/sbin/rsyslogd                                       [ OK ]
    /usr/sbin/runlevel                                       [ OK ]
    /usr/sbin/sestatus                                       [ OK ]
    /usr/sbin/sshd                                           [ OK ]
    /usr/sbin/sulogin                                        [ OK ]
    /usr/sbin/sysctl                                         [ OK ]
    /usr/sbin/tcpd                                           [ OK ]
    /usr/sbin/useradd                                        [ OK ]
    /usr/sbin/userdel                                        [ OK ]
    /usr/sbin/usermod                                        [ OK ]
....
[Press  to continue]


Checking for rootkits...

  Performing check of known rootkit files and directories
    55808 Trojan - Variant A                                 [ Not found ]
    ADM Worm                                                 [ Not found ]
    AjaKit Rootkit                                           [ Not found ]
    Adore Rootkit                                            [ Not found ]
    aPa Kit                                                  [ Not found ]
.....

[Press  to continue]


  Performing additional rootkit checks
    Suckit Rookit additional checks                          [ OK ]
    Checking for possible rootkit files and directories      [ None found ]
    Checking for possible rootkit strings                    [ None found ]

....
[Press  to continue]


Checking the network...

  Performing checks on the network ports
    Checking for backdoor ports                              [ None found ]
....
  Performing system configuration file checks
    Checking for an SSH configuration file                   [ Found ]
    Checking if SSH root access is allowed                   [ Warning ]
    Checking if SSH protocol v1 is allowed                   [ Warning ]
    Checking for a running system logging daemon             [ Found ]
    Checking for a system logging configuration file         [ Found ]
    Checking if syslog remote logging is allowed             [ Not allowed ]
...
System checks summary
=====================

File properties checks...
    Files checked: 137
    Suspect files: 6

Rootkit checks...
    Rootkits checked : 383
    Possible rootkits: 0

Applications checks...
    Applications checked: 5
    Suspect applications: 2

The system checks took: 5 minutes and 38 seconds

All results have been written to the log file: /var/log/rkhunter.log

One or more warnings have been found while checking the system.
Please check the log file (/var/log/rkhunter.log)

Rkhunter നടത്തിയ പരിശോധനാ ഫലങ്ങൾക്കൊപ്പം /var/log/rkhunter.log-ന് കീഴിൽ മുകളിലുള്ള കമാൻഡ് ഒരു ലോഗ് ഫയൽ സൃഷ്ടിക്കുന്നു.

# cat /var/log/rkhunter.log
[11:21:04] Running Rootkit Hunter version 1.4.6 on tecmint
[11:21:04]
[11:21:04] Info: Start date is Mon Dec 21 11:21:04 AM IST 2020
[11:21:04]
[11:21:04] Checking configuration file and command-line options...
[11:21:04] Info: Detected operating system is 'Linux'
[11:21:04] Info: Found O/S name: Fedora release 33 (Thirty Three)
[11:21:04] Info: Command line is /usr/local/bin/rkhunter --check
[11:21:04] Info: Environment shell is /bin/bash; rkhunter is using bash
[11:21:04] Info: Using configuration file '/etc/rkhunter.conf'
[11:21:04] Info: Installation directory is '/usr/local'
[11:21:04] Info: Using language 'en'
[11:21:04] Info: Using '/var/lib/rkhunter/db' as the database directory
[11:21:04] Info: Using '/usr/local/lib64/rkhunter/scripts' as the support script directory
[11:21:04] Info: Using '/usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /bin /sbin /usr/libexec /usr/local/libexec' as the command directories
[11:21:04] Info: Using '/var/lib/rkhunter/tmp' as the temporary directory
[11:21:04] Info: No mail-on-warning address configured
[11:21:04] Info: X will be automatically detected
[11:21:04] Info: Found the 'basename' command: /usr/bin/basename
[11:21:04] Info: Found the 'diff' command: /usr/bin/diff
[11:21:04] Info: Found the 'dirname' command: /usr/bin/dirname
[11:21:04] Info: Found the 'file' command: /usr/bin/file
[11:21:04] Info: Found the 'find' command: /usr/bin/find
[11:21:04] Info: Found the 'ifconfig' command: /usr/sbin/ifconfig
[11:21:04] Info: Found the 'ip' command: /usr/sbin/ip
[11:21:04] Info: Found the 'ipcs' command: /usr/bin/ipcs
[11:21:04] Info: Found the 'ldd' command: /usr/bin/ldd
[11:21:04] Info: Found the 'lsattr' command: /usr/bin/lsattr
...

കൂടുതൽ വിവരങ്ങൾക്കും ഓപ്ഷനുകൾക്കും ദയവായി ഇനിപ്പറയുന്ന കമാൻഡ് പ്രവർത്തിപ്പിക്കുക.

# rkhunter --help

നിങ്ങൾക്ക് ഈ ലേഖനം ഇഷ്ടപ്പെട്ടെങ്കിൽ, നന്ദി പറയാനുള്ള ശരിയായ മാർഗം പങ്കിടലാണ്.