SOC Prime Bias: 위험

30 4월 2026 17:21

WindowsAudit 백도어: Discord에 숨어있는 .NET RAT 분석

Author Photo
Ruslan Mikhalov SOC Prime에서 위협 연구 책임자 linkedin icon 팔로우
WindowsAudit 백도어: Discord에 숨어있는 .NET RAT 분석
shield icon

Detection stack

  • AIDR
  • Alert
  • ETL
  • Query

요약

Profero IRT는 .NET 8 백도어를 식별하였으며, 이름은 WindowsAudit.exe 입니다. 이 백도어는 Discord를 기본 명령 및 제어 채널로 사용하며, MQTT와 Telegram을 보조 통신 경로로 지원합니다. 이 악성코드는 Windows 서비스로 작동하며, 자신의 백업 사본을 생성하고, 여러 지속성 메커니즘을 설정하며, 자격 증명 탈취, Active Directory 악용 및 방어 회피 활동을 수행합니다. 또한 감지되지 않는 수평 이동을 지원하기 위해 WireGuard 터널을 설정합니다. 전반적인 수법으로 보아 공격자들이 나중에 랜섬웨어 단계로 네트워크를 준비 중일 가능성이 있습니다.

조사

조사관들은 WindowsAudit 바이너리를 확보하고, 그것이 모듈형 C# 원격 액세스 트로이 목마임을 확인한 후, 내장된 DLL 구성 요소의 리버스 엔지니어링을 수행했습니다. 그들의 분석은 악성코드의 지속성 기술, 통신 아키텍처, 자격 증명 덤핑 기능, AMSI와 ETW 패치를 포함한 회피 방법을 상세히 설명했습니다. 이 팀은 또한 WinSATSvc라는 관련 드로퍼를 조사했으며, 제거 시 악성코드를 복원하도록 설계된 것으로 보였습니다. 이 작업을 통해 연구원들은 사냥과 탐지를 지원하기 위한 침해 지표 세트를 추출했습니다.

완화

추천 탐지에는 WindowsAudit 서비스의 생성, 관련된 실행 키 항목, GlobalWindowsAuditSingleInstance 뮤텍스 및 의심스러운 Add-MpPreference 실행에 대한 모니터링이 포함됩니다. 방어자는 Discord 및 HiveMQ 인프라에 대한 TLS 트래픽을 차단하거나 경고해야 하며, 고위험으로 간주되는 bcdedit 안전 부팅 변경 및 의심스러운 예약 작업 생성을 감시해야 합니다. 이 악성코드와 연결된 모든 WireGuard 터널 구성은 제거되어야 하며, 백도어에 의해 설정된 모든 지속성 메커니즘은 비활성화되어야 합니다. bcdedit safe-boot changes and suspicious scheduled task creation. Any WireGuard tunnel configuration tied to the malware should be removed, and all persistence mechanisms established by the backdoor should be disabled.

응답

조직은 즉시 공개된 침해 지표를 탐색하고, 영향을 받은 시스템을 격리하며, WindowsAudit 서비스를 중단해야 합니다. 포렌식 검토를 위해 메모리 및 디스크 이미지를 수집하고, 악성 바이너리를 제거하며, 손상된 자격 증명을 재설정해야 합니다. 보안 팀은 또한 승인되지 않은 EDR 예외가 제거되었는지 확인하고, 안전 모드 구성 변경 사항이 되돌려졌는지 확인하며, 악성코드 구성 요소의 재설치 또는 재생성에 대한 모니터링을 지속해야 합니다.

