비정상 로그인 시도를 탐지하기 위한 로그 정리
aws ec2 로그 기반 알람 설정 참고 2022.09.25 - [AWS] - [AWS]Amazon SNS을 사용하여 CloudWatch Log Alerting
Windows - Security
로그인 성공/실패 - EventID
4624: 성공적인 로그인
성공 참고 https://docs.microsoft.com/ko-kr/windows/security/threat-protection/auditing/event-4624
4625: 알 수 없는 계정이나 잘못된 암호를 이용한 로그인 시도
실패 참고 https://docs.microsoft.com/ko-kr/windows/security/threat-protection/auditing/event-4625
EventData
LogonType
LogonType 참고 https://docs.microsoft.com/ko-kr/windows/security/threat-protection/auditing/event-4624#로그온-유형-및-설명
- <Data Name="LogonType">3</Data>
- Network네트워크에서 이 컴퓨터에 로그온한 사용자 또는 컴퓨터입니다.
- <Data Name="LogonType">5</Data>
- 서비스 제어 관리자가 서비스를 시작했습니다.
CentOS - Secure
로그인 성공/실패 - secure
grep "Failed" /var/log/secure
없는 계정으로 로그인 시도
Jul 27 04:51:56 ip-172-31-39-137 sshd[16400]: Invalid user testid from 211.60.x.x port 56231
Jul 27 04:51:56 ip-172-31-39-137 sshd[16400]: input_userauth_request: invalid user testid [preauth]
Jul 27 04:51:56 ip-172-31-39-137 sshd[16400]: error: Received disconnect from 211.60.x.x port 56231:14: No supported authentication methods available [preauth]
Jul 27 04:51:56 ip-172-31-39-137 sshd[16400]: Disconnected from 211.60.x.x port 56231 [preauth]
- Invalid user testid from 211.60.50.130 port 56231
- 필터: Invalid user
private key 없이 로그인 시도
Jul 27 04:52:26 ip-172-31-39-137 sshd[16402]: pam_unix(sshd:session): session closed for user centos
Jul 27 04:52:26 ip-172-31-39-137 sshd[16404]: pam_unix(sshd:session): session closed for user centos
Jul 27 04:52:33 ip-172-31-39-137 sshd[16444]: Connection closed by 211.60.x.x port 56239 [preauth]
Jul 27 04:52:44 ip-172-31-39-137 sshd[16446]: error: Received disconnect from 211.60.50.130 port 56242:14: No supported authentication methods available [preauth]
Jul 27 04:52:44 ip-172-31-39-137 sshd[16446]: Disconnected from 211.60.x.x port 56242 [preauth]
- error: Received disconnect from 211.60.50.130 port 56242:14: No supported authentication methods available [preauth]
- 필터: No supported authentication
password 틀린 경우
Jul 27 05:07:20 ip-172-31-39-137 unix_chkpwd[16727]: password check failed for user (centos)
Jul 27 05:07:20 ip-172-31-39-137 sshd[16725]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=211.60.x.x user=centos
Jul 27 05:07:22 ip-172-31-39-137 sshd[16725]: Failed password for centos from 211.60.x.x port 60762 ssh2
- Failed password for invalid user [username]
- 필터: Failed password
'OS > Security' 카테고리의 다른 글
[Security]서버-클라이언트 상호인증(SSL/TLS) (0) | 2022.07.31 |
---|