Communitygithub.com

building-cloud-siem-with-sentinel

Microsoft Sentinel 기반 클라우드 네이티브 SIEM/SOAR 구축을 위해 멀티 클라우드 데이터 커넥터(AWS, Azure, GCP)를 구성하고, KQL 탐지 및 헌팅 쿼리를 작성하며, Logic Apps 자동 응답 플레이북을 설계합니다. 멀티 클라우드 환경의 중앙 SOC 구축, 레거시 SIEM 마이그레이션, 페타바이트 규모 위협 헌팅 시 활용합니다. AWS 전용 환경(AWS Security Hub/GuardDuty로 충분한 경우)이나 엔드포인트 EDR이 필요한 경우에는 사용하지 마십시오.

building-cloud-siem-with-sentinel란 무엇인가요?

이 스킬은 Microsoft Sentinel을 클라우드 네이티브 SIEM/SOAR 플랫폼으로 배포하고 운영하는 전체 워크플로를 제공합니다. Azure, AWS, GCP 등 멀티 클라우드 환경에서 중앙 집중식 보안 운영 센터(SOC)를 구축하려는 보안 엔지니어를 위해 설계되었습니다. 주요 기능으로는 Log Analytics 워크스페이스 프로비저닝, Kusto Query Language(KQL) 기반 탐지 규칙 작성, Azure Logic Apps를 활용한 자동화된 응답 플레이북 구축, Microsoft 위협 인텔리전스 통합, Sentinel 데이터 레이크를 통한 장기 보존 및 고급 헌팅이 포함됩니다. 이 스킬은 명령줄 예제, KQL 쿼리, Logic Apps 정의를 통해 실무 중심의 접근 방식을 제공하며, 사용자는 사이버 킬 체인 전체에 걸친 공격을 탐지하고 자동으로 대응할 수 있습니다. AWS 전용 환경이나 엔드포인트 탐지가 필요한 경우에는 적합하지 않습니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mukul975/Anthropic-Cybersecurity-Skills/tree/main/skills/building-cloud-siem-with-sentinel

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Sentinel을 활용한 클라우드 SIEM 구축

사용 시기

  • 멀티 클라우드 환경을 위한 중앙 집중식 보안 운영 센터를 구축할 때
  • 레거시 SIEM 플랫폼(Splunk, QRadar)에서 클라우드 네이티브 아키텍처로 마이그레이션할 때
  • 클라우드 특화 위협에 대한 자동화된 인시던트 대응 워크플로를 구축할 때
  • 페타바이트 규모의 보안 원격 분석에서 대규모 위협 헌팅을 수행할 때
  • 위협 인텔리전스 피드를 클라우드 보안 로그 분석과 통합할 때

사용하지 말아야 할 경우: AWS 전용 환경에서 AWS Security Hub와 GuardDuty로 충분한 경우, EDR 기능이 필요한 엔드포인트 탐지(Defender for Endpoint 사용), 또는 규정 준수 상태 모니터링(building-cloud-security-posture-management 참조).

사전 요구 사항

  • Log Analytics 워크스페이스에서 Microsoft Sentinel이 활성화된 Azure 구독
  • 대상 로그 소스(AWS CloudTrail, Azure Activity, GCP)에 대한 데이터 커넥터 권한
  • 자동화된 응답 플레이북을 위한 Logic Apps 또는 Azure Functions
  • 탐지 규칙 및 헌팅 쿼리 작성을 위한 KQL(Kusto Query Language) 숙련도

워크플로

단계 1: Sentinel 워크스페이스 및 데이터 커넥터 프로비저닝

보안 데이터에 최적화된 Log Analytics 워크스페이스를 생성하고 멀티 클라우드 수집을 위한 데이터 커넥터를 활성화합니다.

# Log Analytics 워크스페이스 생성
az monitor log-analytics workspace create \
  --resource-group security-rg \
  --workspace-name sentinel-workspace \
  --location eastus \
  --retention-time 365 \
  --sku PerGB2018

# 워크스페이스에서 Microsoft Sentinel 활성화
az sentinel onboarding-state create \
  --resource-group security-rg \
  --workspace-name sentinel-workspace

