정보보안공부/정보보안전문과정
정보보안 과정 Day100: 로그보안/시간포멧변경/로그기록삭제
takudaddy
2021. 1. 29. 16:02
1. 침해사고 분석 보고서 작성
2. 원격 로그 분석 서버 구축
[참고 사항]
1. 시간 포멧 변경 명령어
# pinfo date
-> Examples of date 선택
# date -d '1970-01-01 UTC 1441155935 seconds' +"%Y-%m-%d %T %z"
-> 시간 출력 포맷을 변경하여 출력
# cat ~/.bash_history
#1441086536 2015.03.20 13:00:00 history
history
#1441086605
vi /etc/skel/.bash_logout
2. 로그파일의 내용 중 자신의 로그인한 기록을 지우는 방법
/var/log/wtmp (data file) -> last CMD
/var/run/utmp (data file) -> who CMD
# cd /var/log
# mv wtmp wtmp.old
# last
# mv wtmp.old wtmp
# last
(Hacker) Text Log Format
# cd /var/log
# ls -l secure > secure.time
# vi secure
.... 적당한 라인 삭제 ....
# cat secure.time
# touch -t <시간> secure
(Hacker) Data Log Format
structure
# man utmp
# man wtmp
728x90