SOC Prime Bias: 높음

26 3월 2026 16:24

MITRE ATT&CK T1547.004: 윈로그온 헬퍼 설명

Author Photo
Ruslan Mikhalov SOC Prime에서 위협 연구 책임자 linkedin icon 팔로우
MITRE ATT&CK T1547.004: 윈로그온 헬퍼 설명
shield icon

Detection stack

  • AIDR
  • Alert
  • ETL
  • Query

요약

이 기사는 T1547.004로 추적되는 Winlogon Helper DLL 지속성 방법을 설명하고 적들이 사용자가 로그인할 때 악성 코드를 로드하기 위해 Winlogon 레지스트리 키를 조작하는 방법을 보여줍니다. ToyBraker 캠페인, KamiKakaBot 악성코드 및 Mandela.exe로 알려진 샘플과 연결된 실제 사례를 참조합니다. 초점은 시스템 시작 또는 사용자가 로그인할 때 자동으로 악성 DLL이나 실행 파일을 실행하도록 하는 레지스트리 변경에 있습니다.

조사

연구원들은 공격자들이 무단 사용자 계정을 생성하고 Winlogon 레지스트리 값인 LegalNoticeText, DefaultUserName, AutoLogonCount, Shell 등을 변경하여 접근을 유지하는 것을 문서화했습니다. 악성코드 샘플 및 침입 사례는 또한 net user 및 reg add와 같은 명령줄 도구를 사용하여 악성 설정을 주입하고 로그인 과정에서 PowerShell 페이로드를 실행하는 방법을 보여주었습니다.

완화

방어자들은 Winlogon 레지스트리 키에 대한 수정 사항을 주의 깊게 모니터링하고 제한해야 하며, 계정 생성을 위한 최소 권한 제어를 적용하고 신뢰할 수 없거나 서명되지 않은 DLL을 차단하기 위해 애플리케이션 제어를 사용해야 합니다. 예약된 작업, 서비스, 시작 위치에 대한 정기적인 검토는 무단 지속성 변경을 식별하는 데 추가로 도움이 될 수 있습니다.

대응

의심스러운 Winlogon 레지스트리 활동이 발견되었을 때, 영향을 받은 엔드포인트를 격리하고, 휘발성 증거를 캡처하며, 수정된 레지스트리 값을 알려진 양호한 상태로 복원해야 합니다. 포렌식 조사는 추가적인 지속성 메커니즘을 찾고 관련된 악성코드 구성 요소에 대해 호스트를 스캔해야 합니다.

"graph TB %% Class Definitions Section classDef action fill:#99ccff classDef tool fill:#ffcc99 classDef persistence fill:#c2f0c2 classDef technique fill:#ffd699 classDef malware fill:#f4a6a6 %% Node definitions action_create_account["<b>Action</b> – Create Local Account<br/><b>Technique</b>: T1136.001 Create Account: Local Account<br/><b>Description</b>: Adds a new local user using net user command."] class action_create_account action tool_net_user["<b>Tool</b> – net user command<br/><b>Purpose</b>: Create or modify local Windows accounts."] class tool_net_user tool action_modify_registry["<b>Action</b> – Modify Winlogon Registry<br/><b>Technique</b>: T1112 Modify Registry<br/><b>Description</b>: Alters Winlogon keys (Notify, Userinit, Shell, DefaultUserName, AutoLogonCount) via reg add."] class action_modify_registry action tool_reg_add["<b>Tool</b> – reg add command<br/><b>Purpose</b>: Add or change Windows registry values."] class tool_reg_add tool persistence_winlogon_helper["<b>Persistence</b> – Winlogon Helper DLL<br/><b>Technique</b>: T1547.004 Winlogon Helper DLL<br/><b>Description</b>: Loads malicious DLL or executable during user logon, providing elevated execution."] class persistence_winlogon_helper persistence technique_T1547_004["<b>Technique</b> – T1547.004<br/><b>Name</b>: Winlogon Helper DLL<br/><b>Description</b>: Registers a DLL to be loaded by Winlogon, granting persistence and privilege escalation."] class technique_T1547_004 technique malware_kamkaka["<b>Malware</b> – KamiKakaBot<br/><b>Uses</b>: Winlogon Helper DLL persistence."] class malware_kamkaka malware malware_mandela["<b>Malware</b> – Mandela.exe<br/><b>Uses</b>: Winlogon Helper DLL persistence."] class malware_mandela malware %% Connections showing flow action_create_account –>|uses| tool_net_user action_modify_registry –>|uses| tool_reg_add action_create_account –>|enables| persistence_winlogon_helper action_modify_registry –>|enables| persistence_winlogon_helper persistence_winlogon_helper –>|implements| technique_T1547_004 technique_T1547_004 –>|observed_in| malware_kamkaka technique_T1547_004 –>|observed_in| malware_mandela "

