KQL(Kusto 쿼리 언어) 쿼리를 사용하여 강력한 플러그 인을 만들어 데이터를 탐색하고 패턴을 검색합니다.
KQL 기술 설정
일반 설정
이러한 설정은 모든 KQL 기술에 공통적으로 적용됩니다.
Settings:
# What type of KQL endpoint to connect to.
# One of { Defender, Sentinel, SentinelDataLake, LogAnalytics, Kusto }
Target: Sentinel
# A URL to download the KQL query template from.
# Specify either TemplatUrl or Template but not both.
TemplateUrl: https://gist.githubusercontent.com/NitinKumarGoel/c862ba63878dd2624acb1b0e260f409a/raw/3a527014757b4ee1f00302a1b34a13e7b83ff77a/gistfile1.txt
# An inline KQL query template.
# Specify either TemplatUrl or Template but not both.
Template: |-
SigninLogs
| where UserDisplayName == '{{user}}' or UserPrincipalName == '{{user}}'
| project TimeGenerated, OperationName, UserDisplayName, UserPrincipalName, Location, ResourceDisplayName, ConditionalAccessStatus, IsInteractive
| top 100 by TimeGenerated desc
다음 표에서는 모든 KQL 기술 대상에 대해 구성할 수 있는 settings를 보여 줍니다.
| 설정 이름 | 유형 | 설명 | 필수 |
|---|---|---|---|
Template |
문자열 | KQL 프롬프트 템플릿입니다. 최대 80,000자까지 지원합니다. | 예, TemplateUrl이 지정되지 않은 경우입니다. |
TemplateUrl |
문자열 | KQL 프롬프트 템플릿(최대 80,000자)을 다운로드할 수 있는 공용 URL입니다. | 예. TemplatUrl 또는 템플릿 중 하나만 지정합니다. |
PackageUrl |
문자열 | KQL 프롬프트 템플릿이 포함된 zip 파일의 공용 URL입니다. 참고: SkillGroup 수준에서 지정됩니다. GPT 기술 패키지와 유사합니다. 예. | 예, Template 또는 TemplateUrl이 지정되지 않은 경우 입니다. |
TemplateFile |
문자열 | PackageUrl zip 파일 내 KQL 프롬프트 템플릿(최대 80,000자)의 상대 경로입니다. | 예, PackageUrl이 지정된 경우 입니다. |
대상 관련 설정
대상: Sentinel
이러한 설정은 Target이 Sentinel인 KQL 기술에 유효합니다.
설명자: 이름: DisplayName: Description: Settings: - Name: TenantId Required: true - Name: WorkspaceName Required: true - Name: SubscriptionId Required: true - Name: ResourceGroupName Required: true SupportedAuthTypes: - None
SkillGroups:
- Format: KQL
Skills:
- Name:
DisplayName:
Description:
Settings:
Target: Sentinel
# The ID of the AAD Organization that the Sentinel workspace is in.
TenantId: '{{TenantId}}'
# The id of the Azure Subscription that the Sentinel workspace is in.
SubscriptionId: '{{SubscriptionId}}'
# The name of the Resource Group that the Sentinel workspace is in.
ResourceGroupName: '{{ResourceGroupName}}'
# The name of the Sentinel workspace.
WorkspaceName: '{{WorkspaceName}}'
대상: Kusto
이러한 설정은 Target이 Kusto인 KQL 기술에 유효합니다.
Settings:
# The Kusto cluster URL.
Cluster:
# The Kusto database name.
Database:
예제
Descriptor:
Name: SampleDefenderKQL
DisplayName: My Sample Defender KQL Plugin
Description: Skills to query email logs in M365 Advanced Hunting
SkillGroups:
- Format: KQL
Skills:
- Name: GetLatestEmailsByRecipient
DisplayName: Get Latest Emails By Recipient
Description: Fetches the latest emails received by the user with the specified email address
Inputs:
- Name: email
Description: The email address of the recipient
Required: true
Settings:
Target: Defender
Template: |-
EmailEvents
| where RecipientEmailAddress =~ '{{email}}'
| project Timestamp, NetworkMessageId, SenderFromAddress, SenderDisplayName, Subject, DeliveryLocation
| top 100 by Timestamp desc
Descriptor:
Name: Get sample data from Sentinel Data Lake
DisplayName: Sentinel Data Lake Get sample data from Sentinel Graph
Description: Query Sentinel Data Lake to get sample security data
SkillGroups:
- Format: KQL
Skills:
- Name: GetInsightsfromMSG
DisplayName: Get top 10 insights results from Sentinel Graph
Description: Querying Insights table to gather top 10 insights from Sentinel Graph
Settings:
Target: SentinelDataLake
Template: |-
InsightsMetrics
| take 10