Cyber Security News

North Korean Hackers Use ZIP Files to Deploy Malicious PowerShell Scripts

North Korean state-sponsored hackers, known as APT37 or ScarCruft, have been employing sophisticated tactics to breach systems, leveraging malicious ZIP files containing LNK files to initiate attacks.

These LNK files, often disguised as documents related to North Korean affairs or trade agreements, are distributed via phishing emails.

Once opened, they trigger a multi-stage attack involving PowerShell scripts and batch files, ultimately deploying the RokRat remote access Trojan (RAT) as the final payload.

Infection Flow Diagram

Infection Flow and Technical Details

The infection process begins with phishing emails that appear critical, using real information from websites to enhance their credibility.

These emails contain ZIP attachments with malicious LNK files.

When executed, the LNK file checks if it’s running from System32 or Program Files and moves to the %temp% directory if necessary.

It then extracts several payloads, including a decoy HWPX document, a batch script named shark.bat, and other files like caption.dat and elephant.dat.

content of HWPX document

The shark.bat script executes PowerShell commands in a hidden window, loading and executing the elephant.dat script, which decrypts the caption.dat file using a single-byte XOR key.

This decrypted content is then executed in memory, leading to the deployment of the RokRat RAT.

RokRat is designed to gather detailed system information, including OS version, computer name, and logged-in user details.

It also captures screenshots and enumerates running processes, exfiltrating this data to command-and-control (C2) servers via cloud services like pCloud, Yandex, and Dropbox.

The malware uses these platforms’ APIs to send, download, and delete files, embedding OAuth tokens for seamless communication.

Additionally, RokRat can execute remote commands, allowing attackers to perform data exfiltration, system reconnaissance, and process termination.

Anti-Analysis Techniques and C2 Communications

To evade detection, RokRat employs anti-analysis techniques such as detecting VMware Tools to identify virtual environments and using sandbox detection methods like creating and deleting temporary files.

According to the researchers, it also checks for debuggers using IsDebuggerPresent.

The malware encrypts its communications using XOR and RSA encryption, ensuring that only the attackers can decrypt the data.

Commands from the C2 server are received in AES-CBC encrypted form, decrypted locally, and executed on the system.

These commands can include data collection, file deletion, and termination of the malware process.

The use of legitimate cloud services for C2 operations allows RokRat to blend into normal network traffic, making it challenging to detect.

This sophisticated approach highlights the evolving tactics of APT37, as they continue to adapt and expand their operations beyond traditional targets, now focusing on both Windows and Android platforms through phishing campaigns.

Are you from SOC/DFIR Teams? – Analyse Malware Incidents & get live Access with ANY.RUN -> Start Now for Free.

Aman Mishra

Aman Mishra is a Security and privacy Reporter covering various data breach, cyber crime, malware, & vulnerability.

Recent Posts

Hackers Use ConnectWise SkyKick Credentials to Access Microsoft 365, Halting Cloud Backups

Attackers abused compromised ConnectWise Cloud Backup credentials to access Microsoft 365 customer environments, prompting ConnectWise…

1 day ago

Anthropic’s Claude AI Uncovers Origins of NSA-Provided Cryptographic Keys After 25 Years

Anthropic says an internal Claude research model reconstructed how the National Security Agency generated seeds…

1 day ago

Critical WordPress Flaws Allow Attackers to Execute Remote Code Without Authentication

Two WordPress Core vulnerabilities can be chained to execute remote code without authentication, according to…

1 day ago

OpenBSD Kernel Flaw Dating Back 37 Years Enables Local Privilege Escalation to Root

A newly disclosed OpenBSD kernel exploitation chain combines a shared memory accounting flaw with a…

1 day ago

GhostAction Hackers Hide Credential-Stealing Malware in Fake Font Files Across 94 GitHub Repositories

GhostAction attackers have expanded their GitHub credential theft campaign with a second stage that disguises…

1 day ago

SideCopy Hackers Target Indian Organizations With ReverseRAT Malware to Steal Data

Indian authorities have warned that SideCopy hackers are targeting Indian organizations, including academic institutions, with…

1 day ago