# Windows 이벤트 로그

## 개요

Panther는 다음을 통해 Windows 이벤트 로그 수집을 지원합니다 [HTTP 소스](https://docs.panther.com/ko/data-onboarding/data-transports/http)로 전달된 후에, [Fluent Bit.](https://docs.fluentbit.io/manual/)

## Windows 이벤트 로그를 Panther에 온보딩하는 방법

### 1단계: Panther에서 새 Windows 이벤트 로그 소스 생성

1. Panther 콘솔의 왼쪽 탐색 바에서 클릭하세요 **구성** > **로그 소스.**
2. 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **새로 만들기**.
3. “Windows Event Logs”를 검색한 다음 해당 타일을 클릭하세요.
   * 슬라이드 아웃 패널에서 **전송 메커니즘** 우측 상단의 드롭다운은 미리 채워진 상태일 것입니다 **HTTP** 옵션.
4. 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **설정 시작**.\
   ![On the new log source setup page, the Windows Event Logs tile has been selected, and a slide out panel is shown. In the Transport Mechanism dropdown field, HTTP is selected. To its right is a Start Setup button.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-62f6ffbdf62d420d25b82de52f863643c8da0154%2FScreenshot%202023-07-19%20at%202.43.36%20PM.png?alt=media)
5. Panther의 [HTTP 소스 구성에 대한 지침을 따르세요](https://docs.panther.com/ko/data-transports/http#how-to-set-up-an-http-log-source-in-panther)5단계부터 시작하여.
   * 설정할 때 **인증 방법** 소스에 대해, 우리는 [**공유 비밀(Shared Secret)**](https://docs.panther.com/ko/data-transports/http#shared-secret).
   * 이 소스로 전송된 페이로드는 다음의 적용을 받습니다 [모든 HTTP 소스에 대한 페이로드 요구사항](https://docs.panther.com/ko/data-transports/http#payload-requirements).

HTTP 소스를 생성한 후 Panther 콘솔은 HTTP 소스 URL을 표시합니다. 다음 단계에서 필요하니 이 값을 안전한 위치에 보관하세요.

### 2단계: Windows에서 Fluent Bit 구성

1. 다음을 따르세요 [Fluent Bit 시작 안내](https://docs.fluentbit.io/manual/installation/getting-started-with-fluent-bit) Fluent Bit를 서비스로 설치하려면.
2. 생성하세요 [Fluent Bit 구성 파일](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit/classic-mode/configuration-file)에도 존재할 것입니다. 자세한 내용은 [아래 예제들](#fluent-bit-configuration-file-examples) 시스템 및 보안 로그 스트리밍 또는 Sysmon 로그 스트리밍 구성 방법에 대한 지침.
   * 다음을 사용해야 합니다 `winevtlog`. 다른 모듈은 더 이상 권장되지 않으며 작동하지 않습니다.
   * Windows Server 2012를 사용 중인 경우, `Use_ANSI True` 가 필요할 수 있습니다.
   * 1단계에서 다음을 선택한 경우 **JSON** HTTP 소스의 **샘플 이벤트 붙여넣기**에서, `OUTPUT` 섹션에, 다음을 제공하세요 `Format` 값으로 `json_lines`.
3. Fluent Bit을 시작하고 새 구성 파일의 경로를 전달하세요.
   * 기계가 시작될 때마다 Fluent Bit을 데몬으로 실행하려면 다음을 따르세요 [Windows 서비스 지침](https://docs.fluentbit.io/manual/installation/windows#windows-service-support).

#### Fluent Bit 구성 파일 예제

{% tabs %}
{% tab title="시스템 및 보안 로그" %}
**시스템 및 보안 로그 수집**

Fluent Bit 구성 파일에 다음을 구성하세요:

* `[INPUT]` 변수:
  * **Channels**: 이를 다음으로 설정하세요 `System,Security`
* `[OUTPUT]` 변수:
  * **호스트**: Panther URL을 입력하세요.
    * 예: `logs.instance-name.runpanther.net`
  * **URI**: HTTP Source 수집 URL의 끝부분(이 프로세스의 1단계에서 생성된)을 입력하세요. 이것은로 시작합니다 `/http/`.
    * 예: `/http/cb015ee4-543c-4489-9f4b-testaa16d7a`
  * **헤더**: Panther 콘솔에서 1단계에서 HTTP 소스를 구성할 때 생성한 헤더 이름과 생성한 시크릿을 입력하세요.
  * **이름**: 다음으로 설정 `http`.
  * **TLS**: 다음으로 설정 `켜기`.
  * **포트**: 다음으로 설정 `443`.

```editorconfig
[SERVICE]
    Flush 5
    Daemon off
    Log_Level info

[INPUT]
    Name         winevtlog
    Channels     System,Security
    Interval_Sec 1
    DB           winevtlog.sqlite

[OUTPUT]
    Name         http
    Match        *
    Host         logs.instance-name.runpanther.net
    Port         443
    URI          /http/cb015ee4-543c-4489-9f4b-testaa16d7a
    Header       x-sender-header {YOUR_SECRET_HERE}
    Format       json_lines
    TLS          On
    TLS.Verify   On
```

{% endtab %}

{% tab title="Sysmon 로그" %}
**Sysmon 로그 수집**

1. 구성 `sysmon.exe` 다음을 따라 [SwiftOnSecurity의 가이드](https://github.com/SwiftOnSecurity/sysmon-config).
   * 이 프로세스는 Fluent Bit이 Panther로 전송할 Windows 이벤트 로그를 생성합니다.
2. Fluent Bit 구성 파일에 다음을 구성하세요:
   * `[INPUT]` 변수:
     * **Channels**: 이를 다음으로 설정하세요 `Microsoft-Windows-Sysmon/Operational`
   * `[OUTPUT]` 변수:
     * **호스트**: Panther URL을 입력하세요.
       * 예: `logs.instance-name.runpanther.net`
     * **URI**: HTTP Source 수집 URL의 끝부분(이 프로세스의 1단계에서 생성된)을 입력하세요. 이것은로 시작합니다 `/http/`.
       * 예: `/http/cb015ee4-543c-4489-9f4b-testaa16d7a`
     * **헤더**: Panther 콘솔에서 1단계에서 HTTP 소스를 구성할 때 생성한 헤더 이름과 생성한 시크릿을 입력하세요.
     * **이름**: 다음으로 설정 `http`.
     * **TLS**: 다음으로 설정 `켜기`.
     * **포트**: 다음으로 설정 `443`.

```editorconfig
[SERVICE]
    Flush 5
    Daemon on
    Log_Level info

[INPUT]
    Name         winevtlog
    Channels     Microsoft-Windows-Sysmon/Operational
    Interval_Sec 1
    DB           winevtlog.sqlite

[OUTPUT]
    Name         http
    Match        *
    Host         logs.instance-name.runpanther.net
    Port         443
    URI          /http/cb015ee4-543c-4489-9f4b-testaa16d7a
    Header       x-sender-header {YOUR_SECRET_HERE}
    Format       json_lines
    TLS          On
    TLS.Verify   On
```

{% endtab %}
{% endtabs %}

## 지원되는 로그 유형

### Windows.EventLogs

```yaml
schema: Windows.EventLogs
description: Windows 이벤트 로그
referenceURL: https://learn.microsoft.com/en-us/windows/win32/wes/eventschema-elements
필드:
  - name: ProcessID
    description: 이벤트를 생성한 프로세스를 식별합니다.
    type: string
  - name: ThreadID
    description: 이벤트를 생성한 스레드를 식별합니다.
    type: string
  - name: TimeCreated
    description: 이벤트가 기록된 시점을 식별하는 타임스탬프입니다.
    type: timestamp
    timeFormats:
      - '%Y-%m-%d %H:%M:%S %z'
    isEventTime: true
  - name: EventID
    description: 공급자가 이벤트를 식별하는 데 사용한 식별자입니다.
    type: string
  - name: ProviderName
    description: 이벤트를 기록한 이벤트 공급자의 이름입니다.
    type: string
  - name: ProviderGuid
    description: 공급자를 고유하게 식별하는 전역 고유 식별자입니다.
    type: string
  - name: Qualifiers
    description: 레거시 공급자는 이벤트를 식별하기 위해 32비트 숫자를 사용합니다. 이벤트가 레거시 공급자에 의해 기록된 경우 EventID 요소의 값은 이벤트 식별자의 하위 16비트를 포함하고 Qualifier 속성은 이벤트 식별자의 상위 16비트를 포함합니다.
    type: string
  - name: Version
    description: 이벤트 정의의 버전 번호입니다.
    type: string
  - name: Level
    description: 이벤트에 정의된 심각도 수준입니다.
    type: string
  - name: Task
    description: 이벤트에 정의된 작업(Task)입니다. 작업과 오프코드(opcode)는 일반적으로 이벤트가 기록된 애플리케이션 내 위치를 식별하는 데 사용됩니다.
    type: string
  - name: Opcode
    description: 이벤트에 정의된 오프코드(opcode)입니다. 작업과 오프코드는 일반적으로 이벤트가 기록된 애플리케이션 내 위치를 식별하는 데 사용됩니다.
    type: string
  - name: Keywords
    description: 이벤트에 정의된 키워드의 비트마스크입니다. 키워드는 이벤트 유형을 분류하는 데 사용됩니다(예: 데이터 읽기와 관련된 이벤트).
    type: string
  - name: EventRecordID
    description: 이벤트가 기록될 때 이벤트에 할당된 레코드 번호입니다.
    type: string
  - name: ActivityID
    description: 현재 활동을 식별하는 전역 고유 식별자입니다. 이 식별자로 게시된 이벤트들은 동일한 활동의 일부입니다.
    type: string
    지표:
      - trace_id
  - name: RelatedActivityID
    description: 제어가 전송된 활동을 식별하는 전역 고유 식별자입니다. 관련 이벤트는 이 식별자를 자신의 ActivityID 식별자로 갖게 됩니다.
    type: string
  - name: Channel
    description: 이벤트가 기록된 채널입니다.
    type: string
  - name: Computer
    description: 이벤트가 발생한 컴퓨터의 이름입니다.
    type: string
    지표:
      - username
  - name: UserID
    description: 문자열 형태의 사용자 보안 식별자(SID)입니다.
    type: string
    지표:
      - username
  - name: Message
    description: 이벤트의 렌더링된 메시지 문자열입니다.
    type: string
  - name: StringInserts
    description: 임의의 이벤트 특정 데이터 목록입니다. fluent-bit에 의해 생성됩니다
    유형: json
  - name: ExtraEventData
    description: Message 필드에서 추출된 추가 키-값 쌍 맵입니다. 이는 Panther가 구조화된 쿼리/디텍션 작성이 용이하도록 추가한 필드입니다.
    유형: json
```