# AWS CloudTrail 커넥터 활성화
az sentinel data-connector create \
  --resource-group security-rg \
  --workspace-name sentinel-workspace \
  --data-connector-id aws-cloudtrail \
  --kind AmazonWebServicesCloudTrail \
  --aws-cloud-trail-data-connector '{
    "awsRoleArn": "arn:aws:iam::123456789012:role/SentinelCloudTrailRole",
    "dataTypes": {"logs": {"state": "Enabled"}}
  }'

# Azure AD 로그인 및 감사 로그 활성화
az sentinel data-connector create \
  --resource-group security-rg \
  --workspace-name sentinel-workspace \
  --data-connector-id azure-ad \
  --kind AzureActiveDirectory \
  --azure-active-directory '{
    "dataTypes": {
      "alerts": {"state": "Enabled"},
      "signinLogs": {"state": "Enabled"},
      "auditLogs": {"state": "Enabled"}
    }
  }'

단계 2: KQL 탐지 규칙 작성

Kusto Query Language를 사용하여 클라우드 특화 위협을 탐지하는 분석 규칙을 만듭니다. 각 규칙을 MITRE ATT&CK 기법에 매핑합니다.

// 불가능한 이동 탐지 - 지리적으로 먼 위치에서의 로그인
let timeframe = 1h;
let distance_threshold = 500; // km
SigninLogs
| where TimeGenerated > ago(timeframe)
| where ResultType == 0 // 성공적인 로그인만
| project TimeGenerated, UserPrincipalName, IPAddress, Location,
          Latitude = toreal(LocationDetails.geoCoordinates.latitude),
          Longitude = toreal(LocationDetails.geoCoordinates.longitude)
| sort by UserPrincipalName asc, TimeGenerated asc
| extend PrevLatitude = prev(Latitude, 1), PrevLongitude = prev(Longitude, 1),
         PrevTime = prev(TimeGenerated, 1), PrevUser = prev(UserPrincipalName, 1)
| where UserPrincipalName == PrevUser
| extend TimeDiff = datetime_diff('minute', TimeGenerated, PrevTime)
| where TimeDiff < 60
| extend Distance = geo_distance_2points(Longitude, Latitude, PrevLongitude, PrevLatitude) / 1000
| where Distance > distance_threshold
| project TimeGenerated, UserPrincipalName, IPAddress, Location, Distance, TimeDiff
// CloudTrail에서 AWS IAM 자격 증명 남용 탐지
AWSCloudTrail
| where TimeGenerated > ago(24h)
| where EventName in ("ConsoleLogin", "AssumeRole", "GetSessionToken")
| where ErrorCode == ""
| summarize LoginCount = count(), DistinctIPs = dcount(SourceIpAddress),
            IPList = make_set(SourceIpAddress, 10)
            by UserIdentityArn, bin(TimeGenerated, 1h)
| where DistinctIPs > 3
| project TimeGenerated, UserIdentityArn, LoginCount, DistinctIPs, IPList
// 대량 S3 객체 삭제 탐지 (잠재적 랜섬웨어)
AWSCloudTrail
| where TimeGenerated > ago(1h)
| where EventName == "DeleteObject" or EventName == "DeleteObjects"
| summarize DeleteCount = count(), BucketsAffected = dcount(RequestParameters_bucketName)
            by UserIdentityArn, bin(TimeGenerated, 10m)
| where DeleteCount > 100
| project TimeGenerated, UserIdentityArn, DeleteCount, BucketsAffected

단계 3: Logic Apps로 SOAR 플레이북 구축

분석 규칙이 인시던트를 트리거할 때 실행되는 자동화된 응답 플레이북을 만듭니다. 일반적인 작업으로는 사용자 차단, 리소스 격리, 위협 인텔리전스로 경고 보강 등이 있습니다.

