Qu'est ce que ces fichiers qui squattent ma racine?

Bonsoir

J’ai un orangepi 3B autohébergé. Tourne sous yunohost à jour.

Aujourd’hui je vois plein de choses bizarre sur la racine

root@crust:~# ls /
arm    arm.4   arm5.3  arm6.2  arm7.1  bin   diskUSB  lost+found  m68k.3  mips.1  mnt	  mpsl.3  ppc.1  proc  selinux	sh4.3  spc.2  sys  x86	  x86.4     x86_64.3
arm.1  arm5    arm5.4  arm6.3  arm7.2  boot  etc      m68k	  m68k.4  mips.2  mpsl	  mpsl.4  ppc.2  root  sh4	sh4.4  spc.3  tmp  x86.1  x86_64    x86_64.4
arm.2  arm5.1  arm6    arm6.4  arm7.3  data  home     m68k.1	  media   mips.3  mpsl.1  opt	  ppc.3  run   sh4.1	spc    spc.4  usr  x86.2  x86_64.1
arm.3  arm5.2  arm6.1  arm7    arm7.4  dev   lib      m68k.2	  mips	  mips.4  mpsl.2  ppc	  ppc.4  sbin  sh4.2	spc.1  srv    var  x86.3  x86_64.2

Ils datent tous de

ls -l /
...
-rwxrwxrwx   1 root      root       44684 19 août  18:08 mpsl
-rw-rw-rw-   1 root      root       44684 19 août  18:08 mpsl.1
-rw-rw-rw-   1 root      root       44684 20 août  17:05 mpsl.2
-rw-rw-rw-   1 root      root       44684 20 août  17:05 mpsl.3
-rw-rw-rw-   1 root      root       44684 20 août  17:05 mpsl.4
drwxr-xr-x   4 root      root        4096 25 avril  2024 opt
-rwxrwxrwx   1 root      root       40268 19 août  18:08 ppc
-rw-rw-rw-   1 root      root       40268 19 août  18:08 ppc.1
-rw-rw-rw-   1 root      root       40268 20 août  17:05 ppc.2
-rw-rw-rw-   1 root      root       40268 20 août  17:05 ppc.3
-rw-rw-rw-   1 root      root       40268 20 août  17:05 ppc.4
...

Toutes ces entrées arm mps mips ppc… n’ont rien à faire là à mon avis :wink:

ça doit être suite à une mauvaise manipulation (enfin j’espère)

Puis-je les supprimer, pensez vous qu’il faut que je m’inquiète plus que cela ? Ou cela doit il t il être un soucis de PEBKAC :wink:

D’avance merci :wink:

file /arm* te dira peut-être des choses ?

ppc, arm mpsl font référence à des architectures. Les dates semblent indiquer des créations successives (ppc, puis ppc.1, puis ppc.2), les heures semblent idiquer que ppc.3, arm.3, mpsl.3 ont été crée en même temps par un programme dépendant de root.
Essaye de voir qui s’executait à ces moments. Le fait que ça soit à la racine indique juste qu’un repertoire n’existait pas et que
cd «repertoire convenable»
a laissé le programme continuer à la racine, signe que c’est un programme dont le repertoire de lancement est / (ou bien n’existe plus). Regarde les messages d’erreurs dans le syslog/journalctl

Alors merci :wink:

