攔截簡訊繞過雙因素認證:安卓銀行木馬Anubis分析
概述
幾年前,我在位於智利聖地亞哥的警察學校進行過一些關於網路釣魚的培訓。在我的培訓中,有一個模組被稱為“日誌不會說謊”。這個模組是為了告訴大家,在大多數情況下,只需要在受到釣魚攻擊的伺服器或金融機構自己的存檔中檢視相應日誌檔案,就可以得到網路釣魚應急響應所需的一切內容。
此外,針對惡意軟體C&C伺服器,也同樣適用“日誌不會說謊”的規則。考慮到許多研究人員都會在Twitter上分享調查取證的技巧和觀點,我特地在社交網路搜尋了相關的關鍵詞,最終發現@LukasStefanko和@nullcookies這兩位研究者也在尋找用於Android惡意軟體的C&C伺服器,這一方向與我不謀而合。在研究過程中,日誌可以有助於我們理解這類木馬所造成的破壞性。
隨後,我鎖定了目標。本文將對名為“Anubis II”的惡意軟體進行分析,並且我們高度懷疑這個惡意軟體就是下面YouTube視訊中所說的“Builder”,視訊的標題為“Builder Android Bot Anubis 2”。
YouTube中執行APK Builder “Android Bot Anubis II”的截圖:
惡意軟體作者從預先選定的目標銀行中進行選擇:
在視訊的評論區,有人分享了botmaster控制面板的螢幕截圖。截圖表明,該惡意軟體有能力通過殭屍網路同時控制619部Android手機:
根據Lukas和NullCookies的研究結果,惡意軟體似乎主要在2018年6月活躍,託管Anubis II的伺服器上有一個銀行列表。
該惡意軟體支援自定義Web注入(或移動端注入),其針對的目標包括:7家奧地利銀行、18家澳大利亞銀行、5家加拿大銀行、6家捷克銀行、11家德國銀行、11家西班牙銀行、11家法國銀行、8家香港銀行、11家印度銀行、6家日本銀行、1家肯亞銀行、4家紐西蘭銀行、32家波蘭銀行、4家羅馬尼亞銀行、9家土耳其銀行、10家英國銀行和10家美國銀行。
假冒銀行登入頁面
該惡意軟體針對上述190個網站,都設計了一個可用的虛假登入頁面,我們選擇了其中的一些樣本展示如下。
此外,該惡意軟體還支援幾個加密貨幣組織,分別是:blockchaine、coinbase、localbitcoin、unocoin。
以及一些線上支付、電子郵件和社交媒體網站,包括:eBay、Facebook、Gmail、PayPal、ZebPay。
如果Android裝置使用者嘗試登陸到這一列表之中的銀行,裝置就會呈現出特定的網路釣魚頁面。
我們注意到,在一些釣魚頁面中出現了愚蠢的筆誤。例如,在Wells Fargo的頁面上,“登入”(Sign In)按鈕被寫成了“唱歌”(Sing In)。希望有被感染的使用者,能夠通過這些頁面上的錯誤,發現網站存在問題,從而避免遭受損失。
Wells Fargo“合唱團”頁面截圖:
攔截簡訊
通過訪問伺服器,我們發現了該惡意軟體曾攔截眾多短訊息。截止到我們對伺服器進行轉儲時,我們發現其中包含超過32900個獨有的keylog條目,以及來自至少47個裝置的超過52000多條簡訊息。
下面是一個示例,通過這個示例能夠得知,銀行發出的雙因素身份驗證請求能夠被轉發到惡意軟體作者手中:
Text: Bank of Redacted: 819881 is your authorization code which expires in 10 minutes. If you didn't request the code, call 1.800.xxx.xxxx for assistance.
該惡意軟體還具有鍵盤記錄的功能,允許惡意軟體作者檢視使用者在何時使用了銀行APP:
06/14/2018, 09:07:34 EDT|(FOCUSED)|[From:, REDACTED BANK, Account Number:, ******6680, Date:, May 30, 2018 10:10:42 AM EDT, Status:, Canceled, Amount:, $100.00, Type:, Deposit, Transfer ID:, 25098675]
下面的內容,轉發自一個線上支付平臺:
06/29/2018, 15:28:46 EDT|(CLICKED)|[Friendly reminderThis is Mr. XXXXXXX from REDACTED. This is a friendly reminder that you have a payment due today by 6pm If you have any questions or need to make a paymentvia phone call 804-999-9999 or we have a new payment processing system that allows , for your convenience, to simply text in the last 4 digits of a card you've previously used and the security code and we're able to process your payment.Feel free to callREDACTED with any questions at 804-xxx-xxxx]
此外在日誌中,我們找到了數百個Gmail驗證碼:
06/14/2018, 00:19:33 EDT|(FOCUSED)|[G-473953 is your Google verification code., 1 min ago]
還發現了相當多的Uber驗證碼:
Text: [#] 9299 is your Uber code. qlRnn4A1sbt
Paypal、Quickbooks、LinkedIn、Facebook、Stash和Stripe的雙因素認證驗證碼都在日誌中出現過:
Text: FREE PayPal: Your security code is: 321842. Your code expires in 10 minutes. Please don't reply. Text: [Your QuickBooks Self-Employed Code is 952708, 1 min ago] Text: 383626 is your Facebook password reset code or reset your password here: https://fb.com/l/9wBUVuGxxxx5zC Text: Your LinkedIn verification code is 967308. Text: 103-667 is your Stripe verification code to use your payment info with Theresa. Text: Your Stash verification code is 912037. Happy Stashing! Text: Cash App: 157-578 is the sign in code you requested. Text: Your verification code for GotHookup is: 7074
在/numers/目錄中,儲存著許多受感染使用者的通訊錄內容。根據其中的一些通訊錄分析,我們發現這是一個觸發的請求,殭屍網路運營者必須向用戶請求通訊錄。從我們發現的樣本中,有7個區號為404、4個區號為770和4個區號為678的號碼,由此證明受害使用者可能來自亞特蘭大(美國)。
鍵盤記錄功能似乎也是由殭屍網路運營者控制開啟或關閉。我們並沒有找到太多的鍵盤記錄。鍵盤記錄的條目大致如下所示。
電話提醒:
06/15/2018, 14:38:55 EDT|(CLICKED)|[Call management, •, 10m, 4 missed calls, Ashley Brown (3), Mom] 06/15/2018, 14:38:59 EDT|(CLICKED)|[Call Ashley Big Cousin, Quick contact for Ashley Brown] 06/15/2018, 14:39:01 EDT|(CLICKED)|[1 804-999-9999, Mobile, Call Ashley Brown]
對訊息的響應:
06/15/2018, 16:02:34 EDT|(CLICKED)|[Messaging, •, now, Expand button, (804) 999-9999 , Hey Terry can you send the address, REPLY] 06/15/2018, 16:02:37 EDT|(FOCUSED)|[Aa] 06/15/2018, 16:02:46 EDT|(CLICKED)|[Copy, Forward, Delete] 06/15/2018, 16:02:50 EDT|(FOCUSED)|[] 06/15/2018, 16:02:54 EDT|(CLICKED)|[Messaging] 06/15/2018, 16:02:57 EDT|(CLICKED)|[Enter message] 06/15/2018, 16:05:11 EDT|(CLICKED)|[Answer] 06/15/2018, 16:05:29 EDT|(CLICKED)|[] 06/15/2018, 16:10:50 EDT|(FOCUSED)|[] 06/15/2018, 16:10:52 EDT|(CLICKED)|[Enter] 06/15/2018, 16:11:01 EDT|(FOCUSED)|[2007 Their Address CtNorth CityTheyTyped OK 11111] 06/15/2018, 16:11:03 EDT|(FOCUSED)|[]
YouTube會話:
06/27/2018, 15:23:36 EDT|(CLICKED)|[YouTube] 06/27/2018, 15:23:46 EDT|(CLICKED)|[Pause video] 06/27/2018, 15:41:19 EDT|(FOCUSED)|[14:46, Go to channel, FINDING OUT THE GENDER!!!, Menu, The Rush Fam · 26K views4 hours ago, 6:12, Go to channel, TRY NOT TO CRY CHALLENGE REACTION WITH KID (SHE ACTUALLY CRIED), Menu, CJ SO COOL · 2.5M views · 1 year ago, SUBSCRIBED] 06/27/2018, 15:46:38 EDT|(FOCUSED)|[] 06/27/2018, 15:46:41 EDT|(CLICKED)|[Enter] 06/27/2018, 15:46:53 EDT|(CLICKED)|[Play video] 06/27/2018, 15:48:06 EDT|(CLICKED)|[ · 0:11] 06/27/2018, 15:48:09 EDT|(CLICKED)|[ · 0:09] 06/27/2018, 15:48:10 EDT|(CLICKED)|[ · 0:08] 06/27/2018, 15:54:30 EDT|(CLICKED)|[Suggested: "BREAKING UP IN FRONT OF COMPANY!!" PRANK ON PANTON SQUAD!!!]
感染分佈
我們使用了公開的測試平臺(例如Virus Total Intelligence)對該惡意軟體進行測試,發現該惡意軟體有許多使用者使用。每天都有大量新版本的惡意軟體被使用者安裝,最常見的安裝來源是Google Play商店。
在2018年7月,一些研究團隊已經對這一流行的惡意軟體進行了分析,其部分文章列舉如下:
IBM X-Force研究團隊安全情報部落格:Anubis Strikes Again: Mobile Malware continues to plague users in Official App Stores( ofollow,noindex">https://securityintelligence.com/anubis-strikes-again-mobile-malware-continues-to-plague-users-in-official-app-stores/ )
安全計算雜誌:BankBot Anubis campaign targets Turkish Android users with fake apps in Google Play store( https://www.scmagazine.com/home/news/malware/bankbot-anubis-campaign-targets-turkish-android-users-with-fake-apps-in-google-play-store/ )
Medium.com:Hackers Distributing Anubis Malware via Google Play Store to Steal Login credentials, E-wallets, and Payment Cards Details( SwiftSafe/hackers-distributing-anubis-malware-via-google-play-store-to-steal-login-credentials-e-wallets-944a9da42394" target="_blank" rel="nofollow,noindex">https://medium.com/@SwiftSafe/hackers-distributing-anubis-malware-via-google-play-store-to-steal-login-credentials-e-wallets-944a9da42394 )
最近的一篇文章來自AlienVault,發表在20天前:Anubis Android Malware in the Play Store( https://otx.alienvault.com/pulse/5b7b29177d656b718d253a66 )
根據VirusTotal Intelligence的搜尋結果,在本文撰寫的當天(2018年9月10日),就有62個上傳的新樣本與“Anubis”相匹配。該惡意軟體在VirusTotal上一些比較流行的名稱包括:
·DrWeb: Android.BankBot.1679
· Ikarus: Trojan-Banker.AndroidOS.Anubis
· Kaspersky: HEUR:Trojan-Dropper.AndroidOS.Hqwar.bbSophos: Andr/BankSpy-AH
卡巴斯基發表了一篇關於這種銀行木馬的文章,他們稱之為HQWar,文章的標題為“Phantom menace: mobile banking trojan modifications reach all-time high: Mobile banking Trojans hit the list of cyber-headaches in Q2 2018”。在該文章中,卡巴斯基宣稱他們已經發現並記錄了61000個變種版本。
我在本文開頭已經提過,Lukas和ESET已經針對大量潛伏在Google Play商店中的Android銀行木馬進行了分析,下面是其中的部分文章,供各位讀者參考:
2018年7月26日 – Google Play上的虛假銀行應用程式洩露了被盜信用卡資料(https://www.welivesecurity.com/2018/07/26/fake-banking-apps-google-play-leak-stolen-credit-card-data/)
2017年12月11日 – Google Play上的銀行惡意軟體以波蘭銀行為目標(https://www.welivesecurity.com/2017/12/11/banking-malware-targets-polish-banks/)
2017年11月21日 – 通過Google Play傳播的銀行惡意軟體新變種(https://www.welivesecurity.com/2017/11/21/new-campaigns-spread-banking-malware-google-play/)
2017年9月25日 – Bankbot木馬使用新技巧重返Google Play(https://www.welivesecurity.com/2017/09/25/banking-trojan-returns-google-play/)
2017年11月15日 – 多階段惡意軟體潛入Google Play(https://www.welivesecurity.com/2017/11/15/multi-stage-malware-sneaks-google-play/)
2017年4月19日 – 開啟天窗說亮話,給我你的密碼!( https://www.welivesecurity.com/2017/04/19/turn-light-give-passwords/ )