{
  "definition": {
    "triggers": {
      "Microsoft_Sentinel_incident": {
        "type": "ApiConnectionWebhook",
        "inputs": {
          "body": {"incidentArmId": "subscriptions/@{triggerBody()?['workspaceInfo']?['SubscriptionId']}/resourceGroups/@{triggerBody()?['workspaceInfo']?['ResourceGroupName']}/providers/Microsoft.OperationalInsights/workspaces/@{triggerBody()?['workspaceInfo']?['WorkspaceName']}/providers/Microsoft.SecurityInsights/Incidents/@{triggerBody()?['object']?['properties']?['incidentNumber']}"},
          "host": {"connection": {"name": "@parameters('$connections')['microsoftsentinel']['connectionId']"}}
        }
      }
    },
    "actions": {
      "Get_incident_entities": {
        "type": "ApiConnection",
        "inputs": {"method": "post", "path": "/Incidents/entities"}
      },
      "For_each_account_entity": {
        "type": "Foreach",
        "foreach": "@body('Get_incident_entities')?['Accounts']",
        "actions": {
          "Disable_Azure_AD_user": {
            "type": "ApiConnection",
            "inputs": {
              "method": "PATCH",
              "path": "/v1.0/users/@{items('For_each_account_entity')?['AadUserId']}",
              "body": {"accountEnabled": false}
            }
          },
          "Add_comment_to_incident": {
            "type": "ApiConnection",
            "inputs": {
              "body": {"message": "사용자 @{items('For_each_account_entity')?['Name']}이(가) 자동 플레이북에 의해 비활성화되었습니다."}
            }
          }
        }
      }
    }
  }
}

단계 4: 장기 헌팅을 위한 Sentinel 데이터 레이크 구성

페타바이트 규모의 로그 보존과 KQL 및 SQL 엔드포인트를 사용한 고급 위협 헌팅을 위해 Sentinel 데이터 레이크를 활성화합니다.

// 위협 헌팅 쿼리: AWS 계정 간 측면 이동 탐지
let suspicious_roles = AWSCloudTrail
| where TimeGenerated > ago(7d)
| where EventName == "AssumeRole"
| extend AssumedRoleArn = tostring(parse_json(RequestParameters).roleArn)
| where AssumedRoleArn contains "cross-account" or AssumedRoleArn contains "admin"
| summarize AssumeCount = count(), UniqueSourceAccounts = dcount(RecipientAccountId)
            by UserIdentityArn, AssumedRoleArn
| where AssumeCount > 10 and UniqueSourceAccounts > 2;
suspicious_roles
| join kind=inner (
    AWSCloudTrail
    | where TimeGenerated > ago(7d)
    | where EventName in ("RunInstances", "CreateFunction", "PutBucketPolicy")
) on UserIdentityArn
| project TimeGenerated, UserIdentityArn, AssumedRoleArn, EventName, SourceIpAddress

단계 5: 위협 인텔리전스 통합

위협 인텔리전스 공급자를 연결하고 알려진 악성 인프라와의 통신을 탐지하는 지표 기반 매칭 규칙을 만듭니다.

# Microsoft 위협 인텔리전스 커넥터 활성화
az sentinel data-connector create \
  --resource-group security-rg \
  --workspace-name sentinel-workspace \
  --data-connector-id microsoft-ti \
  --kind MicrosoftThreatIntelligence \
  --microsoft-threat-intelligence '{
    "dataTypes": {"microsoftEmergingThreatFeed": {"lookbackPeriod": "2025-01-01T00:00:00Z", "state": "Enabled"}}
  }'
// 네트워크 지표를 클라우드 흐름 로그와 매칭
let TI_IPs = ThreatIntelligenceIndicator
| where TimeGenerated > ago(30d)
| where isnotempty(NetworkIP)
| distinct NetworkIP;
AzureNetworkAnalytics_CL
| where TimeGenerated > ago(24h)
| where DestIP_s in (TI_IPs)
| project TimeGenerated, SrcIP_s, DestIP_s, DestPort_d, FlowType_s

주요 개념

용어정의
KQLKusto Query Language, Microsoft Sentinel의 기본 쿼리 언어로 보안 데이터 검색, 분석, 시각화에 사용
분석 규칙Sentinel의 탐지 논리로, 일정에 따라 로그 데이터를 평가하고 조건이 일치하면 인시던트 생성
SOAR 플레이북인시던트에 의해 트리거되는 자동화된 워크플로로, 계정 차단, 경고 보강, 팀 알림 등의 응답 작업 수행
데이터 커넥터클라우드 서비스, ID 공급자, 타사 도구의 보안 로그를 Sentinel로 수집하는 통합 모듈
Sentinel 데이터 레이크페타바이트 규모의 스토리지 계층으로 장기 로그 보존을 제공하며, 고급 헌팅을 위한 KQL 및 SQL 쿼리 인터페이스 지원
통합 문서보안 데이터, 추세, 운영 지표의 시각화를 표시하는 Sentinel의 대화형 대시보드
감시 목록Sentinel의 참조 데이터 테이블로 VIP 사용자 목록이나 승인된 IP 범위 등 컨텍스트로 경고를 보강하는 데 사용
Fusion 탐지머신 러닝 기반 상관 분석 엔진으로, 데이터 소스 전반에서 다단계 공격을 자동으로 탐지

