SOC Prime Bias: 높음

25 Jun 2026 19:22 UTC

Agent Tesla 악성코드 분석: .NET RAT의 데이터 절도 능력

Author Photo
SOC Prime Team linkedin icon 팔로우
Agent Tesla 악성코드 분석: .NET RAT의 데이터 절도 능력
shield icon

Detection stack

  • AIDR
  • Alert
  • ETL
  • Query

요약

Agent Tesla는 멀웨어 서비스 모델을 통해 제공되는 .NET 기반 원격 액세스 트로잔으로, Windows 시스템을 겨냥하고 있습니다. 이 멀웨어는 키로깅 및 스크린샷 캡쳐 등의 기능을 통해 자격 증명, 브라우저에 저장된 정보 및 사용자 커뮤니케이션을 훔치도록 설계되었습니다. SMTP, FTP 및 Tor 네트워크를 통해 라우팅된 HTTP 트래픽 등 여러 데이터 유출 채널을 지원합니다.

조사

이 기사는 Agent Tesla가 초기 스피어 피싱 전송에서부터 지속성과 최종 데이터 도난까지 어떻게 작동하는지를 설명합니다. 또한 SetWindowsHookEx API를 사용한 키로깅을 설명하고, 브라우저 데이터 및 이메일 클라이언트 저장 위치에 초점을 맞춘 멀웨어에 대해 설명합니다. 분석에서는 익명화를 위해 Tor 브라우저를 사용하여 유출 트래픽을 숨기는 방법도 보여줍니다.

완화

조직은 .chm 파일 및 매크로가 활성화된 문서와 같은 악성 첨부 파일을 차단하기 위한 강력한 이메일 보안 통제를 배포해야 합니다. 또한 실행 키 및 .chm 값에 대한 무단 레지스트리 변경을 모니터링하는 것도 중요합니다. 추가적으로 알려진 데이터 유출 방법 차단 및 비정상적인 Tor 관련 네트워크 활동 감시는 절충 영향을 줄이는 데 도움이 될 수 있습니다. WinlogonShell 값을 차단하는 것도 중요합니다. 알려진 유출 방법을 차단하고 비정상적인 Tor 관련 네트워크 활동을 감시하는 것도 손상 영향을 줄이는 데 도움이 됩니다.

대응

Agent Tesla가 탐지되면 추가 유출을 막기 위해 영향을 받은 Windows 호스트를 즉시 격리해야 합니다. 포렌식 분석을 진행하여 피싱 이메일이나 무기화된 첨부 파일 같은 원래 감염 원인을 식별해야 합니다. 지속성 메커니즘을 확인하기 위해 레지스트리 위치 및 시작 폴더를 검토하고 멀웨어와 관련된 임시 파일이나 아티팩트를 제거합니다.

graph TB %% Class Definitions Section classDef technique fill:#99ccff %% 블루 컬러는 MITRE 테크닉용 classDef malware fill:#ff9999 %% 레드 컬러는 멀웨어용 classDef file fill:#cccccc %% 그레이 컬러는 파일 및 아티팩트용 classDef action fill:#ccffcc %% 그린 컬러는 동작/프로세스용 %% Initial Access Phase action_phishing[“<b>테크닉</b> – <b class=’technique’>T1566.001 피싱: 스피어 피싱 첨부 파일</b><br/><b>설명</b>: .gz, .chm 또는 매크로가 포함된 워드 문서 같은 악성 첨부 파일을 포함한 이메일.”] class action_phishing action file_payloads[“<b class=’file’>악성 첨부 파일</b><br/><b>종류</b>: .gz 아카이브, .chm 파일 또는 매크로 포함 워드 문서.”] class file_payloads file action_phishing –>|전달| file_payloads %% Execution and Loading Phase technique_obfuscation[“<b class=’technique’>T1027.009 난독화된 파일 또는 정보: 내장된 페이로드</b><br/><b>설명</b>: 추가 페이로드를 다운로드하기 위해 사용된 난독화 스크립트.”] class technique_obfuscation technique malware_agent_tesla[“<b class=’malware’>멀웨어</b> – <b class=’malware’>Agent Tesla</b><br/><b>설명</b>: 시스템 메모리에 직접 로드된 .NET 기반 정보 스틸러.”] class malware_agent_tesla malware technique_reflective[“<b class=’technique’>T1620 반사 코드 로딩</b><br/><b>설명</b>: 디스크 탐지를 피하기 위해 시스템 메모리에 직접 최종 페이로드 로딩.”] class technique_reflective technique file_payloads –>|트리거| technique_obfuscation technique_obfuscation –>|로딩_via| technique_reflective technique_reflective –>|실행| malware_agent_tesla %% Reconnaissance Phase technique_sysinfo[“<b class=’technique’>T1082 시스템 정보 수집</b><br/><b>설명</b>: 사용자 이름, 컴퓨터 이름 및 OS 버전 수집.”] class technique_sysinfo technique technique_hostinfo[“<b class=’technique’>T1592 피해자 호스트 정보 수집</b><br/><b>설명</b>: 피해자 호스트에 대한 특정 데이터 수집.”] class technique_hostinfo technique malware_agent_tesla –>|수행| technique_sysinfo malware_agent_tesla –>|수행| technique_hostinfo %% Persistence Phase technique_registry[“<b class=’technique’>T1547.001 부팅 또는 로그온 자동 실행: 레지스트리 실행 키 / 시작 폴더</b><br/><b>설명</b>: Windows 실행 레지스트리 키 수정, 윈로곤 쉘 및 시작 폴더에 바이너리 드롭.”] class technique_registry technique file_startup_bin[“<b class=’file’>지속성 바이너리</b><br/><b>위치</b>: 시작 폴더에 드롭됨.”] class file_startup_bin file malware_agent_tesla –>|설립| technique_registry technique_registry –>|드롭| file_startup_bin %% Collection and Credential Access Phase technique_keylogging[“<b class=’technique’>T1056.001 입력 캡처: 키로그</b><br/><b>설명</b>: SetWindowsHookEx API를 사용하여 키스트로크 로깅.”] class technique_keylogging technique file_log[“<b class=’file’>로그 파일</b><br/><b>경로</b>: %temp%log.tmp”] class file_log file technique_cookies[“<b class=’technique’>T1539 웹 세션 쿠키 탈취</b><br/><b>설명</b>: 브라우저(크롬, 파이어폭스, 엣지)의 SQLite 데이터베이스를 분석하여 쿠키 추출.”] class technique_cookies technique technique_forge[“<b class=’technique’>T1606.001 웹 자격 증명 위조: 웹 쿠키</b><br/><b>설명</b>: 비밀번호 및 세션 데이터 추출.”] class technique_forge technique technique_account_disc[“<b class=’technique’>T1087 계정 디스커버리</b><br/><b>설명</b>: 이메일 클라이언트(아웃룩, 썬더버드)와 FTP 도구(FileZilla)에서 세부사항 추출.”] class technique_account_disc technique malware_agent_tesla –>|실행| technique_keylogging technique_keylogging –>|로그에_기록| file_log malware_agent_tesla –>|대상| technique_cookies malware_agent_tesla –>|대상| technique_forge malware_agent_tesla –>|수행| technique_account_disc %% Exfiltration Phase technique_exfil_alt[“<b class=’technique’>T1048 대체 프로토콜을 통한 유출</b><br/><b>설명</b>: SMTP, FTP 또는 HTTP를 통한 도난 데이터 전송.”] class technique_exfil_alt technique technique_auto_exfil[“<b class=’technique’>T1020 자동화된 유출</b><br/><b>설명</b>: Tor를 사용하여 네트워크 트래픽을 익명화.”] class technique_auto_exfil technique file_tor[“<b class=’file’>Tor 브라우저</b><br/><b>위치</b>: %appdata%tor.zip”] class file_tor file malware_agent_tesla –>|유출_via| technique_exfil_alt malware_agent_tesla –>|사용| technique_auto_exfil technique_auto_exfil –>|다운로드| file_tor