"graph TB %% 클래스 정의 classDef technique fill:#ffcc99 classDef tool fill:#cccccc classDef malware fill:#ff9999 classDef process fill:#99ff99 classDef operator fill:#ff9900 %% 노드 – 기술 및 도구 exploit_remote_services["<b>기술</b> – <b>T1210 원격 서비스 악용</b><br/>SMB를 통해 악성 바이너리를 원격 호스트에 복사하고 sc.exe로 시작"] class exploit_remote_services technique lateral_smb["<b>기술</b> – <b>T1080 공유 콘텐츠를 통한 수평 이동</b><br/>SMB 공유를 사용하여 전파하고 원격 명령 실행"] class lateral_smb technique wmi_event_sub["<b>기술</b> – <b>T1546.003 Windows 관리 계측 이벤트 구독</b><br/>지속성을 위해 페이로드를 트리거하는 WMI 이벤트 등록"] class wmi_event_sub technique scheduled_task["<b>기술</b> – <b>T1053 예약된 작업/작업</b><br/>EDR을 제거하고 재부팅 후 악성코드를 다시 활성화하는 안전 모드에서 실행되는 작업 생성"] class scheduled_task technique defender_exclusion["<b>기술</b> – <b>T1564.012 아티팩트 숨기기: 파일 경로 제외</b><br/>설치 경로 및 실행 파일에 대해 Windows Defender 예외 추가"] class defender_exclusion technique safe_mode_boot["<b>기술</b> – <b>T1562.009 안전 모드 부팅</b><br/>구성 요소를 재설치하기 위해 안전 모드로 부팅"] class safe_mode_boot technique vpn_proxy["<b>기술</b> – <b>T1090 프록시</b> 및 <b>T1572 프로토콜 터널링</b><br/>WireGuard VPN 및 SOCKS5 프록시를 배포하여 트래픽 터널링"] class vpn_proxy technique c2_discord["<b>기술</b> – <b>T1102.002 웹 서비스: Discord</b><br/>Discord를 기본 명령 및 제어 채널로 사용"] class c2_discord technique c2_mqtt["<b>기술</b> – <b>T1102 웹 서비스 (MQTT)</b><br/>MQTT 브로커를 통한 2차 C2"] class c2_mqtt technique c2_fallback["<b>기술</b> – <b>T1008 대체 채널</b><br/>Discord 사용 불가능 시 MQTT 또는 Telegram으로 전환"] class c2_fallback technique rat["<b>악성코드</b> – 원격 액세스 도구 (RAT)"] class rat malware os_cred_dump["<b>기술</b> – <b>T1003 OS 자격 증명 덤핑</b><br/>MiniDumpWriteDump로 LSASS 메모리 덤프"] class os_cred_dump technique shadow_copy["<b>기술</b> – <b>T1003.007 볼륨 섀도 복사본</b><br/>섀도 복사본을 통해 SAM 및 SYSTEM 하이브 추출"] class shadow_copy technique browser_passwords["<b>기술</b> – <b>T1555.003 웹 브라우저에서 자격 증명</b><br/>DPAPI를 사용하여 저장된 비밀번호 복호화"] class browser_passwords technique cred_manager["<b>기술</b> – <b>T1555.004 Windows 자격 증명 관리자에서 자격 증명</b><br/>저장된 자격 증명 추출"] class cred_manager technique golden_ticket["<b>기술</b> – <b>T1558.001 골든 티켓</b><br/>도메인 관리자용 위조 Kerberos TGT 생성"] class golden_ticket technique silver_ticket["<b>기술</b> – <b>T1558.002 실버 티켓</b><br/>대상 서비스용 서비스 티켓 위조"] class silver_ticket technique pass_hash["<b>기술</b> – <b>T1550.002 해시 사용</b><br/>NTLM 해시 재사용하여 인증"] class pass_hash technique pass_ticket["<b>기술</b> – <b>T1550.003 티켓 사용</b><br/>수평 이동을 위해 Kerberos 티켓 재사용"] class pass_ticket technique dc_sync["<b>기술</b> – <b>T1003.006 DCSync</b><br/>비밀번호 데이터를 복제하도록 도메인 컨트롤러 강제"] class dc_sync technique dc_auth["<b>기술</b> – <b>T1556.001 도메인 컨트롤러 인증</b><br/>DC의 인증 프로세스 수정"] class dc_auth technique process_hollowing["<b>기술</b> – <b>T1055.012 프로세스 허로잉</b><br/>고급 프로세스에 코드 주입"] class process_hollowing technique apc_injection["<b>기술</b> – <b>T1055.004 비동기 프로시저 호출</b><br/>APC를 통해 코드 주입"] class apc_injection technique clear_event_logs["<b>기술</b> – <b>T1070.001 Windows 이벤트 로그 지우기</b><br/>활동의 증거 제거"] class clear_event_logs technique screen_capture["<b>기술</b> – <b>T1113 화면 캡처</b><br/>스크린샷 캡처"] class screen_capture technique video_capture["<b>기술</b> – <b>T1125 비디오 캡처</b><br/>데스크톱 비디오 기록"] class video_capture technique audio_capture["<b>기술</b> – <b>T1123 오디오 캡처</b><br/>마이크 오디오 기록"] class audio_capture technique keylogging["<b>기술</b> – <b>T1056.001 키로깅</b><br/>키 입력 캡처"] class keylogging technique exfil_discord["<b>기술</b> – <b>T1041 명령 및 제어 채널을 통한 데이터 유출</b><br/>Discord 첨부 파일로 데이터 업로드"] class exfil_discord technique exfil_mqtt["<b>기술</b> – <b>T1041 명령 및 제어 채널을 통한 데이터 유출</b><br/>MQTT 메시지를 통해 데이터 전송"] class exfil_mqtt technique %% 논리 연산자 (선택 사항) op_and1(("AND")) class op_and1 operator %% 연결 – 공격 흐름 exploit_remote_services –>|바이너리를 SMB로 복사| lateral_smb lateral_smb –>|sc.exe로 원격 명령 실행| wmi_event_sub wmi_event_sub –>|지속성 제공| scheduled_task scheduled_task –>|안전 모드에서 실행| safe_mode_boot safe_mode_boot –>|악성코드 재활성화| vpn_proxy vpn_proxy –>|트래픽 터널링| c2_discord c2_discord –>|기본 C2 채널| rat rat –>|자격 증명 수집| os_cred_dump os_cred_dump –>|LSASS 덤프 획득| shadow_copy os_cred_dump –>|피드| browser_passwords os_cred_dump –>|피드| cred_manager os_cred_dump –>|활성화| golden_ticket os_cred_dump –>|활성화| silver_ticket golden_ticket –>|도메인 관리자 접근 제공| pass_hash silver_ticket –>|서비스 접근 제공| pass_ticket rat –>|사용| pass_hash rat –>|사용| pass_ticket rat –>|사용| dc_sync rat –>|사용| dc_auth rat –>|프로세스 허로잉을 통해 상승| process_hollowing rat –>|APC 주입을 통해 상승| apc_injection rat –>|로그 삭제| clear_event_logs rat –>|캡처| screen_capture rat –>|캡처| video_capture rat –>|캡처| audio_capture rat –>|캡처| keylogging screen_capture –>|Discord로 유출| exfil_discord video_capture –>|Discord로 유출| exfil_discord audio_capture –>|Discord로 유출| exfil_discord keylogging –>|Discord로 유출| exfil_discord exfil_discord –>|대체| exfil_mqtt c2_discord –>|대체| c2_fallback c2_fallback –>|사용| c2_mqtt c2_mqtt –>|유출된 데이터 수신| exfil_mqtt "

