‘Earth Wendigo’ Hackers Exfiltrate Emails Through JavaScript Backdoor


A newly identified malware attack campaign has been exfiltrating emails from targeted organizations using a JavaScript backdoor injected into a webmail system widely used in Taiwan.  

According to an advisory from Trend Micro, the attacks are linked to Earth Wendigo, a threat actor that does not appear to be affiliated with known hacking groups.

Starting May 2019, Trend Micro said Earth Wendigo has been targeting multiple organizations, including government entities, research institutions, and universities in Taiwan.

The attacks include the use of spear-phishing emails to various targets, including politicians and activists linked to Tibet, the Uyghur region, or Hong Kong.

As an initial attack vector, the group used spear-phishing emails containing obfuscated JavaScript code meant to load malicious scripts from an attacker-controlled remote server.

These scripts were designed to steal browser cookies and webmail session keys, propagate the infection by appending code to the victim’s email signature, and exploit a cross-site scripting (XSS) vulnerability in the webmail server for JavaScript injection.

The exploited XSS vulnerability resides in the webmail system’s shortcut feature and allows the attackers to add a shortcut with a crafted payload, replacing parts of the webmail system’s page with malicious JavaScript code.

Trend Micro reported that the XSS vulnerability was fixed in January 2020, meaning that only organizations that haven’t updated to the latest version of the webmail server remain exposed.

Should this method fail, the attackers’ script registers malicious JavaScript code to the server’s Service Worker (a programmable network proxy inside the browser), so that it could intercept and manipulate HTTPS requests, hijack login credentials, and add malicious scripts to the webmail page.

After performing the XSS injection or adding code to the Service Worker, which ensures that the malicious script is constantly loaded and executed, the attackers proceed to exfiltrate emails by establishing a WebSocket connection to an injected JavaScript backdoor.

The backdoor reads emails on the server and sends their content and attachments to the attacker’s WebSocket server.

In addition to targeting webmail servers, Earth Wendigo also uses Python malware compiled as Windows executables, which were found to be shellcode loaders for code likely from Cobalt Strike.

Some of the Python samples are backdoors that request additional Python code from the command and control (C&C) server. However Trend Micro couldn’t determine the purpose of the fetched code.

Related: Thousands of Taiwan Government Email Accounts ‘Hacked by China’

Related: Chinese Hackers Target Uyghurs With Multiple Android Surveillance Tools

Related: Turla’s Updated ComRAT Malware Uses Gmail for C&C Communication

view counter

Ionut Arghire is an international correspondent for SecurityWeek.

Previous Columns by Ionut Arghire:
Tags:

Don't forget to share

You may also like...

Leave a Reply

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