> For the complete documentation index, see [llms.txt](https://docs.panther.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.panther.com/ko/detections/rules/derived.md).

# 파생 디택션

## 개요

Panther에서 하나의 Base 디택션으로부터 하나 이상의 Derived 디택션을 만들 수 있습니다. Derived 디택션은 수정할 수 없는 Base 디택션의 핵심 로직과, 덮어쓸 수 있는 메타데이터 및 알러트 필드 값을 상속합니다.

디택션 파생은 다음과 같이 생성된 룰에 사용할 수 있습니다 [간단한 디택션](/ko/detections.md#simple-detections) 또는 [Python 탐지](/ko/detections/rules/python.md).

### Derived 디택션의 사용 사례

파생은 특히 다음과 같은 경우에 유용합니다:

* 동일한 룰의 복사본을 여러 개 유지하고 있으며, 각각의 메타데이터가 다를 때
* CLI 워크플로에서 다음을 사용하고 사용자 지정하며 [Panther에서 관리하는 규칙](/ko/detections/panther-managed.md), Panther가 업데이트를 릴리스할 때마다 병합 충돌을 해결해야 하는 상황을 피하고 싶을 때
  * 전체 예시는 다음에서 확인하세요 [병합 충돌을 피하기 위한 Derived 디택션 사용](/ko/detections/rules/derived/using-derived-detections-to-avoid-merge-conflicts.md)
* 인시던트에 대응하는 동안 하나의 디택션의 여러 변형을 배포하여 다음 결정을 내리는 데 도움이 되는 텔레메트리를 수집할 수 있으면 좋겠을 때
* 팀의 한 구성원(예: 위협 연구 책임자)이 다른 사람들(예: SOC 분석가)이 수정할 수 있는 Base 디택션 집합을 만들고 싶어할 때

## Base 디택션 및 Derived 디택션

Base 디택션은 사용자 정의 또는 [Panther가 관리하는](/ko/detections/panther-managed.md) Derived 디택션이 생성된 룰입니다.

Derived 디택션은 Base 디택션으로부터 생성되며:

* Base 디택션의 핵심 디택션 로직을 상속합니다
  * 핵심 디택션 로직은 Base 디택션의 `룰()` 함수(Python 디택션의 경우) 또는 `디택션` 필드(Simple 디택션의 경우)에 정의됩니다.
  * Derived 디택션은 자체 디택션 로직을 지정할 수 없습니다. CLI 워크플로에서 Derived 디택션에 다음이 포함되면 `디택션` 키가 포함되어도, 예를 들어 그 내용은 무시됩니다.
* Base 디택션의 메타데이터/알러트 필드 값을 상속하지만, 일부 필드는 덮어쓸 수 있습니다
  * 참고 [디택션 파생의 제한 사항](#limitations-of-detection-derivation) 현재 덮어쓸 수 있는 필드의 전체 목록은 다음을 참조하세요.
  * Derived 디택션에서 적용한 오버라이드는 Base 디택션에서 상속한 해당 필드 값을 완전히 대체합니다. 예를 들어 Base 디택션과 Derived 디택션이 둘 다 다음을 정의하는 경우 [인라인 필터](/ko/detections/rules/inline-filters.md) (다음의 `InlineFilters` 키(CLI 워크플로에서) 또는 **이벤트만 포함하도록 필터링하는** 필드(Console에서)를 사용한 경우에도, Derived 디택션의 인라인 필터만 적용됩니다.
  * 오버라이드는 한 방향으로만 적용할 수 있습니다. 즉, Derived 디택션에서 적용한 오버라이드는 Base 디택션 값에 영향을 주지 않습니다. 예를 들어 Base 디택션에 다음이 있는 경우 `Enabled: False` 그리고 그 Derived 디택션에 다음이 있는 경우 `Enabled: True`, Derived 디택션만 활성화됩니다.

### Base 디택션이 업데이트될 때 발생하는 일

Base 디택션의 핵심 로직이 업데이트되면 변경 사항이 관련된 모든 Derived 디택션에 전파됩니다.

Base 디택션의 메타데이터가 업데이트될 때, 관련 Derived 디택션이 이미 업데이트된 필드의 값(들)을 덮어쓴 상태라면 변경 사항은 없습니다. 관련 Derived 디택션이 업데이트된 필드의 값(들)을 덮어쓰지 않았다면 메타데이터 업데이트가 Derived 디택션에 전파됩니다.

### 중복 알러트를 방지하려면 Base 디택션을 비활성화하세요

대부분의 경우 Base 디택션과 Derived 디택션은 동일한 수신 로그 집합에 대해 실행됩니다(다만 다음을 사용하여 [인라인 필터](/ko/detections/rules/inline-filters.md) 서로 다른 이벤트를 대상으로 지정하는 것도 가능합니다). 이 경우 디택션들이 핵심 로직을 공유하므로 둘 다 활성화되어 있으면 중복 알러트가 생성됩니다.

이를 방지하려면 Base 디택션을 비활성화하세요. 비활성화된 Base 디택션이 업데이트되더라도 그 변경 사항은 Derived 디택션에 계속 전파됩니다 [위에서 설명한 대로](#what-happens-when-a-base-detection-is-updated).

#### CLI 워크플로에서 Base 디택션을 자동으로 비활성화하기

CLI 워크플로에서 Base 디택션을 자동으로 비활성화하는 방법은 두 가지입니다:

* **옵션 1(권장)**: 다음 설정을 `.panther_settings.yml` 파일에 추가하세요:

  ```yaml
  auto_disable_base: true
  # ... 다른 설정 ...
  ```
* **옵션 2**: 사용 `--auto-disable-base` 다음과 [Panther Analysis Tool `업로드` 명령](/ko/panther/detections-repo/pat/pat-commands.md#upload-uploading-packages-to-panther-directly).
  * 이 옵션을 사용할 때는 다음을 유의하세요 `--auto-disable-base` 는 이후의 모든 업로드 실행에 사용해야 합니다. 생략하면 Base 디택션이 다시 활성화됩니다.

{% hint style="warning" %}
하나 이상의 Base 디택션이 이미 활성화된 상태로 Panther 인스턴스에 업로드되어 있고, 이후 위 방법 중 하나를 사용해 Base 디택션을 자동으로 비활성화하는 경우, 다음이 포함되지 않도록 하세요 `--filter enabled: true` 다음에 [PAT `업로드` 명령](/ko/panther/detections-repo/pat/pat-commands.md#upload-uploading-packages-to-panther-directly). 그렇게 하면 Base 디택션은 다음 전에 비활성화됩니다 `업로드` (다음이 `enabled: true` 필터가 적용될 때), 새로 비활성화된 Base 디택션은 Panther 인스턴스에 다시 업로드되지 않습니다(즉, 그대로 남아 있거나 활성화된 상태로 유지됩니다).
{% endhint %}

## Derived 디택션을 만드는 방법

{% tabs %}
{% tab title="Panther 콘솔" %}
**Panther Console에서 Derived 디택션 만들기**

1. Panther Console의 왼쪽 탐색 표시줄에서 **디택션**.
2. 새 Derived 디택션의 Base 디택션으로 사용할 디택션을 찾아 이름을 클릭하세요.
3. 오른쪽 상단에서 `...`.
4. 다음을 클릭합니다 **파생**:\ <img src="/files/b0bed9c8331eefd327d1dc7bdddb8c2038bb8145" alt="In the Panther Console, the three dots menu on a detection&#x27;s page is open, and the Derive option is circled." data-size="original">
5. 해당 **기본 정보** 페이지에서 필요에 따라 **이름** 및 **ID** Derived 디택션의 필드를 편집합니다.
   * 이름이 Base 디택션의 이름과 구분되도록 하세요.
6. 다음을 클릭합니다 **Continue**.
7. 다음으로 스크롤합니다. **필터** 및 **알러트 필드 설정** 섹션에서 인라인 필터와 알러트 필드에 원하는 오버라이드를 설정하세요:\
   ![The edit detection page in the Panther Console is shown. A Filter section is visible, along with a Set Alert Fields section. Within the latter are sub-sections for Required Fields and Optional Fields.](/files/27da81e138f3f95043b24b53cc933861c4ca5446)
8. 오른쪽 상단에서 **배포**.
   * 디택션에는 다음 레이블이 `DERIVED` 표시됩니다:\ <img src="/files/6aa31e34dccc2bcd26e42f318e8b942135b45a39" alt="The word &#x22;DERIVED&#x22; is shown in teal." data-size="original">
     {% endtab %}

{% tab title="CLI 워크플로" %}
**CLI 워크플로에서 Derived 디택션 만들기**

1. 다음을 사용하는 디렉터리에서 [Panther Analysis Tool (PAT)](/ko/panther/detections-repo/pat.md), Derived 디택션용 새 YAML 파일을 만드세요.
2. 이 YAML 파일에 Derived 디택션에 필요한 다음 필드를 추가하세요:
   * `Base디택션`: Panther 인스턴스에 현재 있거나 PAT로 업로드할 로컬 디렉터리에 있는 임의의 룰 ID를 지정하세요.
     * 다음 `Base디택션` 키는 이 Derived 디택션과 해당 Base 디택션을 연결하는 항목이며, 상속을 적용해야 함을 나타냅니다.
   * `룰ID`: 앞서 다음에 대해 제공한 ID와 다른 값을 지정하세요 `Base디택션` 키의 값으로 저장됩니다.
   * `AnalysisType`: 이것이 다음인지 표시하세요 `룰`, `scheduled_룰`, 또는 `정책`.
     * 현재는 룰만 지원됩니다.
3. 덮어쓰려는 메타데이터 필드와 해당 새 값을 추가하세요.
   * 다음을 참조하세요 [제한 사항](#limitations-of-detection-derivation) 섹션에서 사용 가능한 오버라이드 필드 목록을 확인하세요.
   * 다음을 사용할 수 있습니다 [여기에 설명된 동적 알러트 필드](/ko/detections/rules/writing-simple-detections.md#dynamic-alert-keys-in-simple-detections).
4. 다음을 사용하여 디택션을 업로드하세요 [`panther_analysis_tool upload`](/ko/panther/detections-repo/pat/pat-commands.md#upload-uploading-packages-to-panther-directly) 명령을 사용합니다.
   * 다음을 권장합니다 [Base 디택션을 자동으로 비활성화하는 것](#automatically-disabling-base-detections-in-the-cli-workflow).

**CLI 워크플로 예시**

아래는 Python Base 디택션의 예시([panther-analysis 저장소의 표준 디택션](https://github.com/panther-labs/panther-analysis/blob/main/rules/auth0_rules/auth0_mfa_policy_enabled.yml))이며, 그 아래에는 해당 Derived 디택션이 있습니다.

```yaml
# Base 디택션
AnalysisType: 룰
Description: 조직의 테넌트에서 Auth0 사용자가 MFA 정책을 활성화했습니다.
DisplayName: "Auth0 MFA Policy Enabled"
Enabled: True
Filename: auth0_mfa_policy_enabled.py
Runbook: 사용자가 정당한 비즈니스 사유로 수행했으며 예상된 것인지 확인하세요. 이 알러트는 보안 모범 사례에 부합하는 설정 변경을 나타내므로 후속 조치가 불필요할 수 있습니다.
Severity: 중간
DedupPeriodMinutes: 60
LogTypes:
    - Auth0.Events
룰ID: "Auth0.MFA.Policy.Enabled"
Threshold: 1
테스트:
    - ExpectedResult: True
      로그:
        data:
            client_id: 1HXWWGKk1Zj3JF8GvMrnCSirccDs4qvr
            client_name: ""
            date: "2023-05-16 17:26:16.782000000"
            description: 다중 요소 인증 정책 설정
            details:
                request:
                    auth:
                        credentials:
                            jti: 0107c849078d8d889af711840197ba7c
                            scopes:
                                - create:actions
                                - create:actions_log_sessions
                                # shortened for brevity
                        strategy: jwt
                        user:
                            email: user.name@yourcompany.io
                            name: 사용자 이름
                            user_id: google-oauth2|105261262156475850461
                    body:
                        - all-applications
                    channel: https://manage.auth0.com/
                    ip: 12.12.12.12
                    method: put
                    path: /api/v2/guardian/policies
                    query: {}
                    userAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36
                response:
                    body:
                        - all-applications
                    statusCode: 200
            ip: 12.12.12.12
            log_id: "90020230515215719063964000000000000001223372037488829643"
            type: sapi
            user_agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36
            user_id: google-oauth2|105261262156475850461
        log_id: "90020230515215719063964000000000000001223372037488829643"
        p_any_ip_addresses:
            - 12.12.12.12
        p_any_usernames:
            - google-oauth2|105261262156475850461
        p_event_time: "2023-05-16 17:26:16.782"
        p_log_type: Auth0.Events
        p_parse_time: "2023-05-16 17:28:28.572"
        p_row_id: 2660c447622fa4c3dbb08f9918979102
        p_schema_version: 0
        p_source_id: b9031579-b2c5-45c2-b15c-632b995a4e36
        p_source_label: 조직 Auth0 테넌트 레이블
      Name: MFA 정책 활성화 첫 번째
```

```yaml
# Derived 디택션

# 필수 필드
AnalysisType: 룰
룰ID: "Auth0.MFA.Policy.Enabled.Custom.Severity"
Base디택션: "Auth0.MFA.Policy.Enabled"

# 덮어쓰이는 필드(즉, Base 디택션에서 상속한 기본값을 오버라이드하는 필드)
DisplayName: "Auth0 MFA Policy Enabled - Severity Critical"
Enabled: True
Severity: 치명적
Description: 조직의 테넌트에서 Auth0 사용자가 MFA 정책을 활성화했습니다 - 중요도가 치명적으로 오버라이드되었습니다.
```

{% endtab %}
{% endtabs %}

## 모든 Derived 디택션을 보는 방법

Panther 인스턴스에서 모든 Derived 디택션을 보려면:

1. Panther Console의 왼쪽 탐색 표시줄에서 **디택션**.
2. 다음을 클릭합니다 **필터** 아이콘.\
   ![](/files/e93b640635fb883d93b52de9cb48025a24670fcc)
3. 다음 **디택션 유형** 드롭다운 필드에서 선택 **Derived 룰**.
4. 다음을 클릭합니다 **필터 적용**.

## 디택션 파생의 제한 사항

* 다음에는 파생을 사용할 수 없습니다 [예약된 룰](/ko/detections/rules.md) 또는 [정책](/ko/detections/policies.md).
* 파생은 한 단계만 가능합니다. 즉, Derived 디택션은 다시 파생될 수 없습니다 *에서.*
* Console 워크플로에서는 Derived 디택션이 생성될 때 테스트가 상속되지만, 그 이후 Base 디택션의 테스트가 업데이트되더라도 상속되지는 않습니다.
* Python Base 디택션에서 메타데이터 필드의 값이 Python 함수로 설정되어 있다면, 해당 값은 Derived 디택션에서 제공한 동일한 정적 오버라이드 값보다 우선합니다. 예를 들어 Python [`severity()`](/ko/detections/rules/python.md#severity) 함수가 Base 디택션에 있으면, 그 값은 다음에 제공된 Derived 디택션의 오버라이드 값보다 우선합니다 `심각도` YAML 키(CLI 워크플로에서) 또는 **심각도** 필드(Console에서).
  * 메타데이터 값을 설정하는 Python 함수(“알러트 함수”라고 함) 전체 목록과, YAML/Console에서 어떤 필드를 오버라이드하는지에 대한 내용은 다음에서 확인하세요 [Python 디택션의 알러트 함수](/ko/detections/rules/python.md#alert-functions-in-python-detections) 테이블.
  * 그것은 *이* 특정 Python 알러트 함수가 설정한 값을 다음을 사용하여 덮어쓸 수 있습니다 [동적 알러트 키](/ko/detections/rules/writing-simple-detections.md#dynamic-alert-keys-in-simple-detections) Derived 디택션에서. 예를 들어 Python Base 디택션의 [`severity()`](/ko/detections/rules/python.md#severity) 함수는 다음을 사용하여 Derived 디택션에서 오버라이드할 수 있습니다 [`DynamicSeverities`](/ko/detections/rules/writing-simple-detections.md#dynamicseverities) 필드에.
    * [`DynamicSeverities`](/ko/detections/rules/writing-simple-detections.md#dynamicseverities) 오버라이드 [`severity()`](/ko/detections/rules/python.md#severity)
    * [`AlertTitle`](/ko/detections/rules/writing-simple-detections.md#alerttitle) 오버라이드 [`title()`](/ko/detections/rules/python.md#title)
    * [`알러트Context`](/ko/detections/rules/writing-simple-detections.md#alertcontext) 오버라이드 [`알러트_context()`](/ko/detections/rules/python.md#alert_context)
    * [`GroupBy`](/ko/detections/rules/writing-simple-detections.md#groupby) 오버라이드 [`dedup()`](/ko/detections/rules/python.md#dedup)
* Console 워크플로에서 Derived 디택션을 만들고 있고 Base 디택션이 Python 디택션인 경우, 어떤 알러트 필드도 동적으로 설정할 수 없습니다. 정적으로만 설정할 수 있습니다.
  * 그것은 *이* Base 디택션이 Simple 디택션인 경우 Console 워크플로에서 알러트 필드를 동적으로 설정할 수 있습니다.
  * 그것은 *이* CLI 워크플로에서는 알러트 필드를 동적으로 설정할 수 있습니다( [`AlertTitle`](/ko/detections/rules/writing-simple-detections.md#alerttitle), [`DynamicSeverities`](/ko/detections/rules/writing-simple-detections.md#groupby), [`알러트Context`](/ko/detections/rules/writing-simple-detections.md#alertcontext), 그리고 [`GroupBy`](/ko/detections/rules/writing-simple-detections.md#groupby)) 이는 Base 디택션이 Python 또는 YAML 디택션인지 여부와 무관합니다.
* 현재는 아래 필드만 덮어쓸 수 있습니다. 이는 CLI 워크플로에 적용되는 YAML 필드 이름이며, Console에 대응 필드가 있는 경우 해당 Console 필드도 덮어쓸 수 있습니다.
  * `Enabled`
  * `심각도`
  * `설명`
  * `알러트 생성(CreateAlert)`
  * `DedupPeriodMinutes`
  * `InlineFilters`
  * `DisplayName`
  * `OnlyUseBaseRiskScore`
  * `OutputIds`
  * `참조`
  * `런북`
  * `SummaryAttributes`
  * `Threshold`
  * `Tags`
  * `Reports`
  * `DynamicSeverities`
  * `AlertTitle`
  * `알러트Context`
  * `GroupBy`
  * `테스트`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.panther.com/ko/detections/rules/derived.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
