# Osquery 로그

## 개요

Panther는 일반적인 [데이터 전송](https://docs.panther.com/ko/data-onboarding/data-transports) 옵션을 통해 Osquery 로그 수집을 지원합니다: HTTP 소스, Amazon Web Services (AWS) S3, SQS 및 CloudWatch.

## Osquery 로그를 Panther에 온보딩하는 방법

이 로그를 Panther에 연결하려면:

1. Panther 콘솔의 왼쪽 탐색 창에서 **구성** > **로그 소스**.
2. 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **새로 만들기**.
3. "Osquery"를 검색한 다음 해당 타일을 클릭하세요.
4. 슬라이드 아웃 패널에서 다음을 선택하십시오 **전송 메커니즘** 이 통합에 사용할 항목.
5. 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **설정 시작**.
6. 선택한 데이터 전송 방법을 구성하기 위한 Panther의 지침을 따르십시오:
   * [HTTP](https://docs.panther.com/ko/data-onboarding/data-transports/http)
     * 이 소스로 전송된 페이로드는 다음의 적용을 받습니다 [모든 HTTP 소스에 대한 페이로드 요구사항](https://docs.panther.com/data-onboarding/data-transports/http#payload-requirements).
     * HTTP 엔드포인트 생성이 완료될 때까지 다음 단계로 진행하지 마세요.
   * [AWS CloudWatch](https://docs.panther.com/ko/data-onboarding/data-transports/aws/cloudwatch)
   * [AWS SQS](https://docs.panther.com/ko/data-onboarding/data-transports/aws/sqs)
   * [AWS S3 버킷](https://docs.panther.com/ko/data-onboarding/data-transports/aws/s3)
7. Osquery를 구성하여 로그를 Data Transport 소스로 푸시하세요.
   * 선택한 Data Transport 소스로 로그를 푸시하는 방법은 Osquery 문서를 참조하세요.

## Panther-내장 디텍션

Panther의 내장된 [Osquery 룰을 Github의 panther-analysis에서 확인하세요](https://github.com/panther-labs/panther-analysis/tree/master/rules/osquery_rules).

## 지원되는 로그 유형

### Osquery.Batch

Batch에는 Osquery 배치 로그에 포함된 모든 데이터가 포함됩니다.

참고: [Osquery 로깅에 대한 문서.](https://osquery.readthedocs.io/en/stable/deployment/logging/) (Batch 형식 섹션으로 스크롤)

```yaml
스키마: Osquery.Batch
설명: Batch에는 OsQuery 배치 로그에 포함된 모든 데이터가 포함됩니다
참고URL: https://osquery.readthedocs.io/en/stable/deployment/logging/
필드:
    - 이름: calendarTime
      required: true
      설명: 이벤트 시간(UTC).
      type: timestamp
      timeFormats:
        - '%a %b %d %H:%M:%S %Y %Z'
        - '%a %b  %d %H:%M:%S %Y %Z'
      isEventTime: true
    - 이름: counter
      required: true
      설명: '''counter'''는 추가된 레코드가 초기 쿼리의 모든 레코드인지 또는 새로운 레코드인지 식별하는 데 사용될 수 있습니다. 모든 레코드를 포함하는 초기 쿼리 결과의 경우 counter는 ''0'''입니다
      type: bigint
    - 이름: decorations
      설명: Decorations
      유형: json
    - 이름: diffResults
      required: true
      설명: 계산된 차이점.
      type: object
      필드:
        - 이름: added
          설명: 추가된 필드
          type: array
          element:
            유형: json
        - 이름: removed
          설명: 제거된 필드
          type: array
          element:
            유형: json
    - 이름: epoch
      required: true
      설명: Epoch. 'epoch'가 변경되면 counter는 0으로 재설정됩니다.
      type: bigint
    - 이름: hostname
      required: true
      설명: 호스트명
      type: string
      지표:
        - hostname
    - 이름: name
      required: true
      설명: 이름
      type: string
    - 이름: unixTime
      required: true
      설명: 유닉스 에포크
      type: bigint
```

### Osquery.Differential

Differential에는 Osquery 차분 로그에 포함된 모든 데이터가 포함됩니다.

참고: [Osquery 로깅에 대한 문서.](https://osquery.readthedocs.io/en/stable/deployment/logging/) (Differential 로그 섹션으로 스크롤)

```yaml
스키마: Osquery.Differential
설명: Differential에는 OsQuery 차분 로그에 포함된 모든 데이터가 포함됩니다
참고URL: https://osquery.readthedocs.io/en/stable/deployment/logging/
필드:
    - 이름: action
      required: true
      설명: Action은 이벤트의 유형입니다
      type: string
    - 이름: calendarTime
      required: true
      설명: 이벤트 시간(UTC).
      type: timestamp
      timeFormats:
        - '%a %b %d %H:%M:%S %Y %Z'
        - '%a %b  %d %H:%M:%S %Y %Z'
      isEventTime: true
    - 이름: columns
      required: true
      설명: 열
      유형: json
    - 이름: counter
      설명: '''counter'''는 추가된 레코드가 초기 쿼리의 모든 레코드인지 또는 새로운 레코드인지 식별하는 데 사용될 수 있습니다. 모든 레코드를 포함하는 초기 쿼리 결과의 경우 counter는 ''0'''입니다
      type: bigint
    - 이름: decorations
      설명: Decorations
      유형: json
    - 이름: epoch
      required: true
      설명: Epoch. 'epoch'가 변경되면 counter는 0으로 재설정됩니다.
      type: bigint
    - 이름: hostIdentifier
      required: true
      설명: HostIdentifier
      type: string
      지표:
        - hostname
    - 이름: logType
      설명: LogType
      type: string
    - 이름: log_type
      설명: LogUnderscoreType
      type: string
    - 이름: name
      required: true
      설명: 이름
      type: string
    - 이름: unixTime
      required: true
      설명: UnixTime
      type: bigint
    - 이름: logNumericsAsNumbers
      설명: LogNumericsAsNumbers
      유형: boolean
```

### Osquery.Snapshot

Snapshot에는 Osquery 차분 로그에 포함된 모든 데이터가 포함됩니다.

참고: [Osquery 로깅에 대한 문서.](https://osquery.readthedocs.io/en/stable/deployment/logging/) (Snapshot 로그 섹션으로 스크롤)

```yaml
스키마: Osquery.Snapshot
설명: Snapshot에는 OsQuery 차분 로그에 포함된 모든 데이터가 포함됩니다
참고URL: https://osquery.readthedocs.io/en/stable/deployment/logging/
필드:
    - 이름: calendarTime
      required: true
      설명: 이벤트 시간(UTC).
      type: timestamp
      timeFormats:
        - '%a %b %d %H:%M:%S %Y %Z'
        - '%a %b  %d %H:%M:%S %Y %Z'
      isEventTime: true
    - 이름: unixTime
      required: true
      설명: UnixTime
      type: bigint
    - 이름: action
      required: true
      설명: Action은 이벤트의 유형입니다
      type: string
    - 이름: counter
      required: true
      설명: '''counter'''는 추가된 레코드가 초기 쿼리의 모든 레코드인지 또는 새로운 레코드인지 식별하는 데 사용될 수 있습니다. 모든 레코드를 포함하는 초기 쿼리 결과의 경우 counter는 ''0'''입니다
      type: bigint
    - 이름: decorations
      설명: Decorations
      유형: json
    - 이름: epoch
      required: true
      설명: Epoch. 'epoch'가 변경되면 counter는 0으로 재설정됩니다.
      type: bigint
    - 이름: hostIdentifier
      required: true
      설명: HostIdentifier. 기본값은 호스트명입니다'
      type: string
      지표:
        - 도메인
    - 이름: name
      required: true
      설명: 이름
      type: string
    - 이름: snapshot
      설명: Snapshot
      type: array
      element:
        유형: json
```

### Osquery.Status

Status는 데몬에 대한 진단용 osquery 로그입니다.

참고: [Osquery 로깅에 대한 문서.](https://osquery.readthedocs.io/en/stable/deployment/logging/) (Status 로그 섹션으로 스크롤)

```yaml
스키마: Osquery.Status
설명: Status는 데몬에 대한 진단용 osquery 로그입니다.
참고URL: https://osquery.readthedocs.io/en/stable/deployment/logging/
필드:
    - 이름: calendarTime
      required: true
      설명: 이벤트 시간(UTC).
      type: timestamp
      timeFormats:
        - '%a %b %d %H:%M:%S %Y %Z'
        - '%a %b  %d %H:%M:%S %Y %Z'
      isEventTime: true
    - 이름: decorations
      설명: Decorations
      유형: json
    - 이름: filename
      required: true
      설명: 파일명
      type: string
    - 이름: hostIdentifier
      required: true
      설명: HostIdentifier
      type: string
      지표:
        - 도메인
    - 이름: line
      required: true
      설명: 줄
      type: bigint
    - 이름: logType
      설명: LogType
      type: string
    - 이름: log_type
      설명: LogUnderScoreType
      type: string
    - name: message
      설명: 메시지
      type: string
    - 이름: severity
      required: true
      설명: 심각도
      type: bigint
    - 이름: unixTime
      required: true
      설명: UnixTime
      type: bigint
    - name: version
      required: true
      설명: 버전
      type: string
```