도구 및 시스템

  • Microsoft Sentinel: Azure Log Analytics 기반의 클라우드 네이티브 SIEM/SOAR 플랫폼으로 AI 기반 위협 탐지 제공
  • Azure Logic Apps: Sentinel 인시던트에 의해 트리거되는 SOAR 플레이북 구축을 위한 로우 코드 자동화 플랫폼
  • Microsoft Threat Intelligence: 통합된 위협 피드로 보안 로그와 매칭할 IP, 도메인, URL 지표 제공
  • Azure Data Explorer: Sentinel KQL 쿼리의 기반이 되는 고성능 분석 엔진으로 대규모 데이터 탐색 지원
  • MITRE ATT&CK Navigator: Sentinel 탐지 규칙을 공격자 전술 및 기술에 매핑하기 위한 프레임워크

일반 시나리오

시나리오: 클라우드 간 자격 증명 탈취 캠페인 탐지

컨텍스트: 공격자가 피싱을 통해 Azure AD 계정을 탈취하고, 연합 ID를 사용하여 해당 계정으로 AWS 리소스에 접근합니다. Sentinel은 Azure AD 로그인 이상 징후와 비정상적인 AWS API 활동을 상호 연관시켜야 합니다.

접근 방식:

  1. Azure AD 불가능한 이동 또는 비정상 로그인 위험을 탐지하는 분석 규칙 생성
  2. 손상된 Azure AD ID를 AWS CloudTrail AssumeRoleWithSAML 이벤트와 상호 연관시키는 KQL 쿼리 작성
  3. Azure AD 위험 이벤트와 이후 AWS 권한 상승 활동을 연결하는 Fusion 탐지 규칙 구축
  4. Azure AD 계정을 자동으로 비활성화하고 AWS STS 세션을 해지하는 SOAR 플레이북 배포
  5. 초기 침해부터 AWS로의 측면 이동까지 타임라인을 보여주는 통합 문서 생성
  6. 데이터 레이크에서 헌팅 쿼리를 실행하여 다른 계정에 영향을 미치는 유사한 패턴 확인

주의사항: 클라우드 공급자 간 ID를 상호 연관시키지 않으면 전체 공격 체인을 놓칠 수 있습니다. 분석 규칙 빈도를 너무 낮게 설정하면(예: 24시간) 공격자가 탐지되지 않고 수시간 동안 액세스할 수 있습니다.

출력 형식

Microsoft Sentinel SOC 운영 보고서
==========================================
워크스페이스: sentinel-workspace
데이터 소스: 14개 커넥터 활성화
보고 기간: 2025-02-01 ~ 2025-02-23

데이터 수집:
  Azure AD 로그인 로그:     2.3 TB (23일)
  AWS CloudTrail:            1.8 TB (23일)
  Azure 활동 로그:           0.9 TB (23일)
  Defender for Cloud 경고:   45 GB (23일)
  총 수집량:                 5.1 TB

탐지 요약:
  활성 분석 규칙: 87개
  생성된 인시던트: 234개
    심각: 8 | 높음: 34 | 중간: 89 | 낮음: 103
  평균 탐지 시간(MTTD): 4.2분
  평균 대응 시간(MTTR): 18분

주요 인시던트 유형:
  불가능한 이동 탐지:          42건
  AWS 승인되지 않은 API 호출 패턴: 28건
  S3 대량 파일 삭제:            3건
  의심스러운 Azure AD 앱 등록: 12건

자동화:
  실행된 플레이북: 156회
  자동 비활성화된 계정: 23개
  자동 보강된 인시던트: 198개
  오탐률: 12%

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

abusing-dpapi-for-credential-access

Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys) online or offline using SharpDPAPI, SharpChrome, Mimikatz, or Impacket

abusing-shadow-credentials-for-privesc

