내 이름을 지어봐: MioLab이 MacOS 정보 탈취 제국을 구축하는 방법
Detection stack
- AIDR
- Alert
- ETL
- Query
요약
MioLab은 소프트웨어 엔지니어, 경영진, 암호화폐 투자자와 같은 높은 가치를 지닌 피해자를 겨냥한 상업적으로 배포된 macOS 정보탈취기입니다. 이는 악성 광고와 ClickFix 감염 체인을 통해 확산되어 브라우저 자격 증명, 암호 관리자 기록, 암호화폐 지갑 파일, macOS Keychain 데이터를 탈취하는 컴팩트한 C 기반 바이너리를 실행합니다. 탈취된 정보는 임시 디렉토리에 배치되어 아카이브로 압축된 후 악성 도메인으로 curl POST 요청을 통해 탈취됩니다. 이 운영에는 웹 기반 제어 패널, 프록시 지원, 대형 사이버 범죄 그룹에 맞춤화된 API 액세스도 포함됩니다.
조사
보고서는 Chrome, Firefox, Safari, Telegram, 디스코드, Apple Notes 및 하드웨어 지갑 응용 프로그램을 포함한 넓은 범위의 목표 데이터 소스와 악성코드의 정적 속성, 런타임 동작을 설명합니다. 인프라 분석은 러시아에서의 방탄 호스팅, 반복적인 도메인 회전, 그리고 Web3 토큰-에어드랍 피싱 운영과 연결된 백엔드를 가리킵니다. 조사자들은 또한 명령 줄, 임시 폴더 경로, 탈취 URL과 같은 주요 지표를 추출했습니다.
완화
방어자들은 사용자들에게 가짜 자격 증명 프롬프트를 인식하도록 교육하고, dscl, osascript, curl과 같은 내장 바이너리의 오용을 모니터링하고, 알려진 악성 도메인을 차단하고, 코드 서명을 시행하며 브라우저 프로필 데이터와 Keychain 파일에 대한 액세스를 제한해야 합니다. 탐지 논리는 또한 /var/folders에서의 악성코드 실행 패턴과 아카이브 배치 행동에 집중해야 합니다.
대응
MioLab이 탐지되면, 영향을 받은 Mac을 격리하고 휘발성 메모리 및 파일 시스템 아티팩트를 캡처하고 관련된 C2 도메인 및 IP를 차단하고 노출된 자격 증명과 암호화폐 지갑 키를 취소하며 모든 대상 데이터 위치에 대한 포렌식 검토를 수행해야 합니다. 관찰된 명령 줄로 엔드포인트 탐지 콘텐츠를 업데이트하고 유사한 감염 체인을 환경 전체에서 사냥해야 합니다.
“graph TB
%% Class definitions
classDef action fill:#99ccff
classDef tool fill:#ffcc99
classDef malware fill:#ff9999
classDef process fill:#ccffcc
%% Malware node
malware_miolab[“Malware – Name: MioLab Infostealer
Description: Multiu2011stage macOS infostealer”]
class malware_miolab malware
%% Initial Access
initial_access[“Action – T1204.002 User Execution: Victim opens malicious DMG or Unix executable delivered via social engineering”]
class initial_access action
%% Execution
execution_unix_shell[“Action – T1059.004 Unix Shell: Payload runs shell commands via sh, system and AppleScript”]
class execution_unix_shell action
%% Defense Evasion
defense_evasion[“Action – T1564.011 Hide Artifacts: Terminates Terminal, removes quarantine attributes and applies XOR string obfuscation (T1027)”]
class defense_evasion action
%% Discovery
discovery_info[“Action – T1589 Gather Victim Host Information: Uses system_profiler to collect hardware and OS details”]
class discovery_info action
%% Credential Access
credential_access[“Action – T1056 Input Capture and T1555.001/002 Credential Dumping: Shows fake System Preferences password dialog via AppleScript, validates with dscl, dumps Keychain files and extracts browser databases, cookies and session tokens”]
class credential_access action
%% Collection
collection_staging[“Action – T1074.001 Local Data Staging and T1560 Archive Collected Data: Gathers files, notes and crypto wallets, stages in temporary directory and compresses into ZIP archive”]
class collection_staging action
%% Exfiltration
exfiltration_curl[“Action – T1041 Exfiltration Over C2 Channel and T1102.003 Web Protocols: Uploads ZIP archive via curl POST to malicious web service”]
class exfiltration_curl action
%% Command and Control
c2_proxy[“Action – T1090.002 Proxy and T1659 Dynamic Content Injection: Traffic routed through attackeru2011controlled proxy servers and injection domains”]
class c2_proxy action
%% Tool nodes
tool_applescript[“Tool – Name: AppleScript
Purpose: Displays credentialu2011prompt UI”]
class tool_applescript tool
tool_dscl[“Tool – Name: dscl
Purpose: Validates captured credentials”]
class tool_dscl tool
tool_curl[“Tool – Name: curl
Purpose: Sends collected archive to remote server”]
class tool_curl tool
tool_system_profiler[“Tool – Name: system_profiler
Purpose: Retrieves system information”]
class tool_system_profiler tool
%% Connections showing the attack flow
malware_miolab –>|delivers| initial_access
initial_access –>|triggers| execution_unix_shell
execution_unix_shell –>|enables| defense_evasion
defense_evasion –>|allows| discovery_info
discovery_info –>|provides data to| credential_access
credential_access –>|uses| tool_applescript
credential_access –>|uses| tool_dscl
credential_access –>|leads to| collection_staging
collection_staging –>|compresses and stages| exfiltration_curl
exfiltration_curl –>|uses| tool_curl
exfiltration_curl –>|sends data to| c2_proxy
c2_proxy –>|routes through| tool_curl
%% Styling assignments
class initial_access,execution_unix_shell,defense_evasion,discovery_info,credential_access,collection_staging,exfiltration_curl,c2_proxy action
class tool_applescript,tool_dscl,tool_curl,tool_system_profiler tool
class malware_miolab malware
“
공격 흐름
탐지
비정상적인 상위 도메인(TLD) DNS 요청에 의한 수상한 명령 및 제어(dns 통해)
보기
탐지할 IOCs (HashSha256): Say My Name: How MioLab is building MacOS Stealer Empire
보기
탐지할 IOCs (HashMd5): Say My Name: How MioLab is building MacOS Stealer Empire
보기
탐지할 IOCs (DestinationIP): Say My Name: How MioLab is building MacOS Stealer Empire
보기
탐지할 IOCs (SourceIP): Say My Name: How MioLab is building MacOS Stealer Empire
보기
MioLab MacOS 정보탈취기 활동 [리눅스 프로세스 생성]
보기
시뮬레이션 실행
> 사전: Telemetry & Baseline Pre‑flight Check가 통과되어야 합니다.
이론적 근거: 이 섹션은 감지 규칙을 트리거하기 위해 설계된 적대자 기술(TTP)의 정확한 실행을 설명합니다. 명령 및 설명은 반드시 식별된 TTP를 직접 반영하고, 감지 논리에서 예상되는 정확한 텔레메트를 생성하는 것을 목표로 해야 합니다.
-
공격 서사 및 명령:
- 사용자의 터미널 세션 종료 – 맬웨어는 먼저 표준 명령 프롬프트를 비활성화하여 사용자를 제어된 UI 흐름으로 강제합니다.
killall Terminal - 가짜 자격 증명 프롬프트 표시 – 사용하여
osascript를 통해 공격자는 시스템 설정 경고를 모방하는 AppleScript 대화 상자를 표시하여 사용자가 암호를 입력하게 유도합니다.osascript -e 'display dialog "이 애플리케이션을 실행하기 전에 시스템 설정을 구성해야 합니다." default answer "" with hidden answer' - 수확한 자격 증명 확인 – 캡처된 암호는
dscl . -authonly를 사용하여 로컬 디렉토리 서비스에 대해 검증됩니다. 성공적으로 반환되면 자격 증명이 올바름이 확인됩니다.dscl . -authonly "$USER" "$HARVESTED_PASSWORD" - 탈취 페이로드 준비 및 압축 – 공격자는 수확된 데이터(e.g.,
~/.ssh/id_rsa)를 zip 아카이브로 타르하여ditto를 사용하여 업로드를 준비합니다.ditto -c -k --sequesterRsrc /var/folders/*/DataStaging /tmp/exfil.zip
- 사용자의 터미널 세션 종료 – 맬웨어는 먼저 표준 명령 프롬프트를 비활성화하여 사용자를 제어된 UI 흐름으로 강제합니다.
-
회귀 테스트 스크립트: (Bash – 규칙을 트리거하기 위한 정확한 순서 실행)
#!/usr/bin/env bash set -euo pipefail echo "[*] MioLab 시뮬레이션 시작..." # 1. 터미널 종료 echo "[+] 터미널 종료" killall Terminal # 2. 가짜 AppleScript 프롬프트 표시(시뮬레이션 – 사용자 상호작용 없음) echo "[+] 가짜 자격 증명 프롬프트 표시" osascript -e 'display dialog "이 애플리케이션을 실행하기 전에 시스템 설정을 구성해야 합니다." default answer "" with hidden answer' >/dev/null 2>&1 # 3. 수확한 자격 증명 확인 (현재 사용자 및 더미 암호 사용) echo "[+] 수확한 자격 증명 인증" HARVESTED_PASSWORD="P@ssw0rd!" # 실제 시나리오에서는 훔친 암호 사용 dscl . -authonly "$USER" "$HARVESTED_PASSWORD" || true # 데모를 위해 실패 무시 # 4. 데이터 스테이징 및 압축 echo "[+] 스테이징 데이터 압축" STAGING_DIR=$(mktemp -d) echo "sample data" > "$STAGING_DIR/sample.txt" ditto -c -k --sequesterRsrc "$STAGING_DIR" /tmp/exfil.zip echo "[*] 시뮬레이션 완료. SIEM에서 경고 확인." -
정리 명령: (생성된 아티팩트 제거 및 세션 복원)
#!/usr/bin/env bash set -euo pipefail echo "[*] MioLab 시뮬레이션 아티팩트 정리 중..." # 가짜 zip 아카이브 제거 rm -f /tmp/exfil.zip # 임시 스테이징 디렉토리 제거 (존재할 경우) [[ -d "$STAGING_DIR" ]] && rm -rf "$STAGING_DIR" # 사용자용 터미널 다시 시작 (선택 사항) open -a Terminal echo "[*] 정리 완료."