root@crust:~# file /arm*
/arm:    ELF 32-bit LSB executable, ARM, version 1 (ARM), statically linked, no section header
/arm.1:  ELF 32-bit LSB executable, ARM, version 1 (ARM), statically linked, no section header
/arm.2:  ELF 32-bit LSB executable, ARM, version 1 (ARM), statically linked, no section header
/arm.3:  ELF 32-bit LSB executable, ARM, version 1 (ARM), statically linked, no section header
/arm.4:  ELF 32-bit LSB executable, ARM, version 1 (ARM), statically linked, no section header
/arm5:   ELF 32-bit LSB executable, ARM, version 1 (ARM), statically linked, no section header
/arm5.1: ELF 32-bit LSB executable, ARM, version 1 (ARM), statically linked, no section header
/arm5.2: ELF 32-bit LSB executable, ARM, version 1 (ARM), statically linked, no section header
/arm5.3: ELF 32-bit LSB executable, ARM, version 1 (ARM), statically linked, no section header
/arm5.4: ELF 32-bit LSB executable, ARM, version 1 (ARM), statically linked, no section header
/arm6:   ELF 32-bit LSB executable, ARM, EABI4 version 1 (GNU/Linux), statically linked, no section header
/arm6.1: ELF 32-bit LSB executable, ARM, EABI4 version 1 (GNU/Linux), statically linked, no section header
/arm6.2: ELF 32-bit LSB executable, ARM, EABI4 version 1 (GNU/Linux), statically linked, no section header
/arm6.3: ELF 32-bit LSB executable, ARM, EABI4 version 1 (GNU/Linux), statically linked, no section header
/arm6.4: ELF 32-bit LSB executable, ARM, EABI4 version 1 (GNU/Linux), statically linked, no section header
/arm7:   ELF 32-bit LSB executable, ARM, EABI4 version 1 (GNU/Linux), statically linked, no section header
/arm7.1: ELF 32-bit LSB executable, ARM, EABI4 version 1 (GNU/Linux), statically linked, no section header
/arm7.2: ELF 32-bit LSB executable, ARM, EABI4 version 1 (GNU/Linux), statically linked, no section header
/arm7.3: ELF 32-bit LSB executable, ARM, EABI4 version 1 (GNU/Linux), statically linked, no section header
/arm7.4: ELF 32-bit LSB executable, ARM, EABI4 version 1 (GNU/Linux), statically linked, no section header
root@crust:~# journalctl --since "2025-08-18" --until "2025-08-21"
-- No entries --

Pas de bol :wink:

Et de même mon history ne remonte pas jusque là …

Ton architecture est en ARM 32 bits ?

root@crust:~# uname -a
Linux crust.ovh 5.10.160-rockchip-rk356x #1.0.6 SMP Wed Apr 24 19:05:05 CST 2024 aarch64 GNU/Linux
root@crust:~# arch 
aarch64

Donc arm 64 :wink:

Tu connais un site qui te permettrait de voir si c’est un exécutable vérolé ?

C’est à dire ?

Mise à part les mises à jour de yunohost, jamais rien fait sur ce serveur …

Un site où tu envoies ton fichier et qui te dit s’il voit des trucs, comme un antivirus à distance.

Ouvre-le avec ghex ou essaie de lancer strings /arm.1 | less pour voir ce qui en sort.

