Wednesday, December 11, 2024
HomeCloudCloud-Based Malware Attack Abusing Google Drive & Dropbox

Cloud-Based Malware Attack Abusing Google Drive & Dropbox

Published on

SIEM as a Service

A phishing email with a malicious zip attachment initiates the attack. The zip contains a single executable disguised as an Excel file using Left-To-Right Override characters (LTRO). 

LTRO makes the filename appears to have a harmless .xlsx extension (e.g., RFQ-101432620247flexe.xlsx) while it’s actually an executable (.exe).

Unsuspecting users, deceived by the icon and filename, launch the malware by opening the executable disguised as an Excel spreadsheet.

- Advertisement - SIEM as a Service

Free Webinar on Live API Attack Simulation: Book Your Seat | Start protecting your APIs from hackers

A small (560KB) executable compiled with Visual Studio 2015 heavily employs XOR encoding (hex offset E2) to obfuscate strings and embedded files, hindering static analysis, and the executable drops VBScript payloads and a legitimate Excel file. 

Binary executable analysis: Payload overview

The VBScript execution is believed to be the core malicious functionality, while the Excel file likely serves as a decoy to prevent user suspicion in case the VBScript fails. 

Malware dropper executed the payload and wrote several files to the C:\ProgramData directory, a common location for malware due to its hidden nature and write permissions.

These files (20240416.xlsx, 3156.vbs, etc.) were embedded within the payload itself, encoded with XOR to hide their content from basic analysis. 

Payload dynamic analysis: ProgramData directory

The transitions from binary execution to a VBScript stage, which writes a heavily obfuscated script (3156.vbs) to the ProgramData folder and executes it using wscript.exe, suppressing errors, setting the working directory, and then creating objects to interact with the file system and shell. 

The core functionality involves executing two subsequent VBScripts (i4703.vbs and i6050.vbs) and a lure file (20240416.xlsx) using ShellExecute.

To ensure the completion of these tasks, the script sleeps for 3000 seconds before deleting all .vbs and .jse files from ProgramData.  

3156.vbs deobfuscated code

The malicious VBScript, i4703.vbs, creates a scheduled task disguised as a Google Chrome update to achieve persistence on the infected system, which runs a separate VBScript, located at “C:\Programdata\97468.tmp”, every minute with the highest privileges by mimicking legitimate system processes. 

According to Securonix, the obfuscated script further complicates analysis but its purpose of downloading additional malicious payloads will be investigated later.  

XML file for newly created scheduled task from i4703.vbs

The malware analyzed employs a multi-stage attack using VBScript and PowerShell.

In stage 4, two VBScripts (i6050.vbs and a scheduled task) are executed, which create additional scheduled tasks that launch temporary VBScript files (97468.tmp and 68904.tmp) every minute. 

These temporary VBScripts then use WScript.Shell to bypass execution policies and run PowerShell scripts (Tmp912.tmp, tmpdbx.ps1, Tmp703.tmp, zz.ps1) using various obfuscated techniques.  

The attacker leverages two sets of scheduled tasks to execute malicious PowerShell scripts every minute, as the first set executes VBScripts that download and run Tmp912.tmp and Tmp703.tmp.

Tmp912.tmp interacts with Dropbox by refreshing an access token, uploading a log file, and downloading tmpdbx.ps1. 

example of tmpdbx.ps1 contents

Tmp703.tmp interacts with Google Drive by refreshing an access token and downloading zz.ps1.

The second set of scheduled tasks executes tmpdbx.ps1 and zz.ps1, which download additional files from Dropbox and Google Drive, respectively, based on predefined patterns. 

The attackers deployed a PowerShell script to download a compressed binary and execute it in memory using reflection, which bypasses file scanning by antivirus and EDR software. 

The script extracts the binary (skipping the first 10 bytes), loads it as a .NET assembly, and invokes the “start” method within the assembly to establish a network connection with the attacker’s C2 server at a predefined IP and port. 

ANYRUN malware sandbox’s 8th Birthday Special Offer: Grab 6 Months of Free Service

Latest articles

Resecurity introduces Government Security Operations Center (GSOC) at NATO Edge 2024

Resecurity, a global leader in cybersecurity solutions, unveiled its advanced Government Security Operations Center...

Reserachers Uncovered Zloader DNS Tunneling Tactics For Stealthy C2 Communication

Zloader, a sophisticated Trojan, has recently evolved with features that enhance its stealth and...

US Charged Chinese Hackers for Exploiting Thousands of Firewall

The US Treasury Department's Office of Foreign Assets Control (OFAC) has sanctioned Sichuan Silence...

DMD Diamond Launches Open Beta for v4 Blockchain Ahead of 2025 Mainnet

DMD Diamond - one of the oldest blockchain projects in the space has announced the...

API Security Webinar

72 Hours to Audit-Ready API Security

APIs present a unique challenge in this landscape, as risk assessment and mitigation are often hindered by incomplete API inventories and insufficient documentation.

Join Vivek Gopalan, VP of Products at Indusface, in this insightful webinar as he unveils a practical framework for discovering, assessing, and addressing open API vulnerabilities within just 72 hours.

Discussion points

API Discovery: Techniques to identify and map your public APIs comprehensively.
Vulnerability Scanning: Best practices for API vulnerability analysis and penetration testing.
Clean Reporting: Steps to generate a clean, audit-ready vulnerability report within 72 hours.

More like this

Reserachers Uncovered Zloader DNS Tunneling Tactics For Stealthy C2 Communication

Zloader, a sophisticated Trojan, has recently evolved with features that enhance its stealth and...

Hackers Deploy Weaponized LNK Files for Malicious Payload Delivery

Researchers reported a phishing attack on December 4th, 2024, where malicious emails purportedly from...

APT-C-60 Hackers Penetrate Org’s Network Using a Weapanized Google Drive link

The Japan Computer Emergency Response Team Coordination Center (JPCERT/CC) has confirmed an advanced cyber...