SOC Prime Bias: Critical

08 Jun 2026 19:33 UTC

GammaSteel: Gamaredon의 전개되는 악성코드 체인 내부

Author Photo
SOC Prime Team linkedin icon 팔로우
GammaSteel: Gamaredon의 전개되는 악성코드 체인 내부
shield icon

Detection stack

  • AIDR
  • Alert
  • ETL
  • Query

요약

보고서는 무파일 PowerShell 훔치기를 기반으로 하는 새로운 Gamaredon (UAC-0010) 침입 경로인 GammaSteel을 설명합니다. 이 악성코드는 71개의 암호화된 함수를 HKCUPrinters 레지스트리 키에 저장하고 Windows DPAPI로 보호합니다. 로컬 드라이브, USB 미디어, 실시간 편집 중인 문서에서 데이터를 수집한 후 MD5로 데이터를 중복 제거하여 합법적인 S3 호환 서비스 Tebi.io로 탈취합니다. 탈출 실패 시에는 하드코딩된 러시아 도메인으로 탈출합니다. 더 넓은 인프라는 Telegram, Telegra.ph, Write.as, Rentry.co 및 Mastodon과 같은 공공 플랫폼에 호스팅된 휴대용 해설자를 사용하고 동적 DNS 서비스를 이용합니다. 캠페인은 우크라이나 정부 및 주요 인프라 환경을 계속해서 공격합니다.

조사

Sekoia.io는 70개 이상의 아티팩트를 분석하고, 완전한 PowerShell 드로퍼를 재구축하며, 레지스트리 기반 지속성, 뮤텍스, 숨겨진 예약된 PowerShell 실행 및 다중 계층 탈출 시스템을 식별했습니다. 연구진은 휴대용 해설자 인프라를 매핑하고, 115개의 IP 주소, 4개의 도메인 및 여러 S3 자격 증명 세트를 카탈로그화하여 Mastodon 게시물을 통한 자동 업데이트를 관찰했습니다. 연구진은 특히 레지스트리에 저장된 DPAPI로 암호화된 페이로드의 사용이 2020년 InvisiMole 활동과의 유사성을 강조했습니다.

완화

조직은 HKCUPrinters에 대한 비정상적인 기록, 숨겨진 PowerShell 프로세스 생성, Globalassembly307 뮤텍스 사용을 모니터링해야 합니다. 식별된 S3 엔드포인트 s3.tebi.iojustsstop.ru and 165.22.170.129 와 같은 대체 인프라로의 아웃바운드 트래픽은 차단되어야 합니다. 방어자는 PowerShell 스크립트를 호출하는 레지스트리 실행 항목 및 특정 iPhone 스타일 사용자 에이전트 문자열에 대한 탐지를 배포해야 합니다.

대응

GammaSteel 활동이 감지되면 감염된 호스트를 격리하고, HKCUPrinters 레지스트리 하이브를 수집하고, 피해자의 마스터 키를 사용해 가능한 경우 DPAPI로 보호된 페이로드를 추출 및 복호화합니다. 관련 아티팩트를 환경에서 탐색하고, 식별된 명령 및 제어 URL과 도메인을 차단하고, 손상된 자격 증명을 재설정하며, 추가적인 악성 모듈을 식별하기 위해 전체 포렌식 검토를 수행합니다.

