Phantom 3.5 – 가짜 Adobe 설치 프로그램을 통해 전달된 자격 증명 탈취 악성코드
Detection stack
- AIDR
- Alert
- ETL
- Query
요약
팬텀 3.5는 가짜 Adobe 설치 프로그램을 통해 배포되는 자격 증명 탈취 맬웨어입니다. 실행되면 설치 프로그램은 난독화된 .NET DLL (BLACKHAWK.dll)을 가져와 PowerShell 스크립트를 떨어뜨리고 최종 페이로드를 Aspnet_compiler.exe에 주입하여 신뢰할 수 있는 프로세스 컨텍스트에서 실행됩니다.
조사
연구원들은 샌드박스에서 가짜 설치 프로그램을 실행하고 다운로드 위치(positivepay-messages.com/file/floor.ps1)를 캡처했습니다. 그들은 Base64/RC4로 보호된 스크립트를 디코딩하고, 검색된 .NET DLL을 확인했으며, hollows_hunter 및 ProcDump와 같은 도구를 사용하여 Aspnet_compiler.exe에 주입된 것을 확인했습니다. 분석에 따르면 DLL은 분석 방지 조치, Heaven’s Gate 기술, SMTP, FTP, 텔레그램 및 디스코드를 포함한 여러 데이터 탈취 채널을 포함하고 있습니다.
대응 조치
서명되지 않은 PowerShell 스크립트의 실행을 제한하거나 차단하고, 신뢰할 수 없는 DLL 로딩을 막으며, 비정상적인 Aspnet_compiler.exe 프로세스 생성에 대한 모니터링을 실시하세요. 악성 도메인과 경로에 대한 접근을 차단하기 위해 URL 필터링을 적용하세요. 엔드포인트 제어에서 프로세스 주입 패턴과 일반적인 자격 증명 탈취 행위를 감지할 수 있도록 설정하세요.
응답
positivepay-messages.com에 대한 외부 연결, MEMORY 또는 모듈 아티팩트와 관련된 BLACKHAWK.dll, Aspnet_compiler.exe로의 코드 주입 증거에 대해 경고를 발생시키세요. 영향을 받은 호스트를 격리하고 메모리 이미지를 획득하며, 악성 DLL 및 관련 페이로드를 제거하기 위해 전체 포렌식 조사를 수행하세요.
"graph TB %% 클래스 정의 classDef action fill:#99ccff classDef technique fill:#ffcc99 classDef tool fill:#cccccc classDef process fill:#c2f0c2 classDef malware fill:#f9d5e5 %% 노드 u2013 초기 접근 및 실행 action_user_execution["<b>소행</b> – <b>T1204.002 사용자 실행</b>: 피해자가 합법적으로 보이는 가짜 u201cAdobe 11.7.7 설치 프로그램u201d을 실행합니다."] class action_user_execution action tech_masquerade["<b>기술</b> – <b>T1036.008 위장하기</b>: 설치 파일이 Adobe 설치 프로그램처럼 보이기 위해 이름이 변경되고 가려집니다."] class tech_masquerade technique tool_powershell["<b>도구</b> – <b>이름</b>: PowerShell<br/><b>설명</b>: 창을 숨기고 실행 정책을 우회하여 악성 스크립트를 다운로드하고 실행하는 데 사용됩니다."] class tool_powershell tool %% 노드 u2013 난독화 및 디코딩 tech_deobfuscate["<b>기술</b> – <b>T1140 파일의 난독화/디코딩</b>: Base64u2011RC4 페이로드는 실행 전에 디코딩되고 복호화됩니다."] class tech_deobfuscate technique tech_obfuscate["<b>기술</b> – <b>T1027 난독화된 파일</b>: 맬웨어 스크립트는 정적 분석을 피하기 위해 강하게 난독화됩니다."] class tech_obfuscate technique %% 노드 u2013 프로세스 주입 및 반사적 로딩 tech_process_injection["<b>기술</b> – <b>T1055 프로세스 주입</b>: BLACKHAWK.dll은 페이로드를 실행하기 위해 Aspnet_compiler.exe에 주입됩니다."] class tech_process_injection technique process_aspnet_compiler["<b>프로세스</b> – <b>이름</b>: Aspnet_compiler.exe"] class process_aspnet_compiler process tech_reflective_load["<b>기술</b> – <b>T1620 반사적 코드 로딩</b>: .NET 어셈블리가 System.Reflection.Assembly::Load를 사용하여 메모리에 로딩됩니다."] class tech_reflective_load technique %% 노드 u2013 방어 회피 tech_sandbox_evasion["<b>기술</b> – <b>T1497.002 가상화 샌드박스 회피</b>: 사용자 이름과 환경 변수를 확인하여 분석 기계를 탐지합니다."] class tech_sandbox_evasion technique %% 노드 u2013 지속성 tech_active_setup["<b>기술</b> – <b>T1547.014 활성 설정 지속é성</b>: 시작 시 자동 실행을 위해 활성 설정을 통해 실행 레지스트리 키를 생성합니다."] class tech_active_setup technique %% 노드 u2013 자격 증명 접근 및 수집 tech_keylogging["<b>기술</b> – <b>T1056.001 키로깅</b>: 사용자의 키 입력을 캡처합니다."] class tech_keylogging technique tech_browser_cred["<b>기술</b> – <b>T1555.003 브라우저 자격 증명 접근</b>: 웹 브라우저에서 마스터 키, 비밀번호, 쿠키 및 지갑 데이터를 탈취합니다."] class tech_browser_cred technique tech_clipboard["<b>기술</b> – <b>T1115 클립보드 데이터</b>: 시스템 클립보드에서 데이터를 수집합니다."] class tech_clipboard technique tech_screen_capture["<b>기술</b> – <b>T1113 스크린 캡처</b>: 1초 간격으로 스크린샷을 찍습니다."] class tech_screen_capture technique tech_video_capture["<b>기술</b> – <b>T1125 영상 캡처</b>: 사용자의 데스크톱의 비디오 영상을 기록합니다."] class tech_video_capture technique %% 노드 u2013 탈취 tech_smtp_ftp["<b>기술</b> – <b>T1048 대체 프로토콜을 통한 탈취</b>: SMTP 이메일과 FTP 전송을 통해 도난된 데이터를 보냅니다."] class tech_smtp_ftp technique tech_telegram_discord["<b>기술</b> – <b>T1567 웹 서비스를 통한 탈취</b>: Telegram 및 Discord API를 통해 데이터를 전송합니다."] class tech_telegram_discord technique %% 노드 u2013 명령 및 제어 tech_web_service["<b>기술</b> – <b>T1102.002 웹 서비스 양방향 C2</b>: 명령 및 제어를 위한 양방향 통신 채널로 Telegram과 Discord를 사용합니다."] class tech_web_service technique %% 공격 흐름 연결 action_user_execution –>|leads to| tech_masquerade tech_masquerade –>|leads to| tool_powershell tool_powershell –>|executes| tech_deobfuscate tech_deobfuscate –>|supports| tech_obfuscate tech_obfuscate –>|enables| tech_process_injection tech_process_injection –>|targets| process_aspnet_compiler process_aspnet_compiler –>|loads| tech_reflective_load tech_reflective_load –>|facilitates| tech_sandbox_evasion tech_sandbox_evasion –>|allows| tech_active_setup tech_active_setup –>|enables| tech_keylogging tech_keylogging –>|collects| tech_browser_cred tech_browser_cred –>|adds to| tech_clipboard tech_clipboard –>|adds to| tech_screen_capture tech_screen_capture –>|adds to| tech_video_capture tech_video_capture –>|feeds| tech_smtp_ftp tech_video_capture –>|feeds| tech_telegram_discord tech_smtp_ftp –>|exfiltrates via| tech_web_service tech_telegram_discord –>|exfiltrates via| tech_web_service %% 스타일 class action_user_execution action class tech_masquerade,tech_deobfuscate,tech_obfuscate,tech_process_injection,tech_reflective_load,tech_sandbox_evasion,tech_active_setup,tech_keylogging,tech_browser_cred,tech_clipboard,tech_screen_capture,tech_video_capture,tech_smtp_ftp,tech_telegram_discord,tech_web_service technique class tool_powershell tool class process_aspnet_compiler process "
공격 흐름
탐지
의심스러운 Powershell 문자열 (Powershell을 통해)
보기
지연 실행을 위한 시간 초과 사용 가능성 (cmdline을 통해)
보기
비정상적인 코드 페이지 변경 실행 (cmdline을 통해)
보기
지속성 포인트 가능 [ASEPs – Software/NTUSER Hive] (registry_event를 통해)
보기
탐지를 위한 IOCs (HashMd5): 팬텀 3.5: 초기 벡터 분석 및 포렌식
보기
팬텀 3.5 프로세스 주입 via Aspnet_compiler.exe [Windows 프로세스 생성]
보기
숨겨진 속성과 Base64 인코딩된 문자열이 있는 PowerShell 스크립트 실행 [Windows Powershell]
보기
시뮬레이션 실행
사전 조건: Telemetry & Baseline Pre-flight 점검이 통과해야 합니다.
이유: 이 섹션은 탐지 규칙을 작동시키기 위해 설계된 적대자의 기술(TTP)을 정확하게 실행하는 방법을 설명합니다. 명령어와 내러티브는 식별된 TTP를 직접 반영해야 하며 탐지 논리에서 예상하는 정확한 telemetry를 생성하는 것을 목표로 합니다.
-
공격 내러티브 및 명령어:
적대자는 Phantom 3.5 페이로드를 획득하고 디스크 기반 방어를 피하기 위해 메모리에서 실행을 원하는 상황입니다. 그들은Aspnet_compiler.exe라는 신뢰할 수 있는 Windows 바이너리를 사용하여Invoke-ManagedAssembly인수를 통해 악성 관리 어셈블리를 로드합니다. 이는 컴파일러 프로세스를 스폰하고 페이로드를 현재 프로세스 공간에 주입하며 동일한 명령을 반복 실행하는 예약 작업을 만들면서 지속성을 보장합니다.-
악성 관리 어셈블리를 준비하기 (
phantom_payload.dll)을 대상 호스트에 배포합니다. -
주입을 실행하기 사용
Aspnet_compiler.exe:$maliciousDll = "C:Tempphantom_payload.dll" $cmd = "`"$env:WINDIRMicrosoft.NETFramework64v4.0.30319Aspnet_compiler.exe`" -p `"$maliciousDll`" -c `Invoke-ManagedAssembly`" Start-Process -FilePath $cmd -WindowStyle Hidden -
지속성을 생성하기 (선택 사항) 같은 명령을 매 시간 실행하는 예약 작업을 등록하여.
-
-
회귀 테스트 스크립트: 아래의 스크립트는 상기 단계들을 독립적이고 반복 가능한 방식으로 재현합니다.
<# .SYNOPSIS Aspnet_compiler.exe를 사용하여 팬텀 3.5 프로세스 주입을 시뮬레이션합니다. .DESCRIPTION 가짜 악성 DLL을 알려진 위치로 복사한 후 Aspnet_compiler.exe를 `Invoke-ManagedAssembly` 플래그로 실행하여 탐지 규칙이 감시하는 정확한 프로세스 생성 이벤트를 만듭니다. #> # --- 준비 ----------------------------------------------------------- $dllPath = "$env:TEMPphantom_payload.dll" # 가짜 페일로드(실제 페이로드의 자리 표시자)로 작은 더미 DLL 생성 Set-Content -Path $dllPath -Value ([byte[]](0x4D,0x5A,0x90,0x00,0x03,0x00,0x00,0x00)) -Encoding Byte # --- 실행 ------------------------------------------------------------- $aspnetPath = "$env:WINDIRMicrosoft.NETFramework64v4.0.30319Aspnet_compiler.exe" if (-Not (Test-Path $aspnetPath)) { Write-Error "Aspnet_compiler.exe가 예상 위치에 없습니다." exit 1 } $arguments = "-p `"$dllPath`" -c `Invoke-ManagedAssembly`" Write-Host "악성 인수를 사용하여 Aspnet_compiler.exe 실행 중..." Start-Process -FilePath $aspnetPath -ArgumentList $arguments -WindowStyle Hidden -PassThru # --- 선택적 지속성 ---------------------------------------------------- # 매 시간 주입을 반복하는 예약 작업 등록 $taskName = "PhantomInject" $action = New-ScheduledTaskAction -Execute $aspnetPath -Argument $arguments $trigger = New-ScheduledTaskTrigger -Once -At (Get-Date).AddMinutes(5) -RepetitionInterval (New-TimeSpan -Hours 1) -RepetitionDuration ([TimeSpan]::MaxValue) Register-ScheduledTask -TaskName $taskName -Action $action -Trigger $trigger -RunLevel Highest -Force Write-Host "시뮬레이션 완료. 생성된 경고를 보려면 SIEM을 확인하세요." -
정리 명령어: 더미 DLL, 예약 작업 및 남아 있는 프로세스를 제거하세요.
# 더미 DLL 제거 Remove-Item -Path "$env:TEMPphantom_payload.dll" -Force -ErrorAction SilentlyContinue # 예약 작업 해제 Unregister-ScheduledTask -TaskName "PhantomInject" -Confirm:$false -ErrorAction SilentlyContinue # 테스트로 시작된 Aspnet_compiler.exe 프로세스를 종료 Get-Process -Name "Aspnet_compiler" -ErrorAction SilentlyContinue | Stop-Process -Force