RkHunter en OSX

Rkhunter (o Rootkit Hunter) es una herramienta de Unix que detecta los rootkits, los backdoors y los exploit locales mediante la comparación de los hashes MD5 de ficheros importantes con su firma correcta en una base de datos en línea, buscando los directorios por defecto (de rootkits), los permisos incorrectos, los archivos ocultos, las cadenas sospechosas en los módulos del kernel, y las pruebas especiales para Linux, FreeBSD y OSX.

Esta es una herramienta que está disponible para un OSX y muy desconocida por muchos usuarios de OSX y de Unix en general.

Como Instalar RkHunter

Para instalar la herramienta, usaremos una herramienta en modo terminal que ya hemos hablado homebrew que nos permite instalar software libre que corre perfectamente en nuestro OSX, y procedemos a instalarlo.

$ brew update
$ brew upgrade
$ brew install rkhunter

Una vez que está instalado, debemos ejecutarlo con privilegios de administrador sobre nuestro terminal.

$ sudo rkhunter -c --sk

Logs de Salida

Esto realiza un chequeo general de nuestro sistema y nos entrega un reporte similar a esto:

[ Rootkit Hunter version 1.4.2 ]

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                        [ Skipped ]

Performing file properties checks
  Checking for prerequisites                               [ Warning ]
  /opt/local/bin/size                                      [ OK ]
  /opt/local/bin/strings                                   [ OK ]
  /usr/local/bin/rkhunter                                  [ OK ]
  /usr/local/bin/wget                                      [ OK ]
  /usr/bin/awk                                             [ OK ]
  /usr/bin/basename                                        [ OK ]
  /usr/bin/curl                                            [ OK ]
  /usr/bin/cut                                             [ OK ]
  /usr/bin/diff                                            [ OK ]
  /usr/bin/dirname                                         [ OK ]
  /usr/bin/du                                              [ OK ]
  /usr/bin/egrep                                           [ OK ]
  /usr/bin/env                                             [ OK ]
  /usr/bin/fgrep                                           [ OK ]
  /usr/bin/file                                            [ OK ]
  /usr/bin/find                                            [ OK ]
  /usr/bin/fuser                                           [ Warning ]
  /usr/bin/grep                                            [ OK ]
  /usr/bin/groups                                          [ OK ]
  /usr/bin/head                                            [ OK ]
  /usr/bin/id                                              [ OK ]
  /usr/bin/killall                                         [ OK ]
  /usr/bin/last                                            [ OK ]
  /usr/bin/less                                            [ OK ]
  /usr/bin/locate                                          [ OK ]
  /usr/bin/logger                                          [ OK ]
  /usr/bin/login                                           [ OK ]
  /usr/bin/mail                                            [ OK ]
  /usr/bin/mktemp                                          [ OK ]
  /usr/bin/more                                            [ OK ]
  /usr/bin/newgrp                                          [ OK ]
  /usr/bin/passwd                                          [ OK ]
  /usr/bin/perl                                            [ OK ]
  /usr/bin/pgrep                                           [ OK ]
  /usr/bin/pkill                                           [ OK ]
  /usr/bin/readlink                                        [ OK ]
  /usr/bin/sed                                             [ OK ]
  /usr/bin/size                                            [ OK ]
  /usr/bin/sort                                            [ OK ]
  /usr/bin/ssh                                             [ OK ]
  /usr/bin/stat                                            [ OK ]
  /usr/bin/strings                                         [ OK ]
  /usr/bin/su                                              [ OK ]
  /usr/bin/sudo                                            [ OK ]
  /usr/bin/tail                                            [ OK ]
  /usr/bin/telnet                                          [ OK ]
  /usr/bin/top                                             [ OK ]
  /usr/bin/touch                                           [ OK ]
  /usr/bin/tr                                              [ OK ]
  /usr/bin/uname                                           [ OK ]
  /usr/bin/uniq                                            [ OK ]
  /usr/bin/users                                           [ OK ]
  /usr/bin/w                                               [ OK ]
  /usr/bin/wc                                              [ OK ]
  /usr/bin/whatis                                          [ Warning ]
  /usr/bin/whereis                                         [ OK ]
  /usr/bin/which                                           [ OK ]
  /usr/bin/who                                             [ OK ]
  /usr/bin/whoami                                          [ OK ]
  /usr/bin/shasum                                          [ Warning ]
  /usr/bin/dscl                                            [ OK ]
  /bin/bash                                                [ OK ]
  /bin/cat                                                 [ OK ]
  /bin/chmod                                               [ OK ]
  /bin/cp                                                  [ OK ]
  /bin/csh                                                 [ OK ]
  /bin/date                                                [ OK ]
  /bin/df                                                  [ OK ]
  /bin/echo                                                [ OK ]
  /bin/ed                                                  [ OK ]
  /bin/kill                                                [ OK ]
  /bin/ls                                                  [ OK ]
  /bin/mv                                                  [ OK ]
  /bin/ps                                                  [ OK ]
  /bin/pwd                                                 [ OK ]
  /bin/sh                                                  [ OK ]
  /bin/test                                                [ OK ]
  /bin/launchctl                                           [ OK ]
  /usr/sbin/chown                                          [ OK ]
  /usr/sbin/chroot                                         [ OK ]
  /usr/sbin/cron                                           [ OK ]
  /usr/sbin/lsof                                           [ OK ]
  /usr/sbin/netstat                                        [ OK ]
  /usr/sbin/newsyslog                                      [ OK ]
  /usr/sbin/sshd                                           [ OK ]
  /usr/sbin/sysctl                                         [ OK ]
  /usr/sbin/syslogd                                        [ OK ]
  /usr/sbin/vipw                                           [ OK ]
  /sbin/dmesg                                              [ OK ]
  /sbin/fsck                                               [ OK ]
  /sbin/ifconfig                                           [ OK ]
  /sbin/md5                                                [ OK ]
  /sbin/mount                                              [ OK ]
  /sbin/nologin                                            [ OK ]
  /sbin/ping                                               [ OK ]
  /sbin/route                                              [ OK ]
  /usr/local/Cellar/rkhunter/1.4.2/bin/rkhunter            [ OK ]
  /usr/local/Cellar/wget/1.18/bin/wget                     [ OK ]
  /usr/local/Cellar/rkhunter/1.4.2/etc/rkhunter.conf       [ OK ]

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 ]
  Apache Worm                                              [ Not found ]
  Ambient (ark) Rootkit                                    [ Not found ]
  Balaur Rootkit                                           [ Not found ]
  BeastKit Rootkit                                         [ Not found ]
  beX2 Rootkit                                             [ Not found ]
  BOBKit Rootkit                                           [ Not found ]
  Boonana Trojan                                           [ Not found ]
  cb Rootkit                                               [ Not found ]
  CiNIK Worm (Slapper.B variant)                           [ Not found ]
  Danny-Boy's Abuse Kit                                    [ Not found ]
  Devil RootKit                                            [ Not found ]
  Dica-Kit Rootkit                                         [ Not found ]
  Dreams Rootkit                                           [ Not found ]
  Duarawkz Rootkit                                         [ Not found ]
  Enye LKM                                                 [ Not found ]
  Flea Linux Rootkit                                       [ Not found ]
  Fu Rootkit                                               [ Not found ]
  Fuck`it Rootkit                                          [ Not found ]
  GasKit Rootkit                                           [ Not found ]
  Heroin LKM                                               [ Not found ]
  HjC Kit                                                  [ Not found ]
  ignoKit Rootkit                                          [ Not found ]
  Inqtana Worm (Variant A)                                 [ Not found ]
  Inqtana Worm (Variant B)                                 [ Not found ]
  Inqtana Worm (Variant C)                                 [ Not found ]
  IntoXonia-NG Rootkit                                     [ Not found ]
  Irix Rootkit                                             [ Not found ]
  Jynx Rootkit                                             [ Not found ]
  KBeast Rootkit                                           [ Not found ]
  Kitko Rootkit                                            [ Not found ]
  Knark Rootkit                                            [ Not found ]
  ld-linuxv.so Rootkit                                     [ Not found ]
  Li0n Worm                                                [ Not found ]
  Lockit / LJK2 Rootkit                                    [ Not found ]
  Mood-NT Rootkit                                          [ Not found ]
  MRK Rootkit                                              [ Not found ]
  Ni0 Rootkit                                              [ Not found ]
  Ohhara Rootkit                                           [ Not found ]
  Optic Kit (Tux) Worm                                     [ Not found ]
  OS X Rootkit                                             [ Not found ]
  Oz Rootkit                                               [ Not found ]
  Phalanx Rootkit                                          [ Not found ]
  Phalanx2 Rootkit                                         [ Not found ]
  Portacelo Rootkit                                        [ Not found ]
  R3dstorm Toolkit                                         [ Not found ]
  RH-Sharpe's Rootkit                                      [ Not found ]
  RSHA's Rootkit                                           [ Not found ]
  Scalper Worm                                             [ Not found ]
  Sebek LKM                                                [ Not found ]
  Shutdown Rootkit                                         [ Not found ]
  SHV4 Rootkit                                             [ Not found ]
  SHV5 Rootkit                                             [ Not found ]
  Sin Rootkit                                              [ Not found ]
  Slapper Worm                                             [ Not found ]
  Sneakin Rootkit                                          [ Not found ]
  'Spanish' Rootkit                                        [ Not found ]
  Suckit Rootkit                                           [ Not found ]
  Superkit Rootkit                                         [ Not found ]
  TBD (Telnet BackDoor)                                    [ Not found ]
  TeLeKiT Rootkit                                          [ Not found ]
  Togroot Rootkit                                          [ Not found ]
  T0rn Rootkit                                             [ Not found ]
  trNkit Rootkit                                           [ Not found ]
  Trojanit Kit                                             [ Not found ]
  Tuxtendo Rootkit                                         [ Not found ]
  URK Rootkit                                              [ Not found ]
  Vampire Rootkit                                          [ Not found ]
  VcKit Rootkit                                            [ Not found ]
  Volc Rootkit                                             [ Not found ]
  weaponX Rootkit                                          [ Not found ]
  Xzibit Rootkit                                           [ Not found ]
  zaRwT.KiT Rootkit                                        [ Not found ]
  ZK Rootkit                                               [ Not found ]

Performing additional rootkit checks
  Checking for possible rootkit files and directories      [ None found ]
  Checking for possible rootkit strings                    [ Warning ]

Performing malware checks
  Checking running processes for suspicious files          [ None found ]
  Checking for login backdoors                             [ None found ]
  Checking for suspicious directories                      [ None found ]
  Checking for sniffer log files                           [ None found ]

Performing Darwin specific checks                          [ Skipped ]

Checking the network...

Performing checks on the network ports
  Checking for backdoor ports                              [ None found ]

Performing checks on the network interfaces
  Checking for promiscuous interfaces                      [ Warning ]

Checking the local host...

Performing system boot checks
  Checking for local host name                             [ Found ]
  Checking for system startup files                        [ Warning ]

Performing group and account checks
  Checking for passwd file                                 [ Found ]
  Checking for root equivalent (UID 0) accounts            [ None found ]
  Checking for passwordless accounts                       [ None found ]
  Checking for passwd file changes                         [ None found ]
  Checking for group file changes                          [ None found ]
  Checking root account shell history files                [ 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 ]

Performing filesystem checks
  Checking /dev for suspicious file types                  [ None found ]
  Checking for hidden files and directories                [ Warning ]

Checking application versions...

  Checking version of Apache                               [ OK ]
  Checking version of OpenSSL                              [ OK ]
  Checking version of PHP                                  [ OK ]
  Checking version of OpenSSH                              [ OK ]


System checks summary
=====================

File properties checks...
  Required commands check failed
  Files checked: 99
  Suspect files: 3

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

Applications checks...
  Applications checked: 4
  Suspect applications: 0

The system checks took: 1 minute and 52 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)
informatica/unix_osx/osx-rkhunter.txt · Última modificación: 2020/03/23 22:24 por 127.0.0.1
Recent changes RSS feed Creative Commons License Donate Minima Template by Wikidesign Driven by DokuWiki