"graph TB %% Class definitions classDef technique fill:#e6f7ff classDef process fill:#ffebcc classDef action fill:#c2f0c2 classDef tool fill:#dddddd classDef storage fill:#ffe6e6 classDef network fill:#d9d9ff classDef data fill:#f0e68c %% Nodes u2013 techniques tech_T1027_009["<b>Technique</b> – <b>T1027.009 Embedded Payloads</b><br/>Obfuscates payload within another file"] class tech_T1027_009 technique tech_T1027_007["<b>Technique</b> – <b>T1027.007 Dynamic API Resolution</b><br/>Resolves APIs at runtime to avoid static analysis"] class tech_T1027_007 technique tech_T1027_002["<b>Technique</b> – <b>T1027.002 Software Packing</b><br/>Packages malicious code to hide its true nature"] class tech_T1027_002 technique tech_T1027_013["<b>Technique</b> – <b>T1027.013 Encrypted/Encoded File</b><br/>Encrypts data using DPAPI before storage"] class tech_T1027_013 technique tech_T1547_001["<b>Technique</b> – <b>T1547.001 Registry Run Keys / Startup Folder</b><br/>Adds a Run key to achieve persistence"] class tech_T1547_001 technique tech_T1037_005["<b>Technique</b> – <b>T1037.005 Startup Items</b><br/>Uses startup items for persistence"] class tech_T1037_005 technique tech_T1680["<b>Technique</b> – <b>T1680 Local Storage Discovery</b><br/>Discovers local drives and user profiles"] class tech_T1680 technique tech_T1135["<b>Technique</b> – <b>T1135 Network Share Discovery</b><br/>Finds shared network locations"] class tech_T1135 technique tech_T1006["<b>Technique</b> – <b>T1006 Direct Volume Access</b><br/>Accesses removable media directly"] class tech_T1006 technique tech_T1025["<b>Technique</b> – <b>T1025 Data from Removable Media</b><br/>Collects data from USB devices"] class tech_T1025 technique tech_T1564_005["<b>Technique</b> – <b>T1564.005 Hidden File System</b><br/>Stores files in hidden locations"] class tech_T1564_005 technique tech_T1005["<b>Technique</b> – <b>T1005 Data from Local System</b><br/>Collects files from the local machine"] class tech_T1005 technique tech_T1537["<b>Technique</b> – <b>T1537 Transfer Data to Cloud Account</b><br/>Uploads stolen data to cloud storage"] class tech_T1537 technique tech_T1538["<b>Technique</b> – <b>T1538 Cloud Service Dashboard</b><br/>Uses cloud service interfaces for data exfiltration"] class tech_T1538 technique tech_T1102_001["<b>Technique</b> – <b>T1102.001 Web Service: Dead Drop Resolver</b><br/>Retrieves commands and configuration from public web services"] class tech_T1102_001 technique tech_T1620["<b>Technique</b> – <b>T1620 Reflective Code Loading</b><br/>Loads and executes code received at runtime"] class tech_T1620 technique %% Nodes u2013 actions and components malware_dropper["<b>Malware</b> – <b>Name</b>: Initial Dropper<br/><b>Description</b>: Executes obfuscated PowerShell script"] class malware_dropper process process_powershell["<b>Process</b> – <b>Name</b>: PowerShell<br/><b>Role</b>: Runs encoded script"] class process_powershell process storage_dpapi["<b>Storage</b> – <b>Location</b>: HKCUPrinters<br/><b>Content</b>: 71 functions encrypted with DPAPI"] class storage_dpapi storage persistence_runkey["<b>Action</b> – <b>Persistence</b>: Registry Run key<br/><b>Key</b>: HKCUSoftwareMicrosoftWindowsCurrentVersionRun"] class persistence_runkey action process_hidden_ps["<b>Process</b> – <b>Name</b>: Hidden PowerShell<br/><b>Purpose</b>: Reads orchestrator from registry"] class process_hidden_ps process orchestrator["<b>Action</b> – <b>Orchestrator</b>: Enumerates resources and coordinates collection"] class orchestrator action enumeration["<b>Action</b> – <b>Enumeration</b>: Drives, profiles, network shares"] class enumeration action collection["<b>Action</b> – <b>Collection</b>: Gathers files from local and network locations"] class collection action monitor_usb["<b>Action</b> – <b>USB Monitoring</b>: WMI event subscription for removable media"] class monitor_usb action staging_folder["<b>Storage</b> – <b>Hidden Folder</b>: Staging area for copied files"] class staging_folder storage fs_watcher["<b>Process</b> – <b>Name</b>: FileSystemWatcher<br/><b>Function</b>: Monitors nonu2011USB drives for changes"] class fs_watcher process deduplication["<b>Action</b> – <b>Deduplication</b>: Removes duplicate files before exfiltration"] class deduplication action upload_s3["<b>Action</b> – <b>Upload</b>: Sends data to S3u2011compatible bucket (tebi.io)"] class upload_s3 network fallback_post["<b>Action</b> – <b>Fallback Exfiltration</b>: POST to C2 domains mimicking iPhone UA"] class fallback_post network dead_drop["<b>Action</b> – <b>Dead Drop Resolver</b>: Retrieves config from Telegram, Telegra.ph, Write.as, Rentry.co, Mastodon"] class dead_drop action vbscript_backdoor["<b>Action</b> – <b>Secondary Backdoor</b>: Executes arbitrary VBScript from HTTP response"] class vbscript_backdoor action %% Connections u2013 flow malware_dropper –>|uses| tech_T1027_009 malware_dropper –>|uses| tech_T1027_007 malware_dropper –>|uses| tech_T1027_002 malware_dropper –>|stores encrypted data| tech_T1027_013 malware_dropper –>|launches| process_powershell process_powershell –>|writes encrypted functions to| storage_dpapi storage_dpapi –>|enables| persistence_runkey persistence_runkey –>|creates| tech_T1547_001 persistence_runkey –>|creates| tech_T1037_005 persistence_runkey –>|starts| process_hidden_ps process_hidden_ps –>|loads orchestrator from registry| orchestrator orchestrator –>|performs| enumeration enumeration –>|covers| tech_T1680 enumeration –>|covers| tech_T1135 orchestrator –>|collects data using| collection collection –>|uses| tech_T1005 collection –>|includes removable media via| tech_T1025 collection –>|includes direct volume access via| tech_T1006 collection –>|triggers| monitor_usb monitor_usb –>|copies files to| staging_folder staging_folder –>|is hidden by| tech_T1564_005 staging_folder –>|monitored by| fs_watcher fs_watcher –>|detects changes and triggers| deduplication deduplication –>|uploads to cloud via| upload_s3 upload_s3 –>|relies on| tech_T1537 upload_s3 –>|fallback to| fallback_post fallback_post –>|relies on| tech_T1538 orchestrator –>|gets updates from| dead_drop dead_drop –>|uses| tech_T1102_001 dead_drop –>|delivers| vbscript_backdoor vbscript_backdoor –>|leverages| tech_T1620 %% Styling assignments class malware_dropper,process_powershell,process_hidden_ps,fs_watcher,orchestrator,monitor_usb,vbscript_backdoor builtin class storage_dpapi,staging_folder builtin class persistence_runkey,enumeration,collection,deduplication,upload_s3,fallback_post,dead_drop action class tech_T1027_009,tech_T1027_007,tech_T1027_002,tech_T1027_013,tech_T1547_001,tech_T1037_005,tech_T1680,tech_T1135,tech_T1006,tech_T1025,tech_T1564_005,tech_T1005,tech_T1537,tech_T1538,tech_T1102_001,tech_T1620 technique "

