网络连接:netstat -antlp 查看CPU占用率:top
查看操作命令中的相关信息:history | grep xmrig
查看登陆信息:last 失败的登陆信息:lastb
查看是否存在其它特权用户:
awk -F: '$3==0{print $1}' /etc/passwd
黑客爆破shh服务的次数
grep -o "Failed password" /var/log/secure | uniq -c
第一次爆破时间or最后一次爆破时间
grep "Failed password" /var/log/secure|head -1
grep "Failed password" /var/log/secure|tail -1
爆破的IP
grep "Failed password" /var/log/secure|grep -E -o "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"|uniq -c | sort -nr
爆破的用户名
grep "Failed password" /var/log/secure|perl -e 'while($_=<>){ /for(.*?) from/; print "$1\n";}'|uniq -c|sort -nr
管理员最近登录情况
grep "Accepted " /var/log/secure | awk '{print $1,$2,$3,$9,$11}'
登录成功的IP
grep "Accepted " /var/log/secure | awk '{print $11}' | sort | uniq -c | sort -nr | more
网络连接
netstat -antlp | more
异常外联对应程序位置
ls -l /proc/9637
定时任务
cat /var/spool/cron/*
自启服务及对应文件
chkconfig --list
find / -name centos_core.sh
自启服务文件时间
stat /etc/rc.d/init.d/centos_core.sh
定时任务日志
cat /var/log/cron
添加用户日志
grep "useradd" /var/log/secure
异常文件时间信息
stat /root/centos_core.elf
stat /shell.elf
计算文件哈希值
md5sum /shell.elf
md5sum /root/centos_core.elf