# Teleport 로그

## 개요

Panther는 수집을 지원합니다 [Teleport Cluster Event 감사 로그를](https://goteleport.com/docs/reference/monitoring/audit/) 을 통해 [AWS S3 Data Transport](https://docs.panther.com/ko/data-onboarding/data-transports/aws/s3) 옵션으로.

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

Teleport 로그를 Panther에 온보드하려면 Teleport가 로그를 S3 버킷으로 전달하도록 구성해야 합니다. 다음으로 Panther에서 S3 소스를 생성합니다.

{% hint style="info" %}
Panther에서 다음의 어떤 [데이터 전송](https://docs.panther.com/ko/data-onboarding/data-transports) 메커니즘을 사용하여 Teleport 소스를 설정할 수 있지만, [S3 버킷 소스](https://docs.panther.com/ko/data-onboarding/data-transports/aws/s3)를 사용하는 것이 권장됩니다. 이 페이지의 지침은 S3를 사용한다고 가정합니다.
{% endhint %}

### 1단계: Teleport가 Panther로 로그를 내보내도록 구성

Teleport가 Panther가 가져올 수 있는 S3 버킷으로 로그를 내보내도록 구성하는 방법은 두 가지가 있습니다:

* (권장) 옵션 1: AWS 계정의 S3 버킷에 이벤트를 직접 저장합니다.
  * Teleport 문서의 다음 단계를 따르세요 [External Audit Storage](https://goteleport.com/docs/zero-trust-access/management/external-audit-storage/).
* 옵션 2: Teleport Event Handler를 구성하여 이벤트를 Fluentd로 보내고, Fluentd가 이를 S3 버킷으로 전달하도록 합니다.
  * Teleport 문서의 다음 단계를 따르세요 [Teleport 감사 이벤트를 Panther로 내보내기](https://goteleport.com/docs/admin-guides/management/export-audit-events/panther/).

### 2단계: Panther에서 새 Teleport 소스 생성

1. Panther Console의 왼쪽 탐색 모음에서 **구성하세요.** > **로그 소스**.
2. 을 클릭한 다음 **새로 만들기**.
3. "Teleport"를 검색한 다음 해당 타일을 클릭합니다.
   * 슬라이드 아웃 패널에서 **전송 메커니즘** 드롭다운은 다음 값으로 미리 채워집니다 **AWS S3 Bucket** 옵션으로.
4. 을 클릭한 다음 **설정 시작**.
5. 다음의 지침을 따르세요 [S3 Source](https://docs.panther.com/ko/data-onboarding/data-transports/aws/s3) 를 따라 소스 구성을 마칩니다.

## Panther 관리 탐지

참조하세요 [Panther 관리 규칙](https://docs.panther.com/ko/detections/panther-managed) Teleport용의 [panther-analysis GitHub 저장소](https://github.com/panther-labs/panther-analysis/tree/main/rules/gravitational_teleport_rules).

## 지원되는 로그 유형

### Gravitational.TeleportAudit

이 스키마는 성공한 사용자 로그인과 함께 원격 IP 주소, 시간, 세션 ID와 같은 메타데이터를 포함한 Teleport Cluster Event 감사 로그를 지원합니다. 다음에서 Cluster Event 감사 로그 유형을 참조하세요 [이 Teleport 문서](https://goteleport.com/docs/reference/monitoring/audit/#event-types).

{% hint style="warning" %}
Teleport [기록된 세션 감사 로그는](https://goteleport.com/docs/reference/monitoring/audit/) 지원되지 않습니다.
{% endhint %}

```yaml
스키마: Gravitational.TeleportAudit
설명: Teleport는 원격 IP 주소, 시간, 세션 ID와 같은 메타데이터와 함께 성공한 사용자 로그인 같은 이벤트를 기록합니다.
참조 URL: https://goteleport.com/docs/admin-guide/#audit-log
fields:
  - 이름: event
    required: true
    설명: 이벤트 유형
    type: string
  - 이름: code
    required: true
    설명: 이벤트 코드
    type: string
  - name: time
    required: true
    설명: 이벤트 타임스탬프
    type: timestamp
    timeFormats:
      - rfc3339
    isEventTime: true
  - 이름: uid
    설명: 이벤트 고유 ID
    type: string
  - 이름: user
    설명: Teleport 사용자 이름(이벤트 유형은 'user.login')
    type: string
  - 이름: user_kind
    설명: Teleport 사용자 종류
    type: bigint
  - 이름: namespace
    설명: 서버 네임스페이스. 이 필드는 향후 사용을 위해 예약되어 있습니다.
    type: string
  - 이름: server_id
    설명: 고유 서버 ID.
    type: string
  - 이름: sid
    설명: 세션 ID. 세션 재생에 사용할 수 있습니다.
    type: string
    indicators:
      - trace_id
  - 이름: ei
    설명: 이벤트 숫자 ID
    type: string
  - 이름: login
    설명: OS 로그인
    type: string
  - 이름: addr_local
    설명: SSH 노드의 주소
    이름 변경:
      from: addr.local
    type: string
    indicators:
      - net_addr
  - 이름: addr_remote
    설명: 연결하는 클라이언트(사용자)의 주소
    이름 변경:
      from: addr.remote
    type: string
    indicators:
      - net_addr
  - 이름: size
    설명: 터미널 크기
    type: string
  - 이름: success
    설명: 인증 성공(이벤트 유형이 'auth'인 경우)
    type: boolean
  - 이름: error
    설명: 인증 오류(이벤트 유형이 'auth')
    type: string
  - 이름: command
    설명: 실행된 명령(이벤트 유형이 'exec')
    type: string
  - 이름: exitCode
    설명: 명령의 종료 코드(이벤트 유형이 'exec')
    type: int
  - 이름: exitError
    설명: 명령의 종료 오류(이벤트 유형이 'exec')
    type: string
  - name: pid
    설명: 명령의 프로세스 ID
    type: bigint
  - name: ppid
    설명: 상위 프로세스의 프로세스 ID
    type: bigint
  - 이름: cgroup_id
    설명: 제어 그룹 ID
    type: bigint
  - 이름: return_code
    설명: 명령의 반환 코드
    type: int
  - 이름: program
    설명: 명령 이름
    type: string
  - 이름: argv
    설명: 명령에 전달된 인수
    type: array
    element:
      type: string
  - 이름: path
    설명: 실행 파일 경로 또는 SCP 작업 대상 파일 경로(scp, session.command)
    type: string
  - 이름: len
    설명: SCP 대상 파일 크기(scp)
    type: bigint
  - 이름: action
    설명: SCP 작업(scp)
    type: string
  - 이름: method
    설명: 사용된 로그인 방법(user.login)
    type: string
  - 이름: attributes
    설명: 사용자 로그인 속성(user.login)
    type: json
  - 이름: roles
    설명: 새 사용자에 대한 역할(user.create)
    type: array
    element:
      type: string
  - 이름: connector
    설명: 사용자를 생성한 커넥터(user.create)
    type: json
  - 이름: expires
    설명: 만료 날짜
    type: timestamp
    timeFormats:
      - rfc3339
  - 이름: name
    설명: 사용자 또는 서비스 이름(github.created, user.create, user.update)
    type: string
  - 이름: tx
    설명: 전송된 바이트 수
    type: bigint
  - 이름: rx
    설명: 수신된 바이트 수
    type: bigint
  - 이름: server_labels
    설명: 서버 레이블
    type: json
  - 이름: server_hostname
    설명: 서버 호스트 이름
    type: string
    indicators:
      - hostname
  - 이름: server_addr
    설명: 서버 호스트 이름
    type: string
    indicators:
      - net_addr
  - 이름: session_start
    설명: 세션 시작 타임스탬프
    type: timestamp
    timeFormats:
      - rfc3339
  - 이름: session_stop
    설명: 세션 종료 타임스탬프
    type: timestamp
    timeFormats:
      - rfc3339
  - 이름: interactive
    설명: 세션이 대화형이었는지 여부
    type: boolean
  - 이름: enhanced_recording
    설명: 향상된 기록이 활성화되어 있는지 여부
    type: boolean
  - 이름: participants
    설명: 세션에 참여한 사용자
    type: array
    element:
      type: string
  - 이름: dst_addr
    설명: 대상 IP 주소
    type: string
    indicators:
      - ip
  - 이름: src_addr
    설명: 소스 IP 주소
    type: string
    indicators:
      - ip
  - 이름: dst_port
    설명: 대상 포트
    type: int
  - 이름: version
    설명: 이벤트 버전
    type: int
  - 이름: cluster_name
    설명: Teleport 클러스터 이름
    type: string
  - 이름: db_name
    설명: 데이터베이스/스키마 이름
    type: string
  - 이름: db_protocol
    설명: 데이터베이스 프로토콜
    type: string
  - name: db_query
    설명: 쿼리 텍스트
    type: string
  - 이름: db_query_parameters
    설명: 쿼리 매개변수(준비된 문에 대한 것)
    type: json
  - 이름: db_service
    설명: 데이터베이스 서비스 이름
    type: string
  - 이름: db_uri
    설명: 데이터베이스 서버 엔드포인트
    type: string
    indicators:
      - url
  - 이름: db_user
    설명: 데이터베이스 계정 이름
    type: string
    indicators:
      - username
  - 이름: desktop_addr
    설명: 데스크톱 주소
    type: string
  - 이름: desktop_name
    설명: 데스크톱 이름
    type: string
  - 이름: desktop_labels
    설명: 이 이벤트의 데스크톱과 관련된 키/값 쌍
    type: json
  - 이름: file_path
    설명: 공유 디렉터리 루트에서의 상대 경로
    type: string
  - 이름: directory_name
    설명: 액세스한 디렉터리 이름
    type: string
  - 이름: directory_id
    설명: 액세스한 디렉터리 ID
    type: string
  - 이름: lock
    설명: 잠금 객체
    type: json
  - 이름: bot_instance_id
    설명: 봇 인스턴스 ID
    type: string
  - 이름: bot_name
    설명: 봇 이름
    type: string
  - 이름: reviewer
    설명: 요청 검토자
    type: string
  - 이름: proposed_state
    설명: 요청의 원하는 상태
    type: string
  - 이름: state
    설명: 요청의 실제 상태
    type: string
  - 이름: trusted_device
    설명: 사용자의 신뢰할 수 있는 장치에 대한 정보입니다. 인증 중에 사용하려면 등록 및 등록 완료된 장치가 필요합니다.
    type: json
  - 이름: with_mfa
    설명: WithMFA는 이 세션을 시작하는 데 사용된 MFA 장치의 UUID입니다.
    type: string
  - 이름: impersonator
    설명: Impersonator는 이 사용자를 가장하는 사용자의 사용자 이름입니다
    type: string
  - 이름: aws_role_arn
    설명: AWS 역할 ARN
    type: string
    indicators:
      - aws_arn
  - 이름: access_requests
    설명: 액세스 요청 ID
    type: json
  - 이름: forwarded_by
    설명: ForwardedBy는 메타데이터가 노드 자체에서 전송되었는지, 아니면 다른 노드가 대신 전송했는지를 알려줍니다
    type: string
  - 이름: proto
    설명: Protocol은 캡처된 프로토콜을 지정합니다
    type: string
  - 이름: user_agent
    설명: UserAgent는 이벤트를 시도한 클라이언트 유형을 식별합니다.
    type: string
  - 이름: kubernetes_cluster
    설명: kubernetes 클러스터 이름
    type: string
  - 이름: kubernetes_users
    설명: kubernetes 사용자 이름 목록
    type: json
  - 이름: kubernetes_groups
    설명: kubernetes 그룹 목록
    type: json
  - 이름: kubernetes_labels
    설명: 세션이 발생한 kubernetes 클러스터의 레이블(정적 및 동적)입니다.
    type: json
  - 이름: kubernetes_pod_name
    설명: kubernetes pod 이름
    type: string
  - 이름: kubernetes_pod_namespace
    설명: kubernetes pod의 네임스페이스
    type: string
  - 이름: kubernetes_container_name
    설명: kubernetes pod 내 컨테이너 이름
    type: string
  - 이름: kubernetes_container_image
    설명: kubernetes pod 내 컨테이너 이미지
    type: string
  - 이름: kubernetes_node_name
    설명: kubernetes pod를 실행하는 노드의 이름
    type: string
  - 이름: initial_command
    설명: 이 세션을 시작하는 데 사용된 명령
    type: json
  - 이름: session_recording
    설명: 세션 기록 유형
    type: string
  - 이름: ci
    설명: 청크 인덱스
    type: string
  - 이름: bytes
    설명: 세션에 기록된 바이트 수
    type: string
  - 이름: ms
    설명: 세션 시작으로부터의 지연 시간(밀리초)
    type: string
  - 이름: offset
    설명: 세션 파일 시작으로부터의 바이트 오프셋
    type: string
  - 이름: length
    설명: 전송/수신된 바이트 수
    type: string
  - 이름: reason
    설명: 이벤트의 이유
    type: string
  - 이름: max
    설명: 최대값
    type: string
  - 이름: flags
    설명: 이 이벤트와 관련하여 전달된 플래그
    type: json
  - 이름: operation
    설명: 수행된 네트워크 작업을 나타냅니다
    type: json
  - 이름: mfa_device
    설명: 로그인 중에 사용된 MFA 장치
    type: json
  - 이름: updated_by
    설명: 리소스를 수정한 사용자를 나타냅니다
    type: string
    indicators:
      - username
  - 이름: ttl
    설명: 유효 기간
    type: string
  - 이름: id
    설명: 액세스 요청 ID
    type: string
  - 이름: delegator
    설명: teleport 플러그인에서 신원을 나타내는 데 사용됩니다
    type: string
  - 이름: annotations
    설명: Annotations는 승인/거부 중 플러그인이 제공하는 선택적 속성 집합입니다
    type: json
  - 이름: resource_ids
    설명: 액세스가 요청되는 리소스 집합
    type: json
  - 이름: cluster
    설명: 클러스터 이름
    type: string
  - 이름: kind
    설명: 리소스 종류
    type: string
  - 이름: addr
    설명: 대상 포트 포워딩 주소
    type: string
  - 이름: working_directory
    설명: 이벤트의 현재 디렉터리
    type: string
  - 이름: target_path
    설명: 파일의 경로
    type: string
  - 이름: request_path
    설명: 원시 요청 URL 경로
    type: string
  - 이름: verb
    설명: HTTP 동사
    type: string
  - 이름: resource_api_group
    설명: 리소스 API 그룹
    type: string
  - 이름: resource_namespace
    설명: 리소스 네임스페이스
    type: string
  - 이름: resource_kind
    설명: 리소스 API 종류
    type: string
  - 이름: resource_name
    설명: 리소스 API 이름
    type: string
  - 이름: response_code
    설명: HTTP 응답 코드
    type: string
  - 이름: app_uri
    설명: 애플리케이션 엔드포인트
    type: string
    indicators:
      - url
  - 이름: app_public_addr
    설명: 구성된 애플리케이션 공개 주소.
    type: string
    indicators:
      - url
  - 이름: app_labels
    설명: 구성된 애플리케이션 레이블.
    type: json
  - 이름: app_name
    설명: 구성된 애플리케이션 이름
    type: string
  - 이름: public_addr
    설명: 공개 주소
    type: string
    indicators:
      - url
  - 이름: session_chunk_id
    설명: 생성된 세션의 ID
    type: string
  - 이름: status_code
    설명: HTTP 응답 코드
    type: string
  - 이름: raw_query
    설명: 인코딩된 쿼리 값
    type: string
  - 이름: aws_region
    설명: 요청된 AWS 리전
    type: string
  - 이름: aws_service
    설명: 요청된 AWS 서비스
    type: string
  - 이름: aws_host
    설명: 요청된 AWS 호스트
    type: string
  - 이름: db_labels
    설명: 데이터베이스 리소스 레이블
    type: json
  - 이름: db_aws_region
    설명: AWS 호스팅 데이터베이스의 AWS 리전
    type: string
  - 이름: db_aws_redshift_cluster_id
    설명: Redshift 데이터베이스의 클러스터 ID
    type: string
  - 이름: db_gcp_project_id
    설명: GCP 호스팅 데이터베이스의 프로젝트 ID
    type: string
  - 이름: db_gcp_instance_id
    설명: GCP 호스팅 데이터베이스의 인스턴스 ID
    type: string
  - 이름: statement_name
    설명: 준비된 문의 이름
    type: string
  - 이름: query
    설명: 준비된 문의 쿼리
    type: string
  - 이름: portal_name
    설명: 대상 포털 이름
    type: string
  - 이름: parameters
    설명: 매개변수
    type: json
  - 이름: function_oid
    설명: 호출된 함수의 객체 ID
    type: string
  - 이름: function_args
    설명: 형식화된 함수 인수
    type: json
  - 이름: windows_desktop_service
    설명: 서비스 이름
    type: string
  - 이름: windows_domain
    설명: Active Directory 도메인
    type: string
  - 이름: windows_user
    설명: Windows 사용자 이름
    type: string
  - 이름: mfa_device_name
    설명: 사용자가 지정한 MFA 장치 이름
    type: string
  - 이름: mfa_device_uuid
    설명: MFA 장치의 UUID
    type: string
  - 이름: mfa_device_type
    설명: MFA 장치 유형
    type: string
  - 이름: target
    설명: 대상
    type: json
  - 이름: recorded
    설명: 세션이 기록되었는지 여부
    type: boolean
  - 이름: cert_type
    설명: 사용된 인증서 유형
    type: string
  - 이름: identity
    설명: 요청과 연결된 ID
    type: json
  - 이름: unknown_event
    설명: 알 수 없는 이벤트
    type: string
  - 이름: unknown_code
    설명: 알 수 없는 코드
    type: string
  - 이름: data
    설명: 알 수 없는 이벤트의 직렬화된 JSON
    type: string
  - 이름: url
    설명: 이벤트 데이터가 업로드된 세션의 URL
    type: string
  - 이름: search_as_roles
    설명: 검색이 수행된 역할 목록
    type: json
  - 이름: resource_type
    설명: 검색 중인 리소스 유형
    type: string
  - 이름: labels
    설명: 검색에 사용된 레이블 기반 매처
    type: json
  - 이름: predicate_expression
    설명: 검색에 사용된 조건 목록
    type: json
  - 이름: search_keywords
    설명: 리소스 필드 값과 일치시키는 데 사용된 검색 키워드 목록
    type: json
  - 이름: statement_id
    설명: 준비된 문의 ID
    type: string
  - 이름: parameter_id
    설명: 매개변수 ID
    type: string
  - 이름: data_size
    설명: 데이터 크기
    type: string
  - 이름: rows_count
    설명: 가져올 행 수
    type: string
  - 이름: schema_name
    설명: 스키마 이름
    type: string
  - 이름: process_id
    설명: 연결의 프로세스 ID
    type: string
  - 이름: subcommand
    설명: 하위 명령의 문자열 표현
    type: string
  - 이름: proc_name
    설명: RPC SQL Server 프로시저 이름
    type: string
  - name: category
    설명: 주어진 요청에서 액세스되는 API의 범주를 나타냅니다
    type: json
  - 이름: upgrade_window_start
    설명: 업그레이드 창 시간
    type: string
  - 이름: kube_labels
    설명: 구성된 kubernetes 클러스터 레이블
    type: json
  - 이름: command_id
    설명: 실행된 SSH 명령의 ID
    type: string
  - 이름: instance_id
    설명: 실행된 EC2 인스턴스의 ID
    type: string
  - 이름: exit_code
    설명: 명령으로 인한 종료 코드
    type: string
  - 이름: status
    설명: 명령의 상태
    type: string
  - 이름: account_id
    설명: 명령을 실행한 AWS 계정의 ID
    type: string
    indicators:
      - aws_account_id
  - 이름: region
    설명: 명령이 실행된 AWS 리전
    type: string
```