공격 흐름

시뮬레이션 실행

전제 조건: Telemetry & Baseline 사전 점검이 통과해야 합니다.

이유: 이 섹션은 적 기법(T1547.004)의 정확한 실행을 상세히 설명하여 탐지 규칙을 발동하도록 설계됐음을 말합니다. 명령과 서사는 탐지 논리에 의해 기대되는 텔레메트리를 직접 생성합니다.

  • 공격 서술 및 명령:
    로컬 관리자 권한을 얻은 공격자가 재부팅 후에도 지속성을 원합니다. 그들은 사용자 데스크톱이 로드되기 전에 실행되는 클래식 Winlogon ‘Shell’ 하이잭을 선택하여 많은 엔드포인트 AV 제품을 우회합니다. 단계는 다음과 같습니다:

    1. 악성 페이로드 생성 (예: C:Tempevil.exe).
    2. 에 새 값을 추가 HKLMSoftwareMicrosoftWindows NTCurrentVersionWinlogonShell 페이로드를 가리킵니다.
    3. 변경 사항이 적용되었는지 확인한 다음 로그오프/로그온하여 실행을 달성합니다.
  • 회귀 테스트 스크립트:

    #-------------------------------------------------
    # 회귀 테스트 – Winlogon Shell 탈취 (T1547.004)
    #-------------------------------------------------
    param(
        [string]$PayloadPath = "C:Tempevil.exe",
        [string]$BackupPath = "$env:Tempwinlogon_shell_backup.txt"
    )
    
    # 1. 더미 페이로드 배포 (데모를 위한 간단한 calc.exe 복사본)
    if (-not (Test-Path $PayloadPath)) {
        Copy-Item "$env:SystemRootSystem32calc.exe" $PayloadPath -Force
    }
    
    # 2. 현재 Shell 값 백업 (있다면)
    $regPath = "HKLM:SoftwareMicrosoftWindows NTCurrentVersionWinlogon"
    $currentShell = (Get-ItemProperty -Path $regPath -Name Shell -ErrorAction SilentlyContinue).Shell
    Set-Content -Path $BackupPath -Value $currentShell -Encoding UTF8
    
    # 3. 악성 Shell 값 설정
    Set-ItemProperty -Path $regPath -Name Shell -Value $PayloadPath -Force
    
    Write-Host "[+] 악성 Winlogon Shell은 $PayloadPath로 설정되었습니다"
    Write-Host "[+] 원래 값이 $BackupPath에 저장되었습니다"
  • 정리 명령:

    #---------------------------------
    # 정리 – Winlogon Shell 복원
    #---------------------------------
    $regPath = "HKLM:SoftwareMicrosoftWindows NTCurrentVersionWinlogon"
    $backupFile = "$env:Tempwinlogon_shell_backup.txt"
    
    if (Test-Path $backupFile) {
        $original = Get-Content -Path $backupFile -Raw
        if ([string]::IsNullOrWhiteSpace($original)) {
            # 원래 값이 비어있었음 – 속성 제거
            Remove-ItemProperty -Path $regPath -Name Shell -ErrorAction SilentlyContinue
        } else {
            Set-ItemProperty -Path $regPath -Name Shell -Value $original -Force
        }
        Remove-Item $backupFile -Force
        Write-Host "[+] Winlogon Shell이 원래 상태로 복원되었습니다."
    } else {
        Write-Warning "백업 파일을 찾을 수 없음 – 수동 검사 필요."