UPX!
!.[U
>2&f
}U=s
2cEJ0
*/VD
=h?6
~-.L
Ja7*W 
U$ W
`HQ,v
9rDC
3 .4<
Ewhc-
|r*p
o       6i
M.Tvix
i!fQ
14]l
}\Rv
zXFV5fE
quQ)
5-f&
8G7 
$=h"
W7!2
4~Hp
:.~d
){&d
8d6fjR
K^6e
?:h)K
@;nHer
(`%E
B;1Sx]N|
Azjy*
0fJW
Vv|F
MH;m
b<["I
R?sLG
JrTR5
L@\'
SgAE
LQ$t

pour ghex je n’ai pas de DE :wink:

cat /arm.1

...
            ����
                �+c�
                    V��"��2C�
P�!��1
      �1� �1�0�!`l l pW⊠�����␦P��,P��␦
0��0��0��,P��
             U�!�(���T��
                        0e� ��@��
                                 ��� R�XP��0�0����[�0�#02p��S�p�����␦X���
                                                                         [����:P�*	^�
�������\ ��0`���0��������0Ѝ����� ��
                                   ����������PROT_EXEC|PROT_WRITE failed.

$Info: This file is packed with the UPX executable packer http://upx.sf.net $
$Id: UPX 3.94 Copyright (C) 1996-2017 the UPX Team. All Rights Reserved. $
|	P␦lS,���%�:�L��>+;�rmJ�
�]�%b')��ݚ�5@����!�|�Z+�F<\�+Zz�*ka��v�t7�+��"��ݛ� Ǵ�?����R�C����~D<���1`����2��|d�w�����Ř*t~��T�������#ui�3����+~O��SF<��e���d]̍�c�42�����j�
ӛrs�^��x�1��g�ٕ�{�P��Y��f�N�����8EJ���E�%�.                                                                                                  �̉�,��7?���xF	
�2�m�֥鷶y��s}�]]�輣Ol�K��"ዊ��u%�!�����r��fg���,
                                              �Ǐ+	;W̿U+V!]޸�/S|1���@} ���%�%��,���E����JM�J��0����_~�)��
                                                                                                             ����.�j�j(8�[*v!q6LѺ��H���f���h��ck���t
                                                                                                                                                    N~)۟�o���|[%'�ow��T�=��]�.�ҧ�)xՒN�K��(%�Q�k$�~"��"{���Ga�x�I���t��*
                                              ŗ�PK
                                                  ��m�����h�,��>Q �p{؄�Mt�ڵf����K땎z�Uʼ�ӷ��l�X�
���Jv?R?�Lu:�	l�1T�-;Q5�l&�����{\,Q�P]��N�������l�ewO#��"(������DYTB$gsp8�Ws㡈٪Zʹ�k!s�;���i��(�␦b��)zI␦��w����a��7���+d��rR�e��'V��KW��tZ�Ht�
                                                                                                                                               ��7ɮ��@ 	�'�$���`�JɼQ�px*�C��
    �����(���L`�y�bUѢ�J��M'����ƘyԿ�<0����.M�̔�xA�Ѥ[>2g�'�p/�����������I���␦�tR��������$l��/ 4�C�쑞��jq
␦�������g�#j$�O�ؐ����~O2
                       J�,��K��b�~=.��}�B�T2�9�u`QMf��R�kA;C].�!mY�Eb�A����'���F����/��z-��j3�����`�?�]��a�����Q*37���RL�(=x�)+m]a$<���9ş�IO��7���
                                                                                                                                                  ��S␦-����&�<�)\ԇT0�%��A�Qc"
     �I�v��x��
�^��:C2~z�
          %��\x�l?�a��f�i���U'6�v�tv�;E�Y��?�P��^��L�.��ሡ4Nf�k�2
�7*���%a�d!4�?Usd�4�軍�x���� ù5��j�V���<�K+~(���#��ۢ�Z�[|�Z����`���y��}x�␦d���h��T�%��Վ=
~�      K�Q��ݢ>�7s�-Ȧ��}�961K                                                   �Ju��t�Q�
                             �\�T1�I�␦o������;:����␦
                                                    o��N�$����L2�@�����0��,��&���W!�]~��gw�i�w�
                                                                                               j5�ׯ��T�~�Fu����m.��Y�b�-

                                                                                                                        �=O���>��:g�e܏/�q'�2	��$�
                                                                                                                                                    ���I�1�MɊ���J��	�Nd"^�����WTT��xUPX!UPX!

Je ne sais pas d’où il sort, ça ne me dit rien …
https://upx.github.io/

Tu peux mettre un des executable arm par exemple que je regarde ce qu’il fait?

Oui bien sûr
un grand merci pour l’intérêt en tout cas
http://crust.ovh/site/arm.tar
Les voilà :wink:

C’est un petit programme qui dans lequel tu as essentiellement un routine qui alloue une zone mémoire et la rend executable et une autre qui décompresse un binaire (classiquement ce serait du LZMA) et le met dans la zone puis execute le binaire. Bizarre

C’est un binaire paquet avec UPX (un bête string l’indique, j’ai perdu du temps à le décompiler :-(), j’essaye de le dépacker

Bon, c’est un virus compressé avec UPX , j’ai vérifié avec virustotal, c’est un virus type botnet:

malware de type botnet IoT (variante Mirai / loader
Désolé de la mauvaise nouvelle. Ta machine est comproimise.

Cette IP 87.121.84.220 te dit-elle quelque chose?

image