공격 흐름

시뮬레이션 실행

전제 조건: 텔레메트리 및 기준선 사전 확인이 통과해야 합니다.

합리적 논거: 이 섹션은 탐지 규칙을 트리거하기 위한 적의 기법(TTP) 정밀 실행을 자세히 설명합니다. 명령 및 서술이 식별된 TTP를 직접 반영해야 하며 탐지 논리의 기대 텔레메트리를 생성하는 것을 목표로 합니다. 추상적이거나 관련 없는 예시는 오진으로 이어질 것입니다.

  • 공격 서사 및 명령: 적이 초기 접근을 얻었으며 피해자 기기에 대한 접근 유지를 위해 지속성을 확립하려고 합니다. Agent Tesla를 시뮬레이션하기 위해 공격자는 두 가지 별개의 행동을 수행합니다:

    1. 그들은 HKCUSoftwareMicrosoftWindowsCurrentVersionRun 키를 수정하여 사용자가 로그인할 때마다 악성 페이로드를 실행합니다.
    2. 그들은 더 공격적인 기술을 시도하여 WinlogonShell 레지스트리 값을 수정하고 표준 explorer.exe 를 변경하여 전체 사용자 쉘 환경을 가로채는 악성 실행 파일을 실행합니다. 이 행동들은 표준 및 높은 영향의 레지스트리 지속성을 잡아내기 위한 탐지의 능력을 테스트하도록 선택됩니다.
  • 회귀 테스트 스크립트:

    # Agent Tesla 지속성 TTP 시뮬레이션 스크립트
    
    $maliciousPath = "C:WindowsTempagent_tesla_sim.exe"
    Write-Host "[*] 더미 페이로드를 $maliciousPath에 생성 중"
    New-Item -Path $maliciousPath -ItemType File -Force
    
    Write-Host "[*] T1547.001 시뮬레이션: 실행 키 수정 중"
    $runKey = "HKCU:SoftwareMicrosoftWindowsCurrentVersionRun"
    New-ItemProperty -Path $runKey -Name "AgentTeslaPersistence" -Value $maliciousPath -PropertyType String -Force
    
    Write-Host "[*] T1547.014 시뮬레이션: 윈로곤 쉘 수정 중"
    $winlogonKey = "HKCU:SoftwareMicrosoftWindows NTCurrentVersionWinlogon"
    New-ItemProperty -Path $winlogonKey -Name "Shell" -Value "explorer.exe, $maliciousPath" -PropertyType String -Force
    
    Write-Host "[+] 시뮬레이션 완료. SIEM에서 경고 확인."
  • 정리 명령:

    # 지속성 및 더미 파일 제거를 위한 정리 스크립트
    Write-Host "[*] 레지스트리 키 정리 중..."
    Remove-ItemProperty -Path "HKCU:SoftwareMicrosoftWindowsCurrentVersionRun" -Name "AgentTeslaPersistence" -ErrorAction SilentlyContinue
    Remove-ItemProperty -Path "HKCU:SoftwareMicrosoftWindows NTCurrentVersionWinlogon" -Name "Shell" -ErrorAction SilentlyContinue
    
    Write-Host "[*] 더미 페이로드 삭제 중..."
    Remove-Item -Path "C:WindowsTempagent_tesla_sim.exe" -Force -ErrorAction SilentlyContinue
    
    Write-Host "[+] 정리 완료."