공격 흐름

시뮬레이션 실행

요구 사항: Telemetry 및 Baseline Pre-flight Check를 통과해야 합니다.

이유: 이 섹션은 탐지 규칙을 트리거하도록 설계된 적 기법(TTP)의 정밀한 실행을 설명합니다. 명령 및 내러티브는 식별된 TTP와 직접적으로 일치하며 탐지 로직에 의해 예상되는 정확한 텔레메트리를 생성하는 것을 목표로 합니다.

  • 공격 내러티브 및 명령:
    공격자는 저권한 사용자 계정을 손상시키고 파일 시스템에 접촉하지 않고 암호화된 PowerShell 페이로드를 준비하고자 합니다. 그들은 Base64로 인코딩된 페이로드를 Run 키에 작성하여 다음 로그인 시 실행되도록 합니다. 규칙의 단일 배제를 피하기 위해 Gamaredon 샘플에서 관찰된 “프린터 스테이징” 패턴을 모방하여 의도적으로 HKCUPrinters 의 하위 키를 사용합니다. not 제외된 값입니다.

  • 회귀 테스트 스크립트:

    # --------------------------------------------------------------
    # Gamaredon PowerShell 레지스트리 스테이징 시뮬레이션 (TC-20260608-A1B2C)
    # --------------------------------------------------------------
    
    # 1. Base64로 인코딩된 무해한 PowerShell 명령 정의(예: 파일 작성)
    $payload = 'Write-Host "Gamaredon simulation executed"' 
    $b64 = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($payload))
    
    # 2. 실행 키(persistence) 통해 페이로드 저장
    $runKey = 'HKCU:SOFTWAREMicrosoftWindowsCurrentVersionRun'
    New-ItemProperty -Path $runKey -Name 'GamaredonStager' -Value "powershell -enc $b64" -PropertyType String -Force
    
    # 3. 같은 페이로드를 “프린터” 키에 준비(파일 없이 스테이징)
    $printerKey = 'HKCU:PrintersYxwHku2chu0bznt3kkyAD'  # 주의: 제외를 피하기 위한 다른 접미사
    New-Item -Path $printerKey -Force | Out-Null
    Set-ItemProperty -Path $printerKey -Name 'EncryptedPS' -Value $b64 -Force
    
    Write-Host "시뮬레이션 완료 – 레지스트리 항목 생성됨."
  • 정리 명령:

    # 실행 키 항목 제거
    Remove-ItemProperty -Path 'HKCU:SOFTWAREMicrosoftWindowsCurrentVersionRun' -Name 'GamaredonStager' -ErrorAction SilentlyContinue
    
    # 프린터 스테이징 키 제거
    Remove-Item -Path 'HKCU:PrintersYxwHku2chu0bznt3kkyAD' -Recurse -Force -ErrorAction SilentlyContinue
    
    Write-Host "정리 완료 – 레지스트리 아티팩트 제거됨."