Take over Active Directory accounts by writing attacker-controlled public keys to msDS-KeyCredentialLink (Shadow Credentials) with pyWhisker, Whisker, or Certipy, then authenticate via PKINIT to recover the target

achieving-cmmc-level-2-compliance

>-

acquiring-disk-image-with-dd-and-dcfldd

Create forensically sound bit-for-bit disk images with dd or dcfldd on a Linux forensic workstation, preserving evidence integrity through hash verification (MD5/SHA) during acquisition. Use when imaging a suspect drive, USB device, or memory card for investigation, preserving volatile disk evidence during incident response, or producing a verified copy for legal or law-enforcement proceedings before any destructive analysis.

analyzing-active-directory-acl-abuse

Detect dangerous ACL misconfigurations in Active Directory using ldap3

analyzing-android-malware-with-apktool

Perform static analysis of Android APK malware using apktool for resource decompilation, jadx for Java source recovery, and androguard for manifest inspection, dangerous permission-combination detection, and identification of obfuscated code, dynamic code loading, and reflection-based API calls. Use to statically triage a suspicious APK without executing it or to build mobile malware detection rules.

analyzing-api-gateway-access-logs

Parses API Gateway access logs (AWS API Gateway, Kong, Nginx) to detect

analyzing-apt-group-with-mitre-navigator

Query ATT&CK data with attackcti, mitreattack-python, and stix2, then build MITRE ATT&CK Navigator layers and multi-layer heatmap overlays mapping one or more APT groups

analyzing-azure-activity-logs-for-threats

Queries Azure Monitor activity logs and sign-in logs via azure-monitor-query

analyzing-bootkit-and-rootkit-samples

Analyzes bootkit and advanced rootkit malware infecting the Master

analyzing-browser-forensics-with-hindsight

Parse Chromium-based browser databases with Hindsight to extract and correlate browsing history, downloads, cookies, cached content, autofill data, saved passwords, and extensions from Chrome, Edge, Brave, Opera, and Vivaldi into a unified timeline (XLSX, JSON, or SQLite output). Use during incident response, insider-threat investigations, or criminal cases when you need to reconstruct a user

analyzing-campaign-attribution-evidence

Systematically evaluate cyber-campaign evidence to attribute an operation to a threat actor, using the Diamond Model and Analysis of Competing Hypotheses (ACH) to weigh infrastructure overlaps, TTP consistency, malware code similarity, and timing/language artifacts into confidence-weighted attribution assessments. Use when an incident investigation needs a defensible attribution confidence level.

analyzing-certificate-transparency-for-phishing

Monitor Certificate Transparency logs using crt.sh and Certstream to

analyzing-cloud-storage-access-patterns

Detect abnormal access in AWS S3, GCS, and Azure Blob Storage by analyzing CloudTrail Data Events, GCS audit logs, and Azure Storage Analytics for after-hours bulk downloads, new-IP access, and API-call spikes (e.g. GetObject) via statistical baselines and time-series anomaly detection. Use when investigating suspected cloud data exfiltration or building related detection rules.

analyzing-cobalt-strike-beacon-configuration

Extract and analyze Cobalt Strike beacon configuration from PE files

analyzing-cobaltstrike-malleable-c2-profiles

Parse and analyze Cobalt Strike Malleable C2 profiles with dissect.cobaltstrike (profiles and beacon-payload configs) and pyMalleableC2 (AST parsing) to extract HTTP/DNS transforms, URIs, headers, sleep/jitter, and injection behavior, then generate network detection signatures. Use when reverse-engineering a captured malleable profile or building detections against Cobalt Strike Beacon traffic.

analyzing-command-and-control-communication

Analyzes malware C2 communication over HTTP, HTTPS, DNS, and custom

analyzing-cyber-kill-chain

Analyzes intrusion activity against the Lockheed Martin Cyber Kill Chain

analyzing-disk-image-with-autopsy

Perform comprehensive forensic analysis of raw (dd), E01, or AFF disk images with Autopsy and The Sleuth Kit, recovering deleted files, examining metadata and embedded artifacts, keyword searching, and building investigation timelines with visual reports. Use for structured analysis of a forensic disk image or when stakeholders need visual reports from evidence.

analyzing-dns-logs-for-exfiltration

Analyzes DNS query logs to detect data exfiltration via DNS tunneling,

관련 스킬