在 CentOS(或其他 Linux 发行版)上进行 exploit(漏洞利用)审计,通常指两件事之一:
下面分别说明,均以 合法授权环境 为前提(如自有服务器、渗透测试授权)。
cat /etc/centos-release
uname -a
rpm -qa | grep <软件名>
对照:
cat /etc/passwd
cat /etc/shadow
awk -F: '($3==0)' /etc/passwd
last
lastlog
关注:
ps auxf
top
systemctl list-units --type=service
netstat -antup
ss -antup
重点:
crontab -l
ls -la /etc/cron*
cat /etc/rc.local
systemctl list-unit-files
/var/log/secure
/var/log/messages
/var/log/audit/audit.log
journalctl -xe
使用:
ausearch -m avc
rpm -V <包名>
chkrootkit
rkhunter --check
objdump -d exploit
strings exploit
gdb exploit
strace -f ./exploit
ltrace ./exploit
观察:
setenforce 1
ausearch -ts recent
记录 exploit 触发的拒绝行为。
yum update
如果你是指 “如何审计某个具体 CVE 在 CentOS 上的 exploit” 或 “某次入侵是否由某 exploit 造成”,可以告诉我:
我可以给出更针对性的审计步骤。