Herramientas de usuario

Herramientas del sitio


es:stretch:security:rootkit_detection:rkhunter

7.2.1 Rootkit Hunter

Objetivo

Instalar el paquete rkhunter, un sistema de detección de rootkits que alerta por e-mail al administrador del sistema, en caso de que detecte alteraciones en el sistema que indiquen la presencia de un rootkit.

Instalación

root@server:~# apt-get install rkhunter

Configuración

La configuración predeterminada del paquete rkhunter suele ser suficiente. El archivo /etc/default/rkhunter define que las actualizaciones de la base de datos tengan una periodicidad semanal, la verificación de rootkits diaria y que los resultados sean enviados por e-mail al administrador del sistema (root).

Para esto, debe actualizarse la base de datos de propiedades de los archivos de rkhunter:

root@server:~# rkhunter --propupd
[ Rootkit Hunter version 1.4.0 ]
File updated: searched for 169 files, found 132

Utilización

rkhunter puede ser ejecutado desde la línea de comandos:

root@server:~# rkhunter --check
[ Rootkit Hunter version 1.4.0 ]
 
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/sbin/adduser                                        [ OK ]
    /usr/sbin/chroot                                         [ OK ]
    /usr/sbin/cron                                           [ OK ]
    /usr/sbin/groupadd                                       [ OK ]
    /usr/sbin/groupdel                                       [ OK ]
    /usr/sbin/groupmod                                       [ OK ]
    /usr/sbin/grpck                                          [ OK ]
    /usr/sbin/nologin                                        [ OK ]
    /usr/sbin/pwck                                           [ OK ]
    /usr/sbin/rsyslogd                                       [ OK ]
    /usr/sbin/tcpd                                           [ OK ]
    /usr/sbin/useradd                                        [ OK ]
    /usr/sbin/userdel                                        [ OK ]
    /usr/sbin/usermod                                        [ OK ]
    /usr/sbin/vipw                                           [ OK ]
 
# [...]
 
System checks summary
=====================
 
File properties checks...
    Files checked: 132
    Suspect files: 1
 
Rootkit checks...
    Rootkits checked : 303
    Possible rootkits: 0
 
Applications checks...
    All checks skipped
 
The system checks took: 1 minute and 9 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)

Actualización de la base de datos

La base de datos del rkhunter se actualiza cada semana de forma automática. Pero, es posible proceder a su actualización siempre que sea necesario:

root@server:~# rkhunter --update
[ Rootkit Hunter version 1.4.0 ]
 
Checking rkhunter data files...
  Checking file mirrors.dat                                  [ No update ]
  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/zh                                      [ No update ]
  Checking file i18n/zh.utf8                                 [ No update ]

Referencias

es/stretch/security/rootkit_detection/rkhunter.txt · Última modificación: 2024-02-15 01:05 por 127.0.0.1