VestaCP dính lỗi bảo mật nghiêm trọng, disable service ngay 3
VestaCP

VestaCP dính lỗi bảo mật nghiêm trọng, disable service ngay

Thông tin về bug này mới xuất hiện trên forum của VestaCP và thu hút được rất nhiều người quan tâm vì mức độ nguy hiểm của nó.

Nếu đang dùng VestaCP, bạn hay ngay lập tức stop service quản lý bằng lệnh bên dưới và chờ đợi bản fix (website trên server vẫn hoạt động bình thường):

cd /etc/cron.hourly
rm -rf gcc.sh
systemctl stop vesta && systemctl disable vesta

Và sau khi được fix thì chạy lệnh dưới để khôi phục:

systemctl enable vesta && systemctl start vesta

Nếu trong thư mục /etc/cron.hourly/ có file gcc.sh, server của bạn đã bị tấn công.

Bổ sung thêm cách vá lỗi và xử lý nếu server của bạn đã bị tấn công:
I. Cập nhật bản vá:

1 Via web interface
– Login as admin
– Go to updates tab
– Click un update button under vesta package

2 Via package manager
– SSH as root to your server
– yum update / apt-get update && apt-get upgrade

3 Via GitHub
– SSH as root
– Install git / yum install git /apt-get install git
– Then run following commands

cd $(mktemp -d)
git clone git://github.com/serghey-rodin/vesta.git
/bin/cp -rf vesta/* /usr/local/vesta/

II Sau khi update xong thì dùng cái này
Cut down your network
The trojan has raw file coming from /lib/libudev.so, it will copy and fork again. It will also add cron.hourly job named gcc.sh, then it will add initial script in your /etc/rc*.d (Debian, CentOS may be /etc/rc.d/{init,rc{1,2,3,4,5}}.d)

Use root to run the script below to change the folder privileges: chmod 0000 /lib/libudev.so && rm -rf /lib/libudev.so && chattr +i /lib/

Delete all /etc/rc{0,1,2,3,4,5,6,S}.d files which were created today, The name looks like S01????????.

Edit your crontab, delete the gcc.sh script in your /etc/cron.hourly, delete the gcc.sh file (/etc/cron.hourly/gcc.sh) then add privileges for your crontab: sed ‘/gcc.sh/d’ /etc/crontab && chmod 0000 /etc/crontab && chattr +i /etc/crontab

Use this command to check the latest file changes: ls -lrt

If you find any suspicious files named S01xxxxxxxx (or K8xxxxxxxx), delete it.

Then you should reboot without network.
Then the trojan should be cleaned and you can modify the folder privileges to the original values(chattr -i /lib /etc/crontab).

Nguồn      

Avatar of jamesblackvn

Tui là jamesblackvn!

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

Website này sử dụng Akismet để hạn chế spam. Tìm hiểu bình luận của bạn được duyệt như thế nào.