Sunday, April 6, 2025
Homecyber securityKoiLoader Exploits PowerShell Scripts to Drop Malicious Payloads

KoiLoader Exploits PowerShell Scripts to Drop Malicious Payloads

Published on

SIEM as a Service

Follow Us on Google News

Cybersecurity experts at eSentire’s Threat Response Unit (TRU) uncovered a sophisticated malware campaign leveraging KoiLoader, a malicious loader designed to deploy information-stealing payloads.

This campaign utilized PowerShell scripts and obfuscation techniques to bypass security measures and infect systems.

The investigation revealed a multi-stage infection chain, highlighting the evolving tactics of cybercriminals.

- Advertisement - Google News

Infection Chain and Delivery Mechanism

The attack begins with phishing emails containing links to zip files named “chase_statement_march.zip.”

PowerShell Scripts
Infection chain

Inside these zip files, victims encounter shortcut files (.lnk), which exploit a known Windows bug (ZDI-CAN-25373) to conceal malicious command-line arguments.

Upon execution, the shortcut file downloads two JScript files g1siy9wuiiyxnk.js and i7z1x5npc.js to the victim’s system.

These scripts orchestrate the malware’s persistence and payload delivery using scheduled tasks created through the LOLBin “schtasks.exe.”

The JScript files serve distinct purposes: g1siy9wuiiyxnk.js deletes the initial scheduled task and executes i7z1x5npc.js, while the latter retrieves PowerShell scripts from remote URLs.

PowerShell Scripts
Contents of nephralgiaMsy.ps1

According to the Report, these scripts disable security features like the Anti-Malware Scan Interface (AMSI) and download KoiLoader’s payload.

The malware ultimately executes shellcode via the CreateThread API, initiating its malicious operations.

KoiLoader’s Multi-Stage Execution

KoiLoader operates in two primary stages.

The first stage unpacks encrypted payloads stored within its PE file using a hashing algorithm to resolve Windows APIs such as FindResourceW and LoadResource.

These payloads are decrypted using XOR routines and executed in memory.

The second stage focuses on evasion and payload delivery.

It checks for virtual machine environments, security researcher tools, and sandbox attributes to avoid detection.

Additionally, it ensures the malware runs exclusively on non-Russian systems by verifying language settings.

Once evasion checks are passed, KoiLoader establishes persistence through scheduled tasks and creates mutexes based on the victim machine’s volume serial number to prevent duplicate instances.

It then downloads and executes KoiStealer, an advanced information-stealing malware written in C#.

KoiStealer extracts sensitive data such as machine GUIDs, usernames, OS versions, and domain information before communicating with Command-and-Control (C2) servers.

KoiLoader employs HTTP POST requests for C2 communication.

The initial request includes the victim machine’s GUID, campaign-specific build ID, and an X25519 public key for encrypted data exchange.

Subsequent requests retrieve commands encoded as single characters, enabling actions such as script execution via PowerShell or Command Prompt, process injection into explorer.exe or certutil.exe, and dynamic DLL loading.

To counter threats like KoiLoader, eSentire recommends disabling wscript.exe via AppLocker or Windows Defender Application Control (WDAC).

Organizations should implement behavior-based detection mechanisms alongside robust phishing awareness training programs to mitigate social engineering risks.

Deploying Next-Gen Antivirus (NGAV) or Endpoint Detection and Response (EDR) solutions is critical for detecting and containing advanced threats.

This discovery underscores the importance of proactive threat hunting and advanced cybersecurity measures in combating modern malware campaigns.

Investigate Real-World Malicious Links & Phishing Attacks With Threat Intelligence Lookup – Try for Free

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

Latest articles

Hack The box “Ghost” Challenge Cracked – A Detailed Technical Exploit

Cybersecurity researcher "0xdf" has cracked the "Ghost" challenge on Hack The Box (HTB), a...

Sec-Gemini v1 – Google’s New AI Model for Cybersecurity Threat Intelligence

Google has unveiled Sec-Gemini v1, an AI model designed to redefine cybersecurity operations by...

U.S. Secures Extradition of Rydox Cybercrime Marketplace Admins from Kosovo in Major International Operation

The United States has successfully extradited two Kosovo nationals, Ardit Kutleshi, 26, and Jetmir...

Ivanti Fully Patched Connect Secure RCE Vulnerability That Actively Exploited in the Wild

Ivanti has issued an urgent security advisory for CVE-2025-22457, a critical vulnerability impacting Ivanti...

Supply Chain Attack Prevention

Free Webinar - Supply Chain Attack Prevention

Recent attacks like Polyfill[.]io show how compromised third-party components become backdoors for hackers. PCI DSS 4.0’s Requirement 6.4.3 mandates stricter browser script controls, while Requirement 12.8 focuses on securing third-party providers.

Join Vivekanand Gopalan (VP of Products – Indusface) and Phani Deepak Akella (VP of Marketing – Indusface) as they break down these compliance requirements and share strategies to protect your applications from supply chain attacks.

Discussion points

Meeting PCI DSS 4.0 mandates.
Blocking malicious components and unauthorized JavaScript execution.
PIdentifying attack surfaces from third-party dependencies.
Preventing man-in-the-browser attacks with proactive monitoring.

More like this

Hack The box “Ghost” Challenge Cracked – A Detailed Technical Exploit

Cybersecurity researcher "0xdf" has cracked the "Ghost" challenge on Hack The Box (HTB), a...

Sec-Gemini v1 – Google’s New AI Model for Cybersecurity Threat Intelligence

Google has unveiled Sec-Gemini v1, an AI model designed to redefine cybersecurity operations by...

U.S. Secures Extradition of Rydox Cybercrime Marketplace Admins from Kosovo in Major International Operation

The United States has successfully extradited two Kosovo nationals, Ardit Kutleshi, 26, and Jetmir...