Spacebar Campaigns

HAW-002 Win01 PowerShell Operational Log

Log ID:
HAW-002
Source:
hanguel-win01
Representative Path:
Microsoft-Windows-PowerShell/Operational
Collection:
Windows Event Log collector, Hanguel AD Agent summary
Current Status:
collector에 탐지 로직 구현. 실제 이벤트 양은 PowerShell logging 설정에 의존
Primary Use:
dc_cred.xml 사용, WinRM command, C$ 접근 관련 PowerShell 흔적 추적

공격 행위 요약

win01에서 Import-Clixml로 credential artifact를 처리하고, Invoke-Command 또는 New-PSDrive를 이용해 DC에 접근하면 PowerShell Operational 로그에 command/script block 단서가 남을 수 있다.

주요 event.action

dc_cred_xml_imported
dc_winrm_command_observed
dc_c_admin_share_access_observed
powershell_lsass_chain_observed

주요 필드

필드의미예시
winlog.channelWindows 로그 채널Microsoft-Windows-PowerShell/Operational
event.code이벤트 ID4103, 4104
messagePowerShell Operational 원문 메시지CommandInvocation(Invoke-Command)
powershell.command.value명령 일부Import-Clixml, Invoke-Command
event.action정규화된 보조 행위dc_winrm_command_observed

커버하는 Techniques Used

TechniqueMapping Reason
T1552 Unsecured Credentialsdc_cred.xml credential object 사용 흔적을 찾는다.
T1021.006 Windows Remote ManagementInvoke-Command 기반 WinRM 접근을 확인한다.
T1021.002 SMB/Windows Admin SharesNew-PSDrive \\10.60.20.10\C$ 접근을 확인한다.

원본 로그 기준 탐색 포인트

관찰할 행위원본 필드/문자열분석 의미
credential XML 사용Import-Clixml, dc_cred.xmlDPAPI credential artifact 사용 여부 확인
WinRM 원격 명령Invoke-Command, ComputerName, 10.60.20.10win01에서 DC 명령 실행 시도 확인
SMB admin share 접근New-PSDrive, \\10.60.20.10\C$DC C$ 접근 흐름 확인
loader staging 명령Copy-Item, hgl_loader.exe, hgl_payload.enc, hgl_run.cmdDC Temp에 loader chain 전달 여부 확인

Analyst Hunting KQL

PowerShell 로그는 Event ID 4103/4104와 원본 command text를 기준으로 먼저 본다.

winlog.channel:"Microsoft-Windows-PowerShell/Operational" and event.code:(4103 or 4104) and message:(*Import-Clixml* or *dc_cred.xml* or *Invoke-Command* or *New-PSDrive*)
winlog.channel:"Microsoft-Windows-PowerShell/Operational" and event.code:(4103 or 4104) and message:(*"10.60.20.10"* or *"\\\\10.60.20.10\\C$"* or *"hanguel-dc01"*)
winlog.channel:"Microsoft-Windows-PowerShell/Operational" and event.code:(4103 or 4104) and message:(*hgl_loader* or *hgl_payload* or *hgl_run* or *lsass*)
winlog.channel:"Microsoft-Windows-PowerShell/Operational" and event.code:(4103 or 4104) and message:(*Copy-Item* and (*hgl_loader.exe* or *hgl_payload.enc* or *hgl_run.cmd*))

Normalized Pivot

log.id:"HAW-002" and event.action:("dc_cred_xml_imported" or "dc_winrm_command_observed" or "dc_c_admin_share_access_observed")