昨日,慢霧安全團隊監測到 Monero 官方社羣和官方 GitHub 出現安全類 issue 提醒,據使用者反饋從 Monero 門羅幣官網 getmonero.org 下載的 CLI 二進位制錢包檔案和正常 hash 不一致,疑似被惡意替換!而且使用者被盜大概價值 7000 美金的門羅幣。
慢霧安全團隊第一時間釋出預警並進行了相關安全分析與溯源:
在 Reddit 上的反饋地址:
https://www.reddit.com/r/Monero/comments/dyfozs/security_warning_cli_binaries_available_on/
GitHub 上的討論地址:
https://github.com/monero-project/monero/issues/6151
Linux 二進位制檔案:
使用者 nikitasius 提供了能夠檢索到的惡意二進位制檔案資訊:
https://www.reddit.com/r/Monero/comments/dyfozs/security_warning_cli_binaries_available_on/
此二進位制檔案是有以下屬性的 ELF 檔案:
MD5:d267be7efc3f2c4dde8e90b9b489ed2a
SHA-1:394bde8bb86d75eaeee69e00d96d8daf70df4b0a
SHA-256:ab9afbc5f9a1df687558d570192fbfe9e085712657d2cfa5524f2c8caccca31
File type:ELF
Magic: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux 3.2.0, from 'x)', not stripped
File size: 27.63 MB (28967688 bytes)
對比合法檔案和此 ELF 檔案時,我們發現檔案大小有所不同,並新增了一些新功能程式碼,如:
cryptonote :: simple_wallet :: send_seed
在開啟或建立新錢包後會立即呼叫此功能,進行如下圖所示的操作:
私鑰將會被髮送到:node.hashmonero.com
cryptonote :: simple_wallet :: send_to_cc
該功能會將資料傳送到 CC 或 C2(命令控制伺服器)伺服器,從而竊取使用者資產。
使用向該 C2 伺服器傳送 HTTP POST 請求,將資金相關敏感資訊傳送到以下惡意 C2:
node.xmrsupport.co
45.9.148.65
從分析來看,似乎並沒有建立任何其他檔案或資料夾,只是竊取私鑰並試圖從錢包中盜走資產。
Windows 二進位制檔案:
C2 伺服器45.9.148.65 還具有以下屬性:
MD5: 72417ab40b8ed359a37b72ac8d399bd7
SHA-1: 6bd94803b3487ae1997238614c6c81a0f18bcbb0
SHA-256: 963c1dfc86ff0e40cee176986ef9f2ce24fda53936c16f226c7387e1a3d67f74
File type: Win32 EXE
Magic: PE32+ executable for MS Windows (console) Mono/.Net assembly
File size: 65.14 MB (68302960 bytes)
Windows 版實際上與 Linux 版有相同的功能: 竊取私鑰和錢包資產。
只是函式名稱不同而已,例如 _ZN10cryptonote13simple_wallet9send_seedERKN4epee15wipeable_stringE
如果你有使用防火牆或代理(硬體或軟體),請驗證是否有網路流量與以下域名、IP發生連線:
node.hashmonero.com
node.xmrsupport.co
45.9.148.65
91.210.104.245
刪除此文中列出的所有二進位制檔案;
驗證 Monero 安裝程式或安裝程式檔案的 hash 值。
針對初學者:https://src.getmonero.org/resources/user-guides/verification-windows-beginner.html
高階用法:https://src.getmonero.org/resources/user-guides/verification-allos-advanced.html
注意:雜湊列表位於:https://web.getmonero.org/downloads/hashes.txt
什麼是雜湊?雜湊是唯一的識別符號。這可以是一個檔案、一個單詞等,最好使用 SHA256 雜湊進行檔案檢查。
你還可以使用以下 Yara 規則來檢測惡意或受感染的二進位制檔案:
Monero_Compromise.yar
下載 Yara(和文件):https://github.com/VirusTotal/yara
建議
安裝防毒軟體,並儘可能使用防火牆(免費或付費的都行);
如果已經在使用防病毒軟體:使用 Monero(或其他礦工)時,最好不要在防病毒軟體中排除特定的資料夾,如果需要,請在驗證 hash 值之後再使用;
重置你的種子或帳戶;
如何重置帳戶:https://web.getmonero.org/resources/user-guides/restore_account.html
使用助記詞恢復錢包:https://monero.stackexchange.com/questions/10/how-can-i-recover-a-wallet-using-the-mnemonic-seed
監視你的帳戶/錢包,確認沒有惡意交易。如果有,隨時聯絡門羅團隊以獲取支援。
請刪除並下載最新版本:https://web.getmonero.org/downloads/
門羅官方團隊宣告:
Warning: The binaries of the CLI wallet were compromised for a short time:
https://web.getmonero.org/2019/11/19/warning-compromised-binaries.html
慢霧團隊提醒:
針對供應鏈攻擊,鑑於開發、運維人員安全意識不足等問題,慢霧安全團隊很久之前已經預見了這類攻擊的可能性,Monero 不是第一個受到攻擊的加密貨幣或錢包,也不可能是最後一個受到攻擊的加密貨幣或錢包。
所以請官方人員注意自身賬戶安全,請使用強密碼,並且一定儘可能使用 MFA(或2FA),時刻保持安全意識;針對各類應用程式有可用新版本更新時注意驗證 hash 值。
有問題可以第一時間郵件聯絡慢霧安全團隊 admin@chaindaily
附:
Domain Name: xmrsupport.co
Registry Domain ID: D9E3AC179ACA44FE4B81F274517F8F47E-NSR
Registrar WHOIS Server: whois.opensrs.net
Registrar URL: www.opensrs.com
Updated Date: 2019-11-14T16:02:52Z
Creation Date: 2019-11-14T16:02:51Z
IP HISTORY for hashmonero.com
45.9.148.65 from 2019-11-15 to 2019-11-17
91.210.104.245 from 2019-11-19 to 2019-11-19
感謝
nikitasius 提供的樣本
binaryFate from:
https://www.reddit.com/r/Monero/comments/dyfozs/security_warning_cli_binaries_available_on/
bartblaze from:
https://bartblaze.blogspot.com/2019/11/monero-project-compromised.html