Ubuntu Exploit威胁的应对与加固
一 立即处置流程
二 预防加固清单
三 关键配置示例
sudo apt install ufw -y
sudo ufw allow ssh
sudo ufw enable
sudo apt install unattended-upgrades -y
sudo dpkg-reconfigure unattended-upgrades # 选择“是”以自动安装安全更新
sudo nano /etc/ssh/sshd_config
# 建议值:
# Port 2222
# PermitRootLogin no
# PasswordAuthentication no
sudo systemctl restart sshd
sudo aa-enforce /path/to/profile
sudo aa-complain /path/to/profile
sudo journalctl -xe | grep apparmor
sudo tail -f /var/log/auth.log
sudo tail -f /var/log/syslog
四 持续监测与审计
sudo chmod 400 /etc/shadow
sudo chown root:shadow /etc/shadow
sudo chmod 700 /var/spool/cron
sudo chown root:root /var/spool/cron
五 常见漏洞与修复要点