공격 흐름

Simulation Execution

Prerequisite: The Telemetry & Baseline Pre‑flight Check must have passed.

Rationale: This section details the precise execution of the adversary technique (TTP) designed to trigger the detection rule. The commands and narrative MUST directly reflect the TTPs identified and aim to generate the exact telemetry expected by the detection logic. Abstract or unrelated examples will lead to misdiagnosis.

  • Attack Narrative & Commands:
    An attacker has deployed the WindowsAudit backdoor on the victim host. To retrieve commands, the backdoor performs DNS lookups to the Discord CDN (gateway.discord.gg) and to a malicious MQTT broker hosted on *.hivemq.cloud. These lookups are issued via native Windows APIs (no external tools) to stay low‑profile. The DNS queries are the sole observable artifact used by the Sigma rule for detection.

  • Regression Test Script:

    # WindowsAudit C2 DNS beacon simulation
    # Generates the exact DNS queries the Sigma rule watches for.
    
    $c2Endpoints = @(
        "gateway.discord.gg",
        "malicious1.hivemq.cloud",
        "malicious2.hivemq.cloud"
    )
    
    foreach ($fqdn in $c2Endpoints) {
        try {
            # Use the native Windows DNS resolver
            Resolve-DnsName -Name $fqdn -Type A -ErrorAction Stop | Out-Null
            Write-Host "[+] Queried $fqdn"
        } catch {
            Write-Warning "Failed to resolve $fqdn (simulated C2)"
        }
        Start-Sleep -Seconds 5   # mimic realistic beacon interval
    }
  • Cleanup Commands:

    # Flush the DNS cache to remove traces of the simulated queries
    ipconfig /flushdns
    Write-Host "[*] DNS cache cleared."