Leia o artigo em Português - Read this article in Portuguese

O Malware Brasileiro Nunca Dorme: Conheça o EmbusteBot

O IBM Research — Haifa Labs investe continuamente na pesquisa e no desenvolvimento de soluções avançadas de análise de malware, que aprimoram a capacidade da IBM de detectar e neutralizar rapidamente o malware, à medida que novas e desafiadoras ameaças surgem. Nossas observações permanentes do cenário de crimes cibernéticos no Brasil revelaram um aumento contínuo de novas campanhas maliciosas nessa região do mundo, especialmente aquelas que visam plataformas financeiras e de pagamento on-line. Em uma de nossas colaborações recentes com os pesquisadores do IBM Security Trusteer, analisamos um novo malware financeiro que tem como alvo os principais bancos brasileiros. Além de seus recursos genéricos, este malware emprega esquemas específicos para diferentes bancos, e permite que os invasores obtenham total controle do computador da vítima. Apelidamos o malware de EmbusteBot, devido à palavra portuguesa “Embuste”, que significa fraude ou golpe.

[button link="https://www-01.ibm.com/marketing/iwm/dre/signup?source=mrs-form-9451&S_PKG=ov54550 " color="orange1" icon="download" size="large"]Leia o whitepaper: Reequilibrando o poder com a prevenção de fraude cognitiva[/button]

Visão Geral da Amostra

O cenário de crimes cibernéticos no Brasil é conhecido por sua afinidade com códigos maliciosos baseados em Delphi, e a amostra que analisamos não é exceção. Nesse caso, os autores do malware utilizam um esquema em que um executável benigno é usado para carregar uma biblioteca de links dinâmicos (DLL) maliciosa no computador da vítima para ativar o ataque. O tamanho da DLL é grande - 3,3 MB - e vem com uma biblioteca OpenSSL dentro. Os códigos eram compilados estaticamente e vinculados entre si, usados provavelmente para criptografar o tráfego de rede. No momento da análise, o malware foi detectado apenas por um pequeno número de sistemas de antivírus. Testamos a amostra e a DLL maliciosa no VirusTotal e observamos detecção baixa ou genérica na prática (Figura 1). Figura 1: Resultados da detecção para o executável EmbusteBot e para a DLL maliciosa no VirusTotal Uma característica notável desta amostra é a falta de empacotamento de código, ou de uma criptografia dos caminhos de código potencialmente sensíveis, que correspondem à atividade maliciosa do malware. De acordo com o X-Force, os autores não usaram muitas técnicas anti-pesquisa para tornar a análise mais difícil. Esse descuido pode ser devido à falta de competência necessária ou, os autores podem ter tentado fazer a DLL parecer mais legítima para varredores de antivírus, sem a inclusão de ofuscação. O malware ainda executa alguma criptografia de sequências sensíveis em várias partes importantes da DLL e em verificações anti-pesquisa baseadas em tempo. O EmbusteBot foi projetado para:
  • Descobrir qual janela do navegador é executada na máquina da vítima.
  • Localizar uma correspondência para o título da janela na lista de bancos e aplicativos bancários alvos.
  • Controlar o terminal da vítima, usando falsas sobreposições, em alguns casos.
  • Ativar transações fraudulentas a partir da conta da vítima.

Fila de Monitoramento de Janela do EmbusteBot

O caminho de propagação mais provável do EmbusteBot é através do envio de um spam mail com o malware anexado. A execução do malware no computador da vítima dá início ao carregamento dinâmico de uma DLL maliciosa para descobrir qual navegador a vítima usa e o que estão abertas nas guias ativas. Após a inicialização, o malware gera uma fila de procura que varre em busca de nomes específicos de classes de janela, que representam aplicativos de navegação da web alvos, tal como o Google Chrome (consulte a Figura 2). Figura 2: O malware varre classes de janelas que aparecem no segundo plano, procurando nomes de classes específicos relacionados a navegadores da web. O EmbusteBot verifica as classes de janela dos três navegadores da web mais populares - IEdge, Google Chrome e Mozilla Firefox - para determinar se alguma aparece no segundo plano da tela da vítima. O malware ainda verifica janelas ativas do Contêiner de Armazenamento do Windows 10 (nome da classe APPLICATIONFRAMEWINDOW) e Java ativo (nome da classe SUNAWTFRAME). Quando uma janela necessária é encontrada em execução no segundo plano, o malware vai para a próxima etapa.

Obtendo o Título da Janela na Procura de Páginas de Banco Ativas

A próxima etapa envolve a função GetWindowText WinAPI, usada para obter o texto que aparece como o título da janela no navegador da web aberto que a vítima está usando. A mesma string de decriptação de rotina é usada para decriptografar sequências e compará-las com o resultado de GetWindowText (consulte a Figura 3), na procura de sites bancários on-line, que a vítima possa estar usando. Figura 3: O EmbusteBot verifica o título de uma janela de segundo plano para corresponder aos nomes dos bancos brasileiros alvos. O fluxo geral de eventos ocorre conforme descrito abaixo:
  1. Obter o acesso a uma janela de segundo plano.
  2. Obter o nome da classe de uma janela de segundo plano.
  3. Comparar o nome da classe com sequências decriptografadas:
    1. IEFRAME (IEdge);
    2. CHROME_WIDGETWIN_1 (Google Chrome);
    3. MOZILLAWINDOWCLASS (Mozilla Firefox);
    4. SUNAWTFRAME (Java);
    5. APPLICATIONFRAMEWINDOW (Aplicativos Windows 10); e
    6. BUTTONCLASS, MAKROBROWSER (pacotes de navegadores da Internet genéricos).
  4. Se o nome da classe contém uma das subsequências, pular para a etapa cinco. Se não, retornar para a etapa um após uma breve pausa.
  5. Obter o título do texto de uma janela de segundo plano.
  6. Comparar o título com uma lista elaborada de sequências decriptografadas de nomes de bancos e de nomes de aplicativos da web financeiros.
  7. Se o título da janela contém uma das subsequências acima, o malware inicia sua atividade maliciosa. Se nenhuma é localizada, ele retorna para a etapa um após uma breve pausa.
Quando se trata de bancos específicos, o malware pode verificar alguns detalhes adicionais para certificar-se de que uma página real, de banco on-line, esteja de fato sendo navegada pela vítima. Ao confirmar que a vítima está navegando no website de um banco e que uma janela ativa correspondeu com sucesso a um banco-alvo, o EmbusteBot coleta as informações gerais sobre o sistema operacional (SO) e o ambiente de hardware do terminal infectado no formato a seguir, em que XX-XX-XX-XX é o endereço do MAC da máquina de uma vítima:

MACHINE_NAME;Windows X Service Pack X(version X.X, BUILD XXXX XX-bit Edition)Disabled;XX-XX-XX-XX;Disabled;0.0.4.

Em seguida, o malware envia as informações ao botmaster, codificadas na sequência de formato BASE64. Uma das URLs do servidor de comando e controle (C&C) que localizamos para o EmbusteBot foi: www.calculadora05.debitopendentes.com. Um servidor C&C adicional parece ser usado principalmente para controlar as operações do malware: www.20-02-2017.certidaonegativas.com.

Engenharia Social Seletiva

Em alguns casos, o EmbusteBot mascara ainda mais sua atividade suspeita com uma falsa janela sobreposta informando às vítimas que um módulo de proteção está sendo transferido por download para evitar o roubo de informações, conforme mostrado na Figura 4. Ele tenta ganhar a confiança simulando um logotipo do Trusteer Rapport. Figura 4: O EmbusteBot mostra uma falsa janela recomendando o download de um módulo de proteção no terminal da vítima, tentando imitar o logotipo do Trusteer Rapport para ganhar a confiança.

Malware Brasileiro: Se Não Quebrou, Não Conserte

Os últimos anos mostram que o cenário de crime cibernético no Brasil percorreu um longo caminho até o uso de malware para facilitar a fraude a bancos. Os fraudadores continuam adotando várias técnicas para infectar mais vítimas em potencial. O EmbusteBot não é totalmente genérico em sua atividade contra bancos como outros malwares desse tipo. Em vez disso, ele pode incluir estratégias seletivas contra diferentes clientes de bancos enquanto atinge os maiores bancos do Brasil.

IoCs de Elementos Pesquisados para o EmbusteBot

Hash de executável: 6c37f672722c0f4ba744e1159035feff933ddee0e1e5a59e05f3fed53be42395 Hash da DLL maliciosa: c3b8dba30e7c32d88b506de4cd5ddee80fcf28a339205fc50331913ba70f6d6c Há anos o IBM Security tem ajudado os bancos a identificar e prevenir a atividade de malware financeiro, incluindo as técnicas descritas neste artigo. Para saber mais sobre nossas soluções antifraude, visite IBM Security.

[button link="https://www-01.ibm.com/marketing/iwm/dre/signup?source=mrs-form-9451&S_PKG=ov54550 " color="orange1" icon="download" size="large"]Leia o whitepaper: Reequilibrando o poder com a prevenção de fraude cognitiva[/button]

Close Translation

IBM Research — Haifa Labs continually invests in the research and development of advanced malware analysis solutions that enhance IBM’s ability to quickly detect and neutralize malware as new and challenging threats arise. Our ongoing observations of the Brazilian cybercriminal landscape have revealed a perpetual rise in new malicious campaigns in this region of the world, especially those targeting online banking and payment platforms.

In one of our recent collaborations with IBM Security Trusteer researchers, we analyzed new financial malware that targets dozens of major Brazilian banks. Beyond its generic capabilities, this malware employs specific schemes for different banks and allows attackers to gain full control of a victim’s endpoint. We dubbed the malware EmbusteBot, after the Portuguese word “Embuste,” meaning a hoax or scam.

Read the white paper: Shifting the balance of power with cognitive fraud prevention

Sample Overview

The Brazilian cybercriminal scene is known for its affinity for Delphi-based malcode, and the sample we analyzed is no exception. In this case, the malware’s authors employ a scheme where a benign executable is used to load a malicious dynamic link library (DLL) on the target endpoint to activate the payload.

The DLL’s size is rather hefty — 3.3 MB — and it comes with an OpenSSL library inside. The codes were statically compiled and linked together, likely used to encrypt network traffic. At the time of this writing, the malware was only detected by a small number of antivirus engines. We tested the sample and the malicious DLL on VirusTotal and observed low or generic detection in the wild (see Figure 1).

Figure 1: Detection results for EmbusteBot executable and malicious DLL on VirusTotal

One notable characteristic of this sample is the lack of code packing or encryption of potentially sensitive code paths that correspond with the malware’s malicious activity. According to X-Force, the authors did not use many anti-research techniques to make analysis harder. This oversight could be due to a lack of required competence, or the authors may have tried to make the DLL appear more legitimate for antivirus scanners without added obfuscation. The malware still performs some encryption of sensitive strings in several important parts of the DLL and time-based anti-research checks.

EmbusteBot is designed to:

  • Find out which browser window runs on a victim’s machine.
  • Find a match for the window title in a list of targeted banks and bank applications.
  • Take over a victim’s endpoint, using fake overlays in some cases.
  • Launch fraudulent transactions from the victim’s account.

EmbusteBot’s Window-Monitoring Queue

EmbusteBot’s most likely delivery path lies in malware-laden email spam. The malware’s execution on target endpoints begins with dynamic loading of a malicious DLL to find out what browser the victim uses and what’s on the active tab.

After initialization, the malware generates a search queue where it scans for specific window class names that represent targeted web browsing applications, such as Google Chrome (see Figure 2).


Figure 2: The malware scans for window classes appearing in the foreground, looking for specific class names related to web browsers.

EmbusteBot checks for window classes of the top three most popular web browsers — Internet Explorer, Google Chrome and Mozilla Firefox — to determine whether any appear on the foreground of the victim’s screen.

The malware further checks for active Windows 10 Store Container windows (APPLICATIONFRAMEWINDOW class name) and active Java (SUNAWTFRAME class name). When one of the required windows is found running in the foreground, the malware moves to the next step.

Obtaining Window Title in Search of Active Bank Pages

The next step involves the GetWindowText WinAPI function used to obtain the text that appears as the window’s title on an open web browser the victim is using. The same routine (decrypt_string) is used to decrypt strings and compare them with the result of GetWindowText (see Figure 3), in search of online banking sites the victim may be using.

Figure 3: EmbusteBot checks the title of a foreground window to match the names of targeted Brazilian banks.

The overall flow of events here is as follows:

  1. Get the handle of a foreground window.
  2. Get the class name of a foreground window.
  3. Compare class name with decrypted strings:
    1. IEFRAME (Internet Explorer);
    2. CHROME_WIDGETWIN_1 (Google Chrome);
    3. MOZILLAWINDOWCLASS (Mozilla Firefox);
    4. SUNAWTFRAME (Java);
    5. APPLICATIONFRAMEWINDOW (Window 10 Applications); and
    6. BUTTONCLASS, MAKROBROWSER (generic bundled Internet browsers).
  4. If the class name contains one of the substrings, jump to step five. If not, return to step one after a short pause.
  5. Get the text title of a foreground window.
  6. Compare the title with an elaborate list of decrypted strings of bank names and banking web application names.
  7. If the window title contains one of the above substrings, the malware commences its malicious activity. If none are found, it returns to step one after a short pause.

When it comes to specific banks, the malware may check for some additional details to make sure a concrete online banking page is indeed being navigated by the victim.

Upon confirming that the victim is browsing a bank’s website and an active window was successfully matched with a target bank, EmbusteBot collects general information about the infected endpoint’s operating system (OS) and hardware environment in the following format, where XX-XX-XX-XX is the MAC address of a victim’s machine:

MACHINE_NAME;Windows X Service Pack X(version X.X, BUILD XXXX XX-bit Edition)Disabled;XX-XX-XX-XX;Disabled;0.0.4.

Next, the malware sends the information to the botmaster, encoded in BASE64 format string. One of the command-and-control (C&C) server URLs we found for EmbusteBot was: www[.]calculadora05[.]debitopendentes[.]com.

An additional C&C server appears to be primarily used to control the malware’s operations: www[.]20-02-2017[.]certidaonegativas[.]com.

Selective Social Engineering

In some cases, EmbusteBot further masks its suspicious activity with a fake overlay window informing victims that a protection module is being downloaded to prevent information theft, as shown in Figure 4. It attempts to gain trust by faking a Trusteer Rapport logo.


Figure 4: EmbusteBot shows a fake window that recommends downloading a protection module to the victim’s endpoint, attempting to imitate the Trusteer Rapport logo to gain trust.

Brazilian Malware: If It Ain’t Broke, Don’t Fix It

The past several years show that the Brazilian cybercriminal scene has come a long way in terms of using malware to facilitate bank fraud. Fraudsters continue to adopt various techniques to infect more potential victims. EmbusteBot is not fully generic in its activity against banks like other malware of its kind. Rather, it can add selective strategies against different bank clients while targeting the largest banks in Brazil.

IoCs of Researched Elements for EmbusteBot

Hash of executable: 6c37f672722c0f4ba744e1159035feff933ddee0e1e5a59e05f3fed53be42395

Hash of malicious DLL: c3b8dba30e7c32d88b506de4cd5ddee80fcf28a339205fc50331913ba70f6d6c

IBM Security has been helping banks identify and prevent the activity of financial malware, including the techniques described in this article, for years. To learn more about our anti-fraud solutions, please visit IBM Security.

Read the white paper: Shifting the balance of power with cognitive fraud prevention

More from Malware

Ongoing ITG05 operations leverage evolving malware arsenal in global campaigns

13 min read - As of March 2024, X-Force is tracking multiple ongoing ITG05 phishing campaigns featuring lure documents crafted to imitate authentic documents of government and non-governmental organizations (NGOs) in Europe, the South Caucasus, Central Asia, and North and South America. The uncovered lures include a mixture of internal and publicly available documents, as well as possible actor-generated documents associated with finance, critical infrastructure, executive engagements, cyber security, maritime security, healthcare, business, and defense industrial production. Beginning in November 2023, X-Force observed ITG05…

X-Force Threat Intelligence Index 2024 reveals stolen credentials as top risk, with AI attacks on the horizon

4 min read - Every year, IBM X-Force analysts assess the data collected across all our security disciplines to create the IBM X-Force Threat Intelligence Index, our annual report that plots changes in the cyber threat landscape to reveal trends and help clients proactively put security measures in place. Among the many noteworthy findings in the 2024 edition of the X-Force report, three major trends stand out that we’re advising security professionals and CISOs to observe: A sharp increase in abuse of valid accounts…

Hive0051’s large scale malicious operations enabled by synchronized multi-channel DNS fluxing

12 min read - For the last year and a half, IBM X-Force has actively monitored the evolution of Hive0051’s malware capabilities. This Russian threat actor has accelerated its development efforts to support expanding operations since the onset of the Ukraine conflict. Recent analysis identified three key changes to capabilities: an improved multi-channel approach to DNS fluxing, obfuscated multi-stage scripts, and the use of fileless PowerShell variants of the Gamma malware. As of October 2023, IBM X-Force has also observed a significant increase in…

Topic updates

Get email updates and stay ahead of the latest threats to the security landscape, thought leadership and research.
Subscribe today