2018 começa por ser um ano muito atribulado relativamente a notícias sobre o horizonte das criptomoedas, sistemas de ledger distribuído, e sobretudo crypto-jacking. O paradigma altera-se, e a forma de atacar ou “ganhar dinheiro” online também.
Durante a primeira semana de janeiro foram aqui anunciadas duas notícias sobre este tema. A primeira, refere-se a uma extensão do Chrome, intitulada por Archive Poster, que usava o processamento dos utilizadores e a sua eletricidade para minerar recursos de uma criptomoeda chamada Monero. A segunda notícia fala de uma botnet, que se dissemina através do protocolo SSH e também mina recursos para a Monero.
Este artigo refere que também websites portugueses estão a usar este tipo de recursos para minerar a criptomoeda Monero. Um dos casos já detetado foi o Dinheiro Vivo (https://www.dinheirovivo.pt), um website de notícias português bastante conceituado.
(Imagem retirada de uma thread no reddit)
Não se sabe bem qual a intenção, mas é certo que, foi identificado neste website, um trecho de código que usava os recursos dos utilizadores, nomeadamente a sua capacidade de processamento, para minerar a criptomoeda Monero.
Este trecho de código era executado via Javascript assim que o utilizador visitava o website. Usava 100% do CPU do utilizador sem o seu prévio consentimento. Ele era carregado através de uma iframe localizada em: http://reuters.dinheirovivo.pt/ReutersCharts/pages/dv/index.xhtml, e servida em JBoss. Mencionou-se “era”, porque já foi efetivamente removido.
Para a concretização deste cenário foi usada a , que é uma API em Javascript para minerar a Monero.
Qual a intenção
Não se sabe bem ao certo se este “esquema” foi, ou não, propositado pelo Dinheiro Vivo, uma vez que é uma forma bem viável de ganhar dinheiro com os recursos dos seus visitantes. Se assim foi, deveria ter avisado em primeira mão todos os utilizadores da plataforma através de políticas de privacidade, de forma clara, e bem vísivel. Questões legais, se podem, ou não, elaborar este tipo de esquemas, não são aqui abordadas por desconhecimento do tema.
De notar que o Dinheiro Vivo divulgou um comunicado que pode ser visto aqui.
O outro ponto de vista, é que poderia ter sido mesmo um hack ao website. Um código “malicioso” deixado pelo hacker, como forma de ganhar dinheiro com os recursos dos utilizadores da plataforma (as vítimas).
Como bloquear este tipo de esquemas
Este tipo de esquema podem ser bloqueado pelos utilizadores através de extensões no seu web-browser. Para isso basta usar p.ex., o uBlock Origin, que é uma extensão semelhante ao Adblock, e que bloqueia também este tipo de códigos que usam recursos do sistema de forma exagerada.
Espera-se que em breve os web-browsers já permitam bloquear eventos desta natureza, percebendo no entanto a dificuldade da sua deteção automática, e a natural deteção de falsos positivos.
Conclusão
Estima-se que 2018 será um ano com muitos casos desta linha. O paradigma digital está-se alterando aos poucos, existem cada vez mais moedas digitais e as recompensas por mining são muito apetecíveis. Temos constatado um grande número de ataques de injeção em sistemas web-based nos últimos anos. Normalmente estes ataques são conseguidos através de injeção de código malicioso, e apenas consistiam num objetivo: a desfiguração do website.
Atualmente a realidade é bem diferente. Os hackers tiram partido destas vulnerabilidades, e ao inves da desfiguração, é prevferível injetar trechos de código semelhantes ao que observamos acima, e que usa recursos dos utilizadores para minerar criptomoedas. Com naturalidade esta é uma opção lógica, porque o retorno é efetivamente grande!
Referências
[1] https://www.reddit.com/r/portugal/comments/7onf67/dinheirovivopt_anda_a_minerar_criptomoedas_com_os/[2] https://chrome.google.com/webstore/detail/ublock-origin
[3] https://www.dinheirovivo.pt/outras/nota-da-direccao-ataque-informatico-resolvido
English-version: Hackers are attacking Portuguese websites with crypto-jacking. Are you safe?
2018 begins to be a very troubled year for news about the horizon of crypto-coins, decentralized ledger systems, and especially crypto-jacking. The paradigm changes, and also the way to attack or “make money” online.
During the first week of January two news about this subject were announced in this blog. The first one refers to an extension of Chrome, titled Archive Poster, which used the processing of users and their electricity to mining features of a cryptocurrency called Monero. The second one shows a botnet, which spreads through the SSH protocol and also mining the coin Monero.
This article states that also Portuguese websites are using this type of resources to mine the cryptocurrency Monero. One of the cases already detected was Dinheiro Vivo (https://www.dinheirovivo.pt), a very well-known Portuguese website of news.
(Image initially shared on reddit)
It is not clear what the intention related with this, but a piece of code that used the resources of the users, namely its processing capacity, was identified in this website in order to mine Monero.
This code snippet runs via Javascript when the user visits the website. It uses 100% of the CPU of the user without his previous consent. It was uploaded via an iframe located at: http://reuters.docuser.com/ReutersCharts/pages/dv/index.xhtml, and served in JBoss. It has already been effectively removed.
Crypto-loot, which is an API in Javascript to mine the Monero, was used for the accomplishment of this scenario.
What is the intent?
It is not entirely clear whether this “scheme” was intended by Dinheiro Vivo, as it is a very viable way to make money from your visitors’ resources. If so, you should have firstly advised all users of the platform through privacy policies, in a clear, well-visible way. Legal issues about this schema are not addressed.
The other point of view, is that it could have even been a hack on the website. A “malicious” code left by the hacker, as a way to make money from the resources of the platform users (the victims).
How to block such schemes
This type of scheme can be blocked by users through extensions in your web-browser. For example, uBlock Origin, which is an extension similar to Adblock, also blocks such codes that use system resources in an exaggerated way.
It is expected that soon the web-browsers already allow blocking this type of schemes, realizing, however, the difficulty of automatic detection of this type of events, and the natural detection of false positives.
Conclusion
It is estimated that 2018 will be a year with many cases of this line. The digital paradigm is gradually changing, there are more and more digital coins and the rewards for mining are very palatable. We have noticed a large number of injection attacks on web-based systems in recent years. Usually, these attacks are achieved through the injection of malicious code, and they only consisted of one goal: the defacement of the website.
Todays, the reality is quite different. Hackers take advantage of these vulnerabilities, and instead of defacement, they inject snippets of code similar to the one we noted above, and that uses users’ resources to mine crypto-coins. Naturally this is a logical choice because the payback is great!
References
[1] https://www.reddit.com/r/portugal/comments/7onf67/dinheirovivopt_anda_a_minerar_criptomoedas_com_os/[2] https://chrome.google.com/webstore/detail/ublock-origin
[3] https://www.dinheirovivo.pt/outras/nota-da-direccao-ataque-informatico-resolvido
Pedro Tavares is a professional in the field of information security working as an Ethical Hacker/Pentester, Malware Researcher and also a Security Evangelist. He is also a founding member at CSIRT.UBI and Editor-in-Chief of the security computer blog seguranca-informatica.pt.
In recent years he has invested in the field of information security, exploring and analyzing a wide range of topics, such as pentesting (Kali Linux), malware, exploitation, hacking, IoT and security in Active Directory networks. He is also Freelance Writer (Infosec. Resources Institute and Cyber Defense Magazine) and developer of the 0xSI_f33d – a feed that compiles phishing and malware campaigns targeting Portuguese citizens.
Read more here.