카테고리 없음

윈도우 이벤트 로그

bitcoder 2022. 6. 7. 12:18
728x90

 


1. 개요

윈도우 시스템의 문제를 진단하는데 사용된다.

 


2. 이벤트 로그 파일

이벤트 로그는 EVTX 파일 형식으로 저장된다.

 

2.1. 이벤트 로그 파일의 위치

윈도우 이벤트 로그파일들은 %SystemRoot%\System32\winevt\logs에 위치한다.

이벤트 로그파일들의 내용을 읽고 처리하려면 high integrity 권한을 가진 프로세스를 실행해야 한다.

다음은 파일 탐색기로 접근한 해당 폴더에 대한 그림이다.

%SystemRoot%\System32\winevt\logs에 저장되어있는 이벤트 로그 파일들

 

2.2. 이벤트 로그 파일 분류

 

다음은 주요 이벤트 로그와 그에 대한 설명이다.

파일이름 설명
Application.evtx 응용 프로그램 로그
각각의 응용 프로그램에서 기록한 이벤트를 기록
Internet Explorer.evtx Internet Explorer 이벤트
OSession.evtx Office sessions 이벤트
Security.evtx 보안 로그
로그온 시도 및 파일 생성, 열람, 삭제 등의 리소스 사용에 관련된 이벤트를 기록
감사로그 설정을 통해 다양한 보안 이벤트 저장이 가능
Setup.evtx Setup events
System.evtx System events
Windows 시스템 구성요소가 기록하는 이벤트로 시스템 부팅 시, 드라이버가 로드되지 않는 경우와 같이
구성요소의 오류를 이벤트에 기록

 

 

2.3. 이벤트 로그 파일 내 항목

- EventID: 이벤트 타입을 나타내는 식별번호

- Date and Time: 이벤트가 발생한 날짜와 시간

 

2.4. evtx 파일 포맷

evtx file structure

 

 

winnt.h에 정의된 EVENTLOGRECORD 구조체

Offset 크기 설명
0 8 "ElfFile\x00" Signature
8 8   First chunk number
16 8   Last chunk number
24 8   Next record identifier
32 4 128 Header Size
36 2   Minor format version
38 2   Major format version
40 2 4096 Header block size
42 2   Number of chunks
44 76   Unknown
120 4   File flags
124 4   Checksum
128 3968   Unknown

 


3. 관련 도구

 

2.1. 이벤트 뷰어 (Event Viewer)

이벤트 뷰어는 마이크로소프트 Windows NT운영체제에 포함되어있다.

eventvwr.msc 명령실행을 통해 실행할 수 있다.

 

이 도구를 이용하여 로그의 내용을 확인할 수 있다.

다음은 이벤트 뷰어 화면이다.

 

2.2. eventcreate

다음은 cmd에서 확인한 eventcreate 사용법이다.

 

3.3. PowerShell의 Get-WinEvent 명령

 


4. 참고자료

 

- eventcreate 커맨드

https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/eventcreate

 

eventcreate

Reference article for the eventcreate command, which enables an administrator to create a custom event in a specified event log.

docs.microsoft.com

- PowerShell의 Get-WinEvent 명령

https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.diagnostics/get-winevent?view=powershell-7.2 

 

Get-WinEvent (Microsoft.PowerShell.Diagnostics) - PowerShell

This cmdlet is only available on the Windows platform. The Get-WinEvent cmdlet gets events from event logs, including classic logs, such as the System and Application logs. The cmdlet gets data from event logs that are generated by the Windows Event Log te

docs.microsoft.com

 

728x90