LINUX安全防范 入侵检测
今日在系统/var/log/secure文件里发现大量的验证错误日志
Jan 22 01:04:27 tony sshd[6729]: Invalid user fdasfasd from 116.22.243.188
Jan 22 01:04:27 tony sshd[6730]: input_userauth_request: invalid user fdasfasd
Jan 22 01:04:28 tony sshd[6729]: pam_unix(sshd:auth): check pass; user unknown
Jan 22 01:04:28 tony sshd[6729]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=116.22.243.188
Jan 22 01:04:28 tony sshd[6729]: pam_succeed_if(sshd:auth): error retrieving information about user admin
经过检查发现是明显的密码攻击 admin为攻击者尝试的用户名 管理员应该尽可能的关闭root的直接登陆
在/etc/ssh/sshd_config 设置PermitRootLogin no
下面发一条有趣的命令 可以统计攻击者使用用户的频率
grep pam_succeed_if /var/log/secure* | awk '{print $12}' | sort | uniq -c
最近评论