Léa-Linux & amis :   LinuxFR   GCU-Squad   GNU
Server Hack
Envoyé par: mbrossard

Salut a vous !

J'ai un serveur dedie, sur lequel tournent quelques trucs :
Apache et php, mysql, ftp, ssh, rtorrent et c'est a peu pres tout.

Il n'y a rien d'important dessus, aucun site en production, c'est juste un serveur de stockage et de developpement.

Hier je me suis fait hacke, impossible d'acceder en SSH ou FTP.
Il ne reste que Webmin qui est accessible et apache.

Depuis Webmin, j'ai pu voir qu'il y avait bien trop de processus actif.
Pleins d'occurences de CRON (alors que je n'utilise pas de taches cron personelles), de connections FTP et SSH.

Avant ca, j'avais deja remarque que des gens essayaient pleins de combinaisons pour se connecter en SSH, toujours sans success.

Est ce que ce genre de problemes vous dit quelque chose.
Quelqu'un sait comment je peux reprendre la main ? (j'ai deja essaye le reboot sans success)

Merci.
Papy.

Poste le Monday 5 November 2007 10:32:37
Répondre     Citer    
Re: Server Hack
Envoyé par: vieuxgnou

Hello,

Tu n'as pas accès physiquement à ta machine ?

Poste le Monday 5 November 2007 11:44:01
Répondre     Citer    
Re: Server Hack
Envoyé par: oudoubah

Ce n'est pas certain que tu te soies fait hacké. A moins que tu en aies vraiment les preuves (des fichiers de vidéo présents, des scripts style powershell.php,...), cela peut tout simpement être un bug.

Si tu n'arrives pas à accéder en ssh, le timeout peut peut être venir d'une surcharge des connexions réseau. Pour commencer, via webmin tu peux arrêter rtorrent, qui peut consommer beaucoup de ressources, et vérifier que sshd tourne.

Tu as lu les docs. Tu es devenu un informaticien. Que tu le veuilles
ou non. Lire la doc, c'est le Premier et Unique Commandement de
l'informaticien.
-+- TP in: Guide du Linuxien pervers - "L'évangile selon St Thomas"

Poste le Monday 5 November 2007 11:46:19
Répondre     Citer    
Re: Server Hack
Envoyé par: mbrossard

Merci pour votre aide :-)
Mon serveur est dans un datacenter, je n'y ai pas access.

Sinon, j'ai arrete rtorrent et ssh tourne bien.

J'ai l'impression que des qu'un tache se cree, elle ne se termine jamais, un peu comme si tous mes processus passaient par nohup (je sais pas si l'exemple est bon, mais j'ai fait joujou avec ca recemment, c'est peut etre lie).
Parce que la par exemple,je viens d'essayer de me connecter en FTP, les processus sont toujours actifs alors que j'ai ferme mon client depuis un moment ...

Je vous met la liste des processus, au cas ou ca pourrait aider :

Process ID Owner CPU Command
3105 root 0.7 % /usr/share/webmin/proc/index_cpu.cgi
1 root 0.0 % init [2]
2 root 0.0 % [keventd]
3 root 0.0 % [ksoftirqd_CPU0]
4 root 0.0 % [kswapd]
5 root 0.0 % [bdflush]
6 root 0.0 % [kupdated]
99 root 0.0 % [kjournald]
262 root 0.0 % [kcopyd]
264 root 0.0 % [kmirrord]
286 root 0.0 % [kjournald]
287 root 0.0 % [kjournald]
446 root 0.0 % [khubd]
1217 root 0.0 % /sbin/syslog-ng -p /var/run/syslog-ng.pid
1235 root 0.0 % /usr/sbin/named
1287 Debian-exim 0.0 % /usr/sbin/exim4 -bd -q30m
1293 root 0.0 % /usr/sbin/inetd
1324 root 0.0 % /bin/sh /usr/bin/mysqld_safe
1361 mysql 0.0 % /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file ...
1362 root 0.0 % logger -p daemon.err -t mysqld_safe -i -t mysqld
1363 mysql 0.0 % /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file ...
1364 mysql 0.0 % /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file ...
1365 mysql 0.0 % /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file ...
1366 mysql 0.0 % /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file ...
1367 mysql 0.0 % /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file ...
1369 mysql 0.0 % /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file ...
1370 mysql 0.0 % /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file ...
1371 mysql 0.0 % /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file ...
1372 mysql 0.0 % /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file ...
1375 mysql 0.0 % /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file ...
1411 root 0.0 % /usr/sbin/sshd
1462 proftpd 0.0 % proftpd: (accepting connections)
1473 daemon 0.0 % /usr/sbin/atd
1476 root 0.0 % /usr/sbin/cron
1487 root 0.0 % /usr/sbin/apache2 -k start
1506 www-data 0.0 % /usr/sbin/apache2 -k start
1507 www-data 0.0 % /usr/sbin/apache2 -k start
1508 www-data 0.0 % /usr/sbin/apache2 -k start
1511 www-data 0.0 % /usr/sbin/apache2 -k start
1512 root 0.0 % /usr/bin/perl /usr/share/webmin/miniserv.pl /etc/webmin/miniserv.conf
1519 root 0.0 % /sbin/getty 38400 tty1
1520 root 0.0 % /sbin/getty 38400 tty2
1521 root 0.0 % /sbin/getty 38400 tty3
1522 root 0.0 % /sbin/getty 38400 tty4
1523 root 0.0 % /sbin/getty 38400 tty5
1524 root 0.0 % /sbin/getty 38400 tty6
1525 www-data 0.0 % /usr/sbin/apache2 -k start
2645 root 0.0 % /usr/sbin/sshd -R
2654 root 0.0 % /USR/SBIN/CRON
2655 root 0.0 % /USR/SBIN/CRON
2657 root 0.0 % /USR/SBIN/CRON
2658 root 0.0 % /USR/SBIN/CRON
2659 root 0.0 % /USR/SBIN/CRON
2661 root 0.0 % /USR/SBIN/CRON
2662 root 0.0 % /USR/SBIN/CRON
2663 root 0.0 % /USR/SBIN/CRON
2665 root 0.0 % /USR/SBIN/CRON
2666 root 0.0 % /USR/SBIN/CRON
2667 root 0.0 % /USR/SBIN/CRON
2669 root 0.0 % /USR/SBIN/CRON
2677 root 0.0 % /USR/SBIN/CRON
2678 root 0.0 % /USR/SBIN/CRON
2680 root 0.0 % /USR/SBIN/CRON
2762 root 0.0 % /USR/SBIN/CRON
2763 root 0.0 % /USR/SBIN/CRON
2766 root 0.0 % /USR/SBIN/CRON
2802 root 0.0 % /USR/SBIN/CRON
2803 root 0.0 % /USR/SBIN/CRON
2805 root 0.0 % /USR/SBIN/CRON
2806 root 0.0 % /USR/SBIN/CRON
2807 root 0.0 % /USR/SBIN/CRON
2809 root 0.0 % /USR/SBIN/CRON
2810 root 0.0 % /USR/SBIN/CRON
2811 root 0.0 % /USR/SBIN/CRON
2813 root 0.0 % /USR/SBIN/CRON
2814 root 0.0 % /USR/SBIN/CRON
2815 root 0.0 % /USR/SBIN/CRON
2817 root 0.0 % /USR/SBIN/CRON
2818 root 0.0 % /USR/SBIN/CRON
2819 root 0.0 % /USR/SBIN/CRON
2821 root 0.0 % /USR/SBIN/CRON
2822 root 0.0 % /USR/SBIN/CRON
2823 root 0.0 % /USR/SBIN/CRON
2825 root 0.0 % /USR/SBIN/CRON
2826 root 0.0 % /USR/SBIN/CRON
2827 root 0.0 % /USR/SBIN/CRON
2829 root 0.0 % /USR/SBIN/CRON
2830 www-data 0.0 % /usr/sbin/apache2 -k start
2831 root 0.0 % /USR/SBIN/CRON
2832 root 0.0 % /USR/SBIN/CRON
2834 root 0.0 % /usr/sbin/sshd -R
2836 root 0.0 % /USR/SBIN/CRON
2837 root 0.0 % /usr/sbin/sshd -R
2839 root 0.0 % /USR/SBIN/CRON
2840 root 0.0 % /USR/SBIN/CRON
2842 root 0.0 % /USR/SBIN/CRON
2843 root 0.0 % /USR/SBIN/CRON
2844 root 0.0 % /USR/SBIN/CRON
2846 root 0.0 % /USR/SBIN/CRON
2847 root 0.0 % /USR/SBIN/CRON
2848 root 0.0 % /USR/SBIN/CRON
2850 root 0.0 % /USR/SBIN/CRON
2851 root 0.0 % /USR/SBIN/CRON
2852 root 0.0 % /USR/SBIN/CRON
2856 root 0.0 % /USR/SBIN/CRON
2857 root 0.0 % /USR/SBIN/CRON
2858 root 0.0 % /USR/SBIN/CRON
2859 root 0.0 % /USR/SBIN/CRON
2861 root 0.0 % /USR/SBIN/CRON
2862 root 0.0 % /USR/SBIN/CRON
2863 root 0.0 % /USR/SBIN/CRON
2865 root 0.0 % /USR/SBIN/CRON
2866 root 0.0 % /USR/SBIN/CRON
2867 root 0.0 % /USR/SBIN/CRON
2869 root 0.0 % /USR/SBIN/CRON
2870 root 0.0 % /USR/SBIN/CRON
2871 root 0.0 % /USR/SBIN/CRON
2873 root 0.0 % /USR/SBIN/CRON
2874 root 0.0 % /USR/SBIN/CRON
2875 root 0.0 % /USR/SBIN/CRON
2877 root 0.0 % /USR/SBIN/CRON
2878 root 0.0 % /USR/SBIN/CRON
2879 root 0.0 % /USR/SBIN/CRON
2881 root 0.0 % /USR/SBIN/CRON
2883 root 0.0 % /USR/SBIN/CRON
2884 root 0.0 % /USR/SBIN/CRON
2886 root 0.0 % /USR/SBIN/CRON
2887 root 0.0 % /USR/SBIN/CRON
2888 root 0.0 % /USR/SBIN/CRON
2890 root 0.0 % /USR/SBIN/CRON
2891 root 0.0 % /USR/SBIN/CRON
2892 root 0.0 % /USR/SBIN/CRON
2894 root 0.0 % /USR/SBIN/CRON
2895 root 0.0 % /USR/SBIN/CRON
2896 root 0.0 % /USR/SBIN/CRON
2898 root 0.0 % /USR/SBIN/CRON
2899 root 0.0 % /USR/SBIN/CRON
2900 root 0.0 % /USR/SBIN/CRON
2902 root 0.0 % /USR/SBIN/CRON
2903 root 0.0 % /USR/SBIN/CRON
2904 root 0.0 % /USR/SBIN/CRON
2907 root 0.0 % /USR/SBIN/CRON
2908 root 0.0 % /USR/SBIN/CRON
2909 root 0.0 % /USR/SBIN/CRON
2911 root 0.0 % /USR/SBIN/CRON
2912 root 0.0 % /USR/SBIN/CRON
2913 root 0.0 % /USR/SBIN/CRON
2916 root 0.0 % /USR/SBIN/CRON
2917 root 0.0 % /USR/SBIN/CRON
2918 root 0.0 % /USR/SBIN/CRON
2920 root 0.0 % /USR/SBIN/CRON
2921 root 0.0 % /USR/SBIN/CRON
2922 root 0.0 % /USR/SBIN/CRON
2924 root 0.0 % /USR/SBIN/CRON
2925 root 0.0 % /USR/SBIN/CRON
2926 root 0.0 % /USR/SBIN/CRON
2928 www-data 0.0 % /usr/sbin/apache2 -k start
2930 www-data 0.0 % /usr/sbin/apache2 -k start
2932 root 0.0 % /USR/SBIN/CRON
2933 root 0.0 % /USR/SBIN/CRON
2934 root 0.0 % /USR/SBIN/CRON
2936 root 0.0 % /USR/SBIN/CRON
2937 www-data 0.0 % /usr/sbin/apache2 -k start
2938 www-data 0.0 % /usr/sbin/apache2 -k start
2939 root 0.0 % /USR/SBIN/CRON
2940 root 0.0 % /USR/SBIN/CRON
2942 root 0.0 % /usr/sbin/sshd -R
2944 root 0.0 % /USR/SBIN/CRON
2945 root 0.0 % /USR/SBIN/CRON
2946 root 0.0 % /USR/SBIN/CRON
2948 root 0.0 % /USR/SBIN/CRON
2949 root 0.0 % /USR/SBIN/CRON
2950 root 0.0 % /USR/SBIN/CRON
2952 root 0.0 % /USR/SBIN/CRON
2953 root 0.0 % /USR/SBIN/CRON
2954 root 0.0 % /USR/SBIN/CRON
2956 root 0.0 % /USR/SBIN/CRON
2958 root 0.0 % /USR/SBIN/CRON
2959 root 0.0 % /USR/SBIN/CRON
2961 root 0.0 % /USR/SBIN/CRON
2962 root 0.0 % /USR/SBIN/CRON
2963 root 0.0 % /USR/SBIN/CRON
2965 root 0.0 % /USR/SBIN/CRON
2966 root 0.0 % /USR/SBIN/CRON
2967 root 0.0 % /USR/SBIN/CRON
2969 root 0.0 % /USR/SBIN/CRON
2970 root 0.0 % /USR/SBIN/CRON
2971 root 0.0 % /USR/SBIN/CRON
2973 root 0.0 % /USR/SBIN/CRON
2975 root 0.0 % /USR/SBIN/CRON
2976 root 0.0 % /USR/SBIN/CRON
2978 root 0.0 % /USR/SBIN/CRON
2979 root 0.0 % /USR/SBIN/CRON
2980 root 0.0 % /USR/SBIN/CRON
2982 root 0.0 % /USR/SBIN/CRON
2984 root 0.0 % /USR/SBIN/CRON
2985 root 0.0 % /USR/SBIN/CRON
2987 root 0.0 % /USR/SBIN/CRON
2988 root 0.0 % /USR/SBIN/CRON
2989 root 0.0 % /USR/SBIN/CRON
2991 root 0.0 % /USR/SBIN/CRON
2993 root 0.0 % /USR/SBIN/CRON
2994 root 0.0 % /USR/SBIN/CRON
2996 root 0.0 % /USR/SBIN/CRON
2998 root 0.0 % /USR/SBIN/CRON
2999 root 0.0 % /USR/SBIN/CRON
3001 root 0.0 % /USR/SBIN/CRON
3002 root 0.0 % /USR/SBIN/CRON
3003 root 0.0 % /USR/SBIN/CRON
3005 root 0.0 % /USR/SBIN/CRON
3006 root 0.0 % /USR/SBIN/CRON
3007 root 0.0 % /USR/SBIN/CRON
3009 root 0.0 % /USR/SBIN/CRON
3010 root 0.0 % /USR/SBIN/CRON
3011 root 0.0 % /USR/SBIN/CRON
3015 root 0.0 % /USR/SBIN/CRON
3016 root 0.0 % /USR/SBIN/CRON
3017 root 0.0 % /USR/SBIN/CRON
3019 root 0.0 % /USR/SBIN/CRON
3020 root 0.0 % /USR/SBIN/CRON
3021 root 0.0 % /USR/SBIN/CRON
3023 root 0.0 % /USR/SBIN/CRON
3024 root 0.0 % /USR/SBIN/CRON
3025 root 0.0 % /USR/SBIN/CRON
3027 root 0.0 % /USR/SBIN/CRON
3028 root 0.0 % /USR/SBIN/CRON
3029 root 0.0 % /USR/SBIN/CRON
3031 root 0.0 % /USR/SBIN/CRON
3032 root 0.0 % /USR/SBIN/CRON
3033 root 0.0 % /USR/SBIN/CRON
3035 root 0.0 % /USR/SBIN/CRON
3037 root 0.0 % /USR/SBIN/CRON
3038 root 0.0 % /USR/SBIN/CRON
3046 root 0.0 % /USR/SBIN/CRON
3047 root 0.0 % /USR/SBIN/CRON
3048 root 0.0 % /USR/SBIN/CRON
3050 root 0.0 % /USR/SBIN/CRON
3051 root 0.0 % /USR/SBIN/CRON
3052 root 0.0 % /USR/SBIN/CRON
3054 root 0.0 % /USR/SBIN/CRON
3056 root 0.0 % proftpd: 116.206.53.148:3106: PASS (hidden)
3058 root 0.0 % proftpd: 116.206.53.148:3149: PASS (hidden)
3059 root 0.0 % proftpd: 116.206.53.148:3174: PASS (hidden)
3060 root 0.0 % proftpd: 116.206.53.148:3215: PASS (hidden)
3061 root 0.0 % proftpd: 116.206.53.148:3223: PASS (hidden)
3067 root 0.0 % proftpd: 116.206.53.148:3230: PASS (hidden)
3086 root 0.0 % proftpd: 116.206.53.148:3243: PASS (hidden)

Merci en tout cas.
Papy.


Poste le Tuesday 6 November 2007 10:15:50
Répondre     Citer    
Re: Server Hack
Envoyé par: oudoubah

Citation

/USR/SBIN/CRON

Fait un killall /USR/BIN/CRON

D'ailleur, normalement, cela devrait être écrit en minuscule(à moins qu'il n'y ait un répertoire /USR???)

Tu as lu les docs. Tu es devenu un informaticien. Que tu le veuilles
ou non. Lire la doc, c'est le Premier et Unique Commandement de
l'informaticien.
-+- TP in: Guide du Linuxien pervers - "L'évangile selon St Thomas"

Poste le Tuesday 6 November 2007 10:40:25
Répondre     Citer    
Re: Server Hack
Envoyé par: AlSim

Pour les majuscules, c'est le comportement normal de certaines implémentations de cron. [lists.debian.org] et les réponses expliquent pourquoi et pourront peut-être t'aider pour ton problème...

[catwell.info]

Poste le Tuesday 6 November 2007 20:19:54
Répondre     Citer    
Re: Server Hack
Envoyé par: mbrossard

J'ai regarde le sujet sur lists.debian.org comme conseille.
Ils parlent d'un probleme avec Syslog-ng, je l'avais installe recemment.
Je l'ai desactive au demarage grace a Webmin, et en rebootant, j'ai eu de nouveau access au serveur en SSH et en FTP.

Merci beaucoup pour votre aide et oudoubah t'avais raison depuis le debut, c'etait pas a cause d'un hack ...

Papy.

Poste le Wednesday 7 November 2007 11:41:54
Répondre     Citer    

Veuillez vous authentifier auparavant pour commenter.

 

Ce forum !
Server Hack
Un problème avec une commande du shell ? Comment utiliser la crontab ? Vous avez des soucis pour la gestion réseau sous Linux ? Pour vous la gestion des utilisateurs/groupes est du chinois ? Etc... Posez donc vos questions ici.

Sauf mention contraire, les documentations publiées sont sous licence Creative-Commons