We discovered that the Cobalt Strike instance added a persistence registry key to load an exploit file from an online code repository controlled by Water Labbu. The repository hosted multiple exploit files of CVE-2021-21220 (a Chromium vulnerability affecting versions before 89.0.4389.128) to execute a Cobalt Strike stager. It also contained files designed to target Meiqia (), a Chinese desktop-based live chat app for online customer support that is used on websites. MeiQia () was developed using ElectronJS a framework that employs Chromium core, and therefore is vulnerable to Chromiums vulnerabilities.
We observed that many cryptocurrency scam websites that were compromised in this campaign also embedded Meiqia to provide an option for easy communication with potential victims. This association suggests that Water Labbu likely sends the exploit via the live chat box. To support this claim, we found an exploit HTML file sample containing a screenshot that looks like a withdrawal confirmation for cryptocurrency funds. If scammers open the exploit page in an old vulnerable version of the Meiqia management client application, its possible that they might get infected by Water Labbu.
The infection is initiated when) the initial scammer (in essence, the victim) opens a weaponized webpage (likely sent to them via livechat). A recent research paper on Electron security demonstrated a successful exploitation of an Electron-based application using CVE-2021-21220. In this scenario, it leveraged cross-site scripting (XSS) techniques to force the exploit to be rendered in a window without sandboxing.
We found weaponized HTML pages created by Water Labbu that leverages the same Chromium vulnerability to attack the MeiQia application. The initial scammers used an old version of MeiQia, which might be vulnerable to exploits. Review of the code shows that old versions of MeiQia open external links inside their ElectronJS applications and render the web page without sandboxing. The latest version of MeiQia is not vulnerable because it runs on the newer version of Chromium core and also opens the external links, not inside the ElectronJS app, but via the default system web browser.
The weaponized HTML pages contain JavaScript that uses the User-Agent to identify whether the environment of the victim is vulnerable. The script detects strings such as electron and x64 to discover Electron-based applications and x64 architecture. It also detects the strings 0.0.8 Chrome/83, s/0.0.7, or s/0.0.6, to identify if it is running inside a vulnerable version of Chromium or MeiQia application. If the User-Agent does not match, it will either redirect victims to the official MeiQia website or create a new iframe to load screenshots from banking or cryptocurrency transactions. Its likely that these are the lures Water Labbu used to communicate with the targeted cryptocurrency scam websites.
When the weaponized HTML pages detect a vulnerable target, it will proceed with loading additional stages of the attack.
The last stage involves the creation and loading of a new script called tongji.js, which in Chinese means (to deliver a punishing attack). These files are hosted inside Water Labbus code repository. The tongji.js script is a JavaScript containing CVE-2021-21220 exploit code, with a shellcode that is a Cobalt Strike stager. The Metasploit module for this vulnerability is publicly available. Water Labbu reuses the available code, obfuscates it with one or more layers of obfuscation (sojson.v4, jsjiami.com.v5), before executing the custom shellcode.
The embedded shellcode can either be a Cobalt Strike stager or a complex batch command capable of stealing credentials, and downloading and running other scripts and files.
Regardless if the embedded shellcode is the stager or the custom batch script, we noticed that the set of malicious operations that were being performed were largely the same:
1) Download and install Cobalt Strike2) Steal cookies and other important files3) Download and patch the MeiQia app4) Download additional spying software5) Provide information about the infection progress by communicating with the report-collecting server, among others
The Cobalt Stike stager is usually encrypted (XOR, AES), encoded (Base64, hexadecimal), and embedded into a Golang shellcode runner to make payload detection more difficult. The malware operator was likely inspired by this blog post.
It attempts to steal *.txt files in desktop, Telegram Desktop, and MeiQia cookies in AppDataRoamingcom.meiqia.windowscookies. These files are included in a specially crafted .html file and submitted to the information-collecting server with the help of headless Chrome (without visible UI) or Internet Explorer (if submission with Chrome fails). The specially crafted .html file contains one form, one input text with the computer name, and one text area with stolen content. After the timeout expires, the script will automatically submit the content to a typosquatting domain.
If Cobalt Strike has not been installed yet, then it is downloaded and executed. The Golang shellcode runner is used as a form of obfuscation.
To learn more about the success or failure of the infection progress, parameters such as COMPUTERNAME and USERNAME are exfiltrated to the report-collecting server. In case of failure, the server may call the following requests:
If the MeiQia app is not found, the error report with parameter a is sent. If the app is found and is unpatched, the error report with parameter b is sent. If the discretionary access control list modifications with icacls fails, the error report with parameter z is sent.
Meanwhile, another script checks if the process 360tray belonging to the 360 Total Security solution is running:
In some cases, we also noticed DNS and HTTP monitoring platforms such as ceye.io being used to collect information about the infection progress:
If necessary, this batch script will download a vulnerable version of Chrome (89.0.4389.114) and/or an-already patched MeiQia application from a repository found on a popular version control site. These files are downloaded and extracted to the infected system.
The script modifies the Run registry key for persistence, with the persistent command being chrome.exe --headless --no-sandbox --user-data-dir=
This script adds a certificate to Trusted Root by via the certutil utility:
The script installs a certificate with the filename "mitmproxy-ca-cert.pem" into Trusted Root. Although we dont have the certificate file, It's likely that it is generated by mitmproxy tool due to its file name.
It then modifies the AutoConfigURL setting in HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings. These settings allow a user to specify certain domains to have their traffic forwarded through a proxy. With the help of a malicious certificate installed in the root directory, an attacker will be able to decrypt HTTPS encrypted traffic and steal entered credentials.
The additional scripts perform the following:
a) Hiding windows with the title windows update.b) Downloading and running osmonitor, a tool for spying on victims and monitoring their behavior.c) Patching the MeiQia app, either by downloading an already-patched app0.2.asar archive and replacing it, or by running a patcher scriptd) Restarting the MeiQia app to start the patched versione) Stealing *.txt and *.xl* files from Recent Files, steals *.lnk, *.txt, *.xl* files from Desktop, and adds a list of processes and list of active network connections before packing these into a zip archive and uploading it to an OS information-collecting server
The process of patching MeiQia involves changing files in the app.asar archive. In our scenario, the .modulescreate-window.js file from the app.asar archive was modified. The modifications included:
a) Disabling auto updatesb) Setting fixed window sizesc) Replacing the default URL (https://app.meiqia.com) with a malicious oned) Embedding additional JavaScript files to be executed within the MeiQia application context
When victims open a new MeiQia window, the script injected to the internal function new-window will check the title of the web page. If the title doesnt contain the string (MeiQia), it will redirect victims to the official MeiQia website and execute additional JavaScript files within the page.
During our research, we discovered that many of the links used for loading additional scripts were no longer active. However, one of the links loading a script called apo.js ( = mother-in-law) from their code repository was still available.
If the title contains the Chinese string (dng l = login), the script will try to grab the value of DOM elements with the IDs email and password and send the grabbed data to the remote server app[.]meiqiacontents[.]com. If the title contains the Chinese word (Mei), it will collect the websites cookies and send them to the same remote server.
When victims open a new window without specifying any URL to load, the new window will load the default URL of the application (APP_URL), which has also been replaced with a malicious URL hosted on the delivery server mmmm[.]whg7[.]cc. The delivery server will only respond when the User-Agent contains the string Electron to ensure that it is sent from an Electron application.
The request to the malicious URL responds with a code that redirects to the MeiQia apps original default URL. At the same time, it creates a small new window to load another URL that will perform several redirections before finally attempting to exploit CVE-2021-21220 to launch a Cobalt Strike stager.
Water Labbu registered the typosquatting domain name meiqla.com (compared to the legitimate meiqia.com). Although the website looks visually identical to the legitimate one, there is one noteworthy malicious feature.
Figure 14 shows how the function lc() reads the user-entered email and password and exfiltrates them to an information-recording PHP script before redirecting victims to the legitimate meiqia.com website.
Water Labbu is a dangerous new threat actor with a complex routine and infrastructure that isnt afraid to leverage the schemes of other scammers for its own ends, exploiting live chat applications on preexisting scam websites that were developed using the ElectronJS framework.
A key part of the threat actors routine is the exploitation of a known Chromium vulnerability to target scammers who use an unpatched version of the MeiQia app. Given that users are dealing not only with the original scammer, but with Water Labbu as well, we advise both individuals and organizations to update their applications and systems to the latest secure versions to prevent vulnerable software from being exploited and used in malicious ways.
Read the first part of our Water Labbu series to learn more about how the threat actor compromises Dapps for their own purposes.
The indicators of compromise for this blog entry can be found here.
Read more here:
How Water Labbu Exploits Electron-Based Applications - Trend Micro
- Google researchers have cracked a key internet security tool - Recode [Last Updated On: February 26th, 2017] [Originally Added On: February 26th, 2017]
- Letter: Internet security is in jeopardy - INFORUM [Last Updated On: February 26th, 2017] [Originally Added On: February 26th, 2017]
- New internet security device launched to safeguard schools against child abuse - Phys.Org [Last Updated On: February 26th, 2017] [Originally Added On: February 26th, 2017]
- Everything You Need to Know About Cloudbleed, the Latest Internet Security Disaster - Gizmodo [Last Updated On: February 26th, 2017] [Originally Added On: February 26th, 2017]
- Data from internet-connected teddy bears held ransom, security expert says - Fox News [Last Updated On: February 28th, 2017] [Originally Added On: February 28th, 2017]
- Emsisoft Internet Security 2017.2.0.7219 - TechCentral.ie [Last Updated On: February 28th, 2017] [Originally Added On: February 28th, 2017]
- What you need to know about 'Cloudbleed,' the latest internet security bug - Globalnews.ca [Last Updated On: February 28th, 2017] [Originally Added On: February 28th, 2017]
- Google cracks longtime pillar of internet security - MarketWatch [Last Updated On: February 28th, 2017] [Originally Added On: February 28th, 2017]
- BullGuard | Internet Security and Antivirus protection ... [Last Updated On: March 2nd, 2017] [Originally Added On: March 2nd, 2017]
- Internet Storm Center - SANS Internet Storm Center [Last Updated On: March 2nd, 2017] [Originally Added On: March 2nd, 2017]
- Internet-connected 'smart' devices are dunces about security - ABC News [Last Updated On: March 11th, 2017] [Originally Added On: March 11th, 2017]
- Derry internet security expert warns that advanced internet technology 'a risk to us all' - Derry Now [Last Updated On: March 11th, 2017] [Originally Added On: March 11th, 2017]
- Firewall Test, Web Tools and Free Internet Security Audit ... [Last Updated On: March 11th, 2017] [Originally Added On: March 11th, 2017]
- Internet security in the spotlight: How is the internet safer today than it was 20 years ago? - Mobile Business Insights (blog) [Last Updated On: March 11th, 2017] [Originally Added On: March 11th, 2017]
- Jim Mullen: Unsocial internet security | Columnists | auburnpub.com - Auburn Citizen [Last Updated On: March 11th, 2017] [Originally Added On: March 11th, 2017]
- Internet security company launches a perfume line to promote cybersecurity - Mashable [Last Updated On: March 12th, 2017] [Originally Added On: March 12th, 2017]
- Internet security - Wikipedia [Last Updated On: March 12th, 2017] [Originally Added On: March 12th, 2017]
- Are you undermining your web security by checking on it with the wrong tools? - The Register [Last Updated On: March 18th, 2017] [Originally Added On: March 18th, 2017]
- Bruce Schneier on New Security Threats from the Internet of Things - Linux.com (blog) [Last Updated On: March 18th, 2017] [Originally Added On: March 18th, 2017]
- Carpe Diem: home internet security - KFOX El Paso [Last Updated On: March 18th, 2017] [Originally Added On: March 18th, 2017]
- Motivation Monday: home internet security - KFOX El Paso [Last Updated On: March 18th, 2017] [Originally Added On: March 18th, 2017]
- Medical records of 26m patients at risk because of GP surgeries' failing internet security - The Sun [Last Updated On: March 18th, 2017] [Originally Added On: March 18th, 2017]
- Free Internet Security | Why Comodo Internet Security Suite ... [Last Updated On: March 18th, 2017] [Originally Added On: March 18th, 2017]
- Internet Security Software | Trend Micro USA [Last Updated On: March 18th, 2017] [Originally Added On: March 18th, 2017]
- Fix crap Internet of Things security, booms Internet daddy Cerf - The Register [Last Updated On: March 21st, 2017] [Originally Added On: March 21st, 2017]
- Internet of Things security: What happens when every device is smart and you don't even know it? - ZDNet [Last Updated On: March 21st, 2017] [Originally Added On: March 21st, 2017]
- CUJO is cuter than Wall-E, and it's the only internet security device you'll ever need - Yahoo News [Last Updated On: March 21st, 2017] [Originally Added On: March 21st, 2017]
- The Senate just voted to undo landmark rules covering your Internet privacy - Washington Post [Last Updated On: March 25th, 2017] [Originally Added On: March 25th, 2017]
- What the Cloudbleed disaster says about the state of internet security - Information Age [Last Updated On: March 25th, 2017] [Originally Added On: March 25th, 2017]
- Google Has Declared Symantec Harmful To Internet Security - UPROXX [Last Updated On: March 25th, 2017] [Originally Added On: March 25th, 2017]
- Internet Security Analysts: North Korea Is Planning a Global Bank Heist - Breitbart News [Last Updated On: March 28th, 2017] [Originally Added On: March 28th, 2017]
- Internet Security Firm Confirms WikiLeaks 'Vault 7' At Least 40 Cyberattacks Tied to the CIA - The Ring of Fire Network [Last Updated On: April 14th, 2017] [Originally Added On: April 14th, 2017]
- Homeland Security warns of 'BrickerBot' malware that destroys unsecured internet-connected devices - ZDNet [Last Updated On: April 20th, 2017] [Originally Added On: April 20th, 2017]
- A Global Industry First: Industrial Internet Consortium and Plattform Industrie 4.0 to Host Joint IIoT Security ... - Business Wire (press release) [Last Updated On: April 20th, 2017] [Originally Added On: April 20th, 2017]
- Mucheru urges private sector to boost investment in internet security - The Standard (press release) [Last Updated On: April 25th, 2017] [Originally Added On: April 25th, 2017]
- Cloudflare debuts a security solution for IoT - TechCrunch [Last Updated On: April 28th, 2017] [Originally Added On: April 28th, 2017]
- Russian-controlled telecom hijacks financial services' Internet traffic - Ars Technica [Last Updated On: April 28th, 2017] [Originally Added On: April 28th, 2017]
- Avira Internet Security Suite v15.0.26 - TechCentral.ie [Last Updated On: April 28th, 2017] [Originally Added On: April 28th, 2017]
- NSA To Limit Some Collection Of Internet Communication - NPR [Last Updated On: April 29th, 2017] [Originally Added On: April 29th, 2017]
- Report Indicates '10 Concerts' Facebook Trend Could Compromise Your Internet Security - Complex [Last Updated On: April 29th, 2017] [Originally Added On: April 29th, 2017]
- "Improving the World" through Internet Security: Chatting with David Gorodyansky, CEO of AnchorFree - Huffington Post [Last Updated On: May 3rd, 2017] [Originally Added On: May 3rd, 2017]
- Don't Fall For This Tech Support Scam Targeting PC Users - KTLA [Last Updated On: May 3rd, 2017] [Originally Added On: May 3rd, 2017]
- Yikes! Antivirus Software Fails Basic Security Tests - Tom's Guide [Last Updated On: May 3rd, 2017] [Originally Added On: May 3rd, 2017]
- Watch Hackers Sabotage an Industrial Robot Arm - WIRED [Last Updated On: May 3rd, 2017] [Originally Added On: May 3rd, 2017]
- Decoding Internet Security: Spear phishing - Washington Post [Last Updated On: May 5th, 2017] [Originally Added On: May 5th, 2017]
- From the Desk of Jay Fallis: To internet vote, or not to internet vote - BarrieToday [Last Updated On: May 7th, 2017] [Originally Added On: May 7th, 2017]
- Crippling cyberattack continues to spread around the world - Los Angeles Times [Last Updated On: May 14th, 2017] [Originally Added On: May 14th, 2017]
- Cyber Security Experts: Russia Disproportionately Targeted by Malware - Voice of America [Last Updated On: May 14th, 2017] [Originally Added On: May 14th, 2017]
- The Latest: 29000 Chinese institutions hit by cyberattack - ABC News [Last Updated On: May 15th, 2017] [Originally Added On: May 15th, 2017]
- Cyberattack Aftershock Feared as US Warns of Its Complexity - New York Times [Last Updated On: May 15th, 2017] [Originally Added On: May 15th, 2017]
- This week's poll: Priorities for improving internet security - The Engineer [Last Updated On: May 18th, 2017] [Originally Added On: May 18th, 2017]
- Akamai Releases First Quarter 2017 State of the Internet / Security Report - PR Newswire (press release) [Last Updated On: May 18th, 2017] [Originally Added On: May 18th, 2017]
- Do Macs get viruses? - PC Advisor [Last Updated On: May 18th, 2017] [Originally Added On: May 18th, 2017]
- Massive Ransomware Attack Underscores Threats To Internet Security - Benzinga [Last Updated On: May 19th, 2017] [Originally Added On: May 19th, 2017]
- Security News This Week: Hoo-Boy, Mar-a-Lago's Internet Is Insecure - WIRED [Last Updated On: May 20th, 2017] [Originally Added On: May 20th, 2017]
- Internet security firm calls for law to compel information sharing to ... - The Star, Kenya [Last Updated On: May 22nd, 2017] [Originally Added On: May 22nd, 2017]
- Check It Out: No need to unplug after reading books on internet security - The Columbian [Last Updated On: May 22nd, 2017] [Originally Added On: May 22nd, 2017]
- How to beat security threats to 'internet of things' - BBC News - BBC News [Last Updated On: May 25th, 2017] [Originally Added On: May 25th, 2017]
- Best Mac antivirus 2017 - Macworld UK [Last Updated On: May 25th, 2017] [Originally Added On: May 25th, 2017]
- Avira, Kaspersky Top Windows 10 Antivirus Tests - Tom's Guide [Last Updated On: May 25th, 2017] [Originally Added On: May 25th, 2017]
- Paranoid about internet security? Here are the most secure OS options - The American Genius [Last Updated On: May 28th, 2017] [Originally Added On: May 28th, 2017]
- Blockchain Offers Hope for the Broken Internet - Fortune [Last Updated On: May 28th, 2017] [Originally Added On: May 28th, 2017]
- New uses for RFID and security for the internet of things - Phys.Org [Last Updated On: May 31st, 2017] [Originally Added On: May 31st, 2017]
- Security Best Practices for the Internet of Things - Web Host Industry Review [Last Updated On: May 31st, 2017] [Originally Added On: May 31st, 2017]
- Internet infrastructure security guidelines for Africa unveiled - Premium Times [Last Updated On: May 31st, 2017] [Originally Added On: May 31st, 2017]
- In addressing internet security issues, make sure to provide solutions - Minneapolis Star Tribune [Last Updated On: May 31st, 2017] [Originally Added On: May 31st, 2017]
- Whistic Partners with the Center for Internet Security to Extend the ... - PR Web (press release) [Last Updated On: June 1st, 2017] [Originally Added On: June 1st, 2017]
- Internet Security Alliance: NIST framework metrics should focus on threats - Inside Cybersecurity (subscription) [Last Updated On: June 1st, 2017] [Originally Added On: June 1st, 2017]
- China cyber-security law will keep citizens' data within the Great Firewall - The Register [Last Updated On: June 1st, 2017] [Originally Added On: June 1st, 2017]
- Cyber security: Africa gets Internet security guidelines - TheNewsGuru [Last Updated On: June 1st, 2017] [Originally Added On: June 1st, 2017]
- China to Implement Its First Law on Internet Security After Ransomware Attack - Sputnik International [Last Updated On: June 1st, 2017] [Originally Added On: June 1st, 2017]
- Decoding Internet Security: Ransomware - Washington Post [Last Updated On: June 1st, 2017] [Originally Added On: June 1st, 2017]
- Internet security upgrade on course - Business Daily (press release) (blog) [Last Updated On: June 1st, 2017] [Originally Added On: June 1st, 2017]
- What's the Safest Laptop For Internet Security? - HuffPost [Last Updated On: June 2nd, 2017] [Originally Added On: June 2nd, 2017]
- Every Day Is Internet Security Day - The Chief-Leader [Last Updated On: June 3rd, 2017] [Originally Added On: June 3rd, 2017]
- 5 Reasons why internet security is crucial in 2017 - Techworm [Last Updated On: June 3rd, 2017] [Originally Added On: June 3rd, 2017]
- Are Pop-Ups An Internet Security Threat? - Good Herald [Last Updated On: June 4th, 2017] [Originally Added On: June 4th, 2017]
- 3 Ways Software Programs Can Help With Internet Security in 2017 - Geek Snack [Last Updated On: June 7th, 2017] [Originally Added On: June 7th, 2017]
- Inside Social Security: Make every day your internet security day - Santa Ynez Valley News [Last Updated On: June 7th, 2017] [Originally Added On: June 7th, 2017]
- SOCIAL SECURITY: Every day is internet security day - Palm Beach Post [Last Updated On: June 7th, 2017] [Originally Added On: June 7th, 2017]