Résolu le 15-02-23 Rootkit hunter et chkrootkit

Postez ici toutes vos demandes d’assistance.
Linuxingbis
Messages : 194
Enregistré le : lun. 21 mars 2022 22:57
Localisation : Belgique

Rootkit hunter et chkrootkit

Message par Linuxingbis »

Bonjour,

J'ai fait exécuter un scan avec les 2 programmes détecteurs de rootkits mentionnés dans le titre du sujet :)
Les commandes ont notamment relevé ceci, j'ai laissé tombé le reste qui est OK :

Code : Tout sélectionner

Avec Rootkit hunter

/usr/bin/lwp-request                                     [ Warning ]
Checking for hidden files and directories                [ Warning ]

Avec Chkrootkit

Searching for suspicious files and dirs, it may take a while... The following suspicious files and directories were found:
/usr/lib/python3/dist-packages/tldextract/.tld_set_snapshot
/usr/lib/ruby/vendor_ruby/rubygems/optparse/.document
/usr/lib/ruby/vendor_ruby/rubygems/tsort/.document
/usr/lib/ruby/vendor_ruby/rubygems/ssl_certs/.document
/usr/lib/ruby/gems/3.0.0/gems/minitest-5.14.2/.autotest
/usr/lib/ruby/gems/3.0.0/gems/power_assert-1.2.0/.travis.yml
/usr/lib/ruby/gems/3.0.0/gems/rbs-1.0.4/.rubocop.yml
/usr/lib/jvm/.java-1.11.0-openjdk-amd64.jinfo
/usr/lib/debug/.build-id
/usr/lib/debug/.dwz
/usr/lib/libreoffice/share/.registry
/usr/lib/modules/5.15.0-58-generic/vdso/.build-id
/usr/lib/modules/5.15.0-57-generic/vdso/.build-id

Searching for Linux.Xor.DDoS ...                            INFECTED: Possible Malicious Linux.Xor.DDoS installed
/tmp/.veracrypt_aux_mnt1/volume
/tmp/.veracrypt_aux_mnt1/control

Et avec la commande suivante :

linuxing@linuxing-TUXEDO-Polaris-17-Intel-Gen1:~$ sudo rkhunter -c --rwo
Warning: The command '/usr/bin/lwp-request' has been replaced by a script: /usr/bin/lwp-request: Perl script text executable
Warning: The following suspicious (large) shared memory segments have been found:
         Process: /usr/lib/mate-panel/wnck-applet    PID: 1692    Owner: linuxing    Size: 1,0MB (configured size allowed: 1,0MB)
         Process: /usr/bin/mate-panel    PID: 1641    Owner: linuxing    Size: 4,0MB (configured size allowed: 1,0MB)
         Process: /usr/bin/mate-terminal    PID: 22507    Owner: linuxing    Size: 16MB (configured size allowed: 1,0MB)
         Process: /usr/bin/xed    PID: 150959    Owner: linuxing    Size: 16MB (configured size allowed: 1,0MB)
         Process: /usr/bin/caja    PID: 1683    Owner: linuxing    Size: 4,0MB (configured size allowed: 1,0MB)
         Process: /usr/bin/caja    PID: 1683    Owner: linuxing    Size: 64MB (configured size allowed: 1,0MB)
         Process: /usr/bin/veracrypt    PID: 3109    Owner: linuxing    Size: 4,0MB (configured size allowed: 1,0MB)
Warning: Hidden directory found: /etc/.java
linuxing@linuxing-TUXEDO-Polaris-17-Intel-Gen1:~$ 
VeraCrypt est mon programme de chiffrement pour Linux et je pense qu'il peut être ignoré, considéré comme faux positif 8-)
Pour les autres repérés en tant que «Owner : Linuxing», je pense que c'est bon également 8-)

Mais pour le reste ? Merci

En ce qui concerne la MAJ du logiciel, je pense avoir loupé un truc lors de la configuration à l'installation :

Code : Tout sélectionner

linuxing@linuxing-TUXEDO-Polaris-17-Intel-Gen1:~$ sudo rkhunter --update
[sudo] Mot de passe de linuxing :        
Invalid WEB_CMD configuration option: Relative pathname: "/bin/false"
linuxing@linuxing-TUXEDO-Polaris-17-Intel-Gen1:~$
Merci
Laptop depuis le 16 juillet 2021 : Tuxedo Polaris 17 - Processeur Intel® Core I7 - 10750H / NVIDIA GeForce RTX 1650Ti / Full-HD IPS mat 144Hz / DDR4 SO-DIMM : 16 GB (1x 16GB) 3200Mhz CL22 Samsung / SSD: 1000 GB Samsung 860 EVO (M.2 SATAIII) / WLAN & Bluetooth: Intel Wi-Fi 6 AX200 & Bluetooth 5.1 (up to 2400Mbps). OS : Linux Mint 21 (Vanessa) Mate depuis ce 1 novembre 2022

Avatar du membre
cyrille
Administrateur du site
Messages : 13037
Enregistré le : mar. 19 sept. 2017 08:49
Localisation : Nowhere
Contact :

Re: Rootkit hunter et chkrootkit

Message par cyrille »

yep

Essaie d'éditer en root ce fichier

Code : Tout sélectionner

/etc/rkhunter.conf
Et de remplacer l'entrée

Code : Tout sélectionner

WEB_CMD="/bin/false" 
par

Code : Tout sélectionner

WEB_CMD=""

Ou d'après la doc par

Code : Tout sélectionner

WEB_CMD=curl 
?séuqartéd sel ruoP / sécnoféd sel ruoP / sreiruréB sel ruoP / ?étéicos elleuQ

https://crust.ovh

Linuxingbis
Messages : 194
Enregistré le : lun. 21 mars 2022 22:57
Localisation : Belgique

Re: Rootkit hunter et chkrootkit

Message par Linuxingbis »

Salut cyrille ;)

Voici :

Code : Tout sélectionner

linuxing@linuxing-TUXEDO-Polaris-17-Intel-Gen1:~$ sudo /etc/rkhunter.conf
[sudo] Mot de passe de linuxing :        
sudo: /etc/rkhunter.conf : commande introuvable
linuxing@linuxing-TUXEDO-Polaris-17-Intel-Gen1:~$ 
A l'installation dans le Gestionnaire de Paquets, il me fut demandé de configurer sur «Web», «local»... mais j'ai laissé sur «pas de configuration», cette dernière option laissant tout par défaut, je crois :roll:
Laptop depuis le 16 juillet 2021 : Tuxedo Polaris 17 - Processeur Intel® Core I7 - 10750H / NVIDIA GeForce RTX 1650Ti / Full-HD IPS mat 144Hz / DDR4 SO-DIMM : 16 GB (1x 16GB) 3200Mhz CL22 Samsung / SSD: 1000 GB Samsung 860 EVO (M.2 SATAIII) / WLAN & Bluetooth: Intel Wi-Fi 6 AX200 & Bluetooth 5.1 (up to 2400Mbps). OS : Linux Mint 21 (Vanessa) Mate depuis ce 1 novembre 2022

Avatar du membre
cyrille
Administrateur du site
Messages : 13037
Enregistré le : mar. 19 sept. 2017 08:49
Localisation : Nowhere
Contact :

Re: Rootkit hunter et chkrootkit

Message par cyrille »

j'ai écrit EDITER pas EXECUTER
?séuqartéd sel ruoP / sécnoféd sel ruoP / sreiruréB sel ruoP / ?étéicos elleuQ

https://crust.ovh

Linuxingbis
Messages : 194
Enregistré le : lun. 21 mars 2022 22:57
Localisation : Belgique

Re: Rootkit hunter et chkrootkit

Message par Linuxingbis »

Voici :

Code : Tout sélectionner

linuxing@linuxing-TUXEDO-Polaris-17-Intel-Gen1:~$ /etc/rkhunter.conf
bash: /etc/rkhunter.conf: Permission non accordée
linuxing@linuxing-TUXEDO-Polaris-17-Intel-Gen1:~$ 
:oops:
Laptop depuis le 16 juillet 2021 : Tuxedo Polaris 17 - Processeur Intel® Core I7 - 10750H / NVIDIA GeForce RTX 1650Ti / Full-HD IPS mat 144Hz / DDR4 SO-DIMM : 16 GB (1x 16GB) 3200Mhz CL22 Samsung / SSD: 1000 GB Samsung 860 EVO (M.2 SATAIII) / WLAN & Bluetooth: Intel Wi-Fi 6 AX200 & Bluetooth 5.1 (up to 2400Mbps). OS : Linux Mint 21 (Vanessa) Mate depuis ce 1 novembre 2022

Avatar du membre
cyrille
Administrateur du site
Messages : 13037
Enregistré le : mar. 19 sept. 2017 08:49
Localisation : Nowhere
Contact :

Re: Rootkit hunter et chkrootkit

Message par cyrille »

ça fait un bail que tu traînes sur le forum, non ?

Code : Tout sélectionner

sudo nano /etc/rkhunter.conf
ctrl + O pour enreistrer, ctrl + x pour quitter


sinon plus simple le grand frère

Code : Tout sélectionner

sudo apt update
sudo apt install micro

Code : Tout sélectionner

sudo micro /etc/rkhunter.conf
Et là t'as les raccourcis clavier habituel pour sauvegarder / quitter
?séuqartéd sel ruoP / sécnoféd sel ruoP / sreiruréB sel ruoP / ?étéicos elleuQ

https://crust.ovh

Linuxingbis
Messages : 194
Enregistré le : lun. 21 mars 2022 22:57
Localisation : Belgique

Re: Rootkit hunter et chkrootkit

Message par Linuxingbis »

Voici :

Après avoir exécuté :

Code : Tout sélectionner

sudo apt update
sudo apt install micro
sudo micro /etc/rkhunter.conf
J'ai eu ceci :

Code : Tout sélectionner

  1 #                                                                          
   2 # This is the main configuration file for Rootkit Hunter.                  
   3 #                                                                          
   4 # You can modify this file directly, or you can create a local configuratio
   5 # file. The local file must be named 'rkhunter.conf.local', and must reside
   6 # in the same directory as this file. Alternatively you can create a direct
   7 # named 'rkhunter.d', which also must be in the same directory as this     
   8 # configuration file. Within the 'rkhunter.d' directory you can place furth
   9 # configuration files. There is no restriction on the file names used, othe
  10 # than they must end in '.conf'.                                           
  11 #                                                                          
  12 # Please modify the configuration file(s) to your own requirements. It is  
  13 # recommended that the command 'rkhunter -C' is run after any changes have 
  14 # been made.                                                               
  15 #                                                                          
  16 # Please review the documentation before posting bug reports or questions. 
  17 # To report bugs, provide patches or comments, please go to:               
  18 # http://rkhunter.sourceforge.net                                          
  19 #                                                                          
  20 # To ask questions about rkhunter, please use the 'rkhunter-users' mailing 
  21 # Note that this is a moderated list, so please subscribe before posting.  
  22 #                                                                          
/etc/rkhunter.conf (18,34) | ft:unknown | unix | utf-8Alt-g: bindings, Ctrl-g: h
                                                                                
Je n'ai jamais fait ce type d'opération et je suis toujours dépourvu pour la suite à donner :oops:
Laptop depuis le 16 juillet 2021 : Tuxedo Polaris 17 - Processeur Intel® Core I7 - 10750H / NVIDIA GeForce RTX 1650Ti / Full-HD IPS mat 144Hz / DDR4 SO-DIMM : 16 GB (1x 16GB) 3200Mhz CL22 Samsung / SSD: 1000 GB Samsung 860 EVO (M.2 SATAIII) / WLAN & Bluetooth: Intel Wi-Fi 6 AX200 & Bluetooth 5.1 (up to 2400Mbps). OS : Linux Mint 21 (Vanessa) Mate depuis ce 1 novembre 2022

Linuxingbis
Messages : 194
Enregistré le : lun. 21 mars 2022 22:57
Localisation : Belgique

Re: Rootkit hunter et chkrootkit

Message par Linuxingbis »

Salut :)

Ok, j'y suis arrivé, tout d'abord en retapant dans le Terminal :

Code : Tout sélectionner

sudo nano /etc/rkhunter.conf
En plus des infos fournies par cyrille, j'ai été voir une vidéo, ce qui m'a fortement aidé pour...piger ;) :lol:
Une fois le fichier de configuration édité dans le Terminal, j'ai fait les 3 opérations suivantes :

Là où il était mis :

Code : Tout sélectionner

UPDATE_MIRRORS=0
j'ai remplacé par :

Code : Tout sélectionner

UPDATE_MIRRORS=1
Là où il était mis :

Code : Tout sélectionner

MIRRORS_MODE=1
J'ai remplacé par :

Code : Tout sélectionner

MIRRORS_MODE=0
Et enfin le dernier truc fourni par cyrille et également repris dans la vidéo :

Là où il était mis :

Code : Tout sélectionner

WEB_CMD="/bin/false"
J'ai remplacé par :

Code : Tout sélectionner

WEB_CMD=""
Ensuite, j'ai fait «CTRL O», puis «ENTER» et ensuite «CTRL X»
Et la configuration fut modifiée avec succès, la preuve pour la vérification de version et la mise à jour :

Code : Tout sélectionner

linuxing@linuxing-TUXEDO-Polaris-17-Intel-Gen1:~$ sudo rkhunter --versioncheck
[ Rootkit Hunter version 1.4.6 ]

Checking rkhunter version...
  This version  : 1.4.6
  Latest version: 1.4.6
linuxing@linuxing-TUXEDO-Polaris-17-Intel-Gen1:~$ sudo rkhunter --update
[sudo] Mot de passe de linuxing :        
[ 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                                      [ Skipped ]
  Checking file i18n/de                                      [ Skipped ]
  Checking file i18n/en                                      [ No update ]
  Checking file i18n/tr                                      [ Skipped ]
  Checking file i18n/tr.utf8                                 [ Skipped ]
  Checking file i18n/zh                                      [ Skipped ]
  Checking file i18n/zh.utf8                                 [ Skipped ]
  Checking file i18n/ja                                      [ Skipped ]
linuxing@linuxing-TUXEDO-Polaris-17-Intel-Gen1:~$ 
En attendant d'éventuelles réactions, j'attends encore quelque temps avant de clôturer le sujet 8-)
Laptop depuis le 16 juillet 2021 : Tuxedo Polaris 17 - Processeur Intel® Core I7 - 10750H / NVIDIA GeForce RTX 1650Ti / Full-HD IPS mat 144Hz / DDR4 SO-DIMM : 16 GB (1x 16GB) 3200Mhz CL22 Samsung / SSD: 1000 GB Samsung 860 EVO (M.2 SATAIII) / WLAN & Bluetooth: Intel Wi-Fi 6 AX200 & Bluetooth 5.1 (up to 2400Mbps). OS : Linux Mint 21 (Vanessa) Mate depuis ce 1 novembre 2022

Linuxingbis
Messages : 194
Enregistré le : lun. 21 mars 2022 22:57
Localisation : Belgique

Re: Rootkit hunter et chkrootkit

Message par Linuxingbis »

Remerciant cyrille pour ses interventions, je clôture ce sujet qui est résolu ;)
Laptop depuis le 16 juillet 2021 : Tuxedo Polaris 17 - Processeur Intel® Core I7 - 10750H / NVIDIA GeForce RTX 1650Ti / Full-HD IPS mat 144Hz / DDR4 SO-DIMM : 16 GB (1x 16GB) 3200Mhz CL22 Samsung / SSD: 1000 GB Samsung 860 EVO (M.2 SATAIII) / WLAN & Bluetooth: Intel Wi-Fi 6 AX200 & Bluetooth 5.1 (up to 2400Mbps). OS : Linux Mint 21 (Vanessa) Mate depuis ce 1 novembre 2022

Avatar du membre
cyrille
Administrateur du site
Messages : 13037
Enregistré le : mar. 19 sept. 2017 08:49
Localisation : Nowhere
Contact :

Re: Rootkit hunter et chkrootkit

Message par cyrille »

Thx ;) Au plaisir ;)
?séuqartéd sel ruoP / sécnoféd sel ruoP / sreiruréB sel ruoP / ?étéicos elleuQ

https://crust.ovh

Répondre