Cyber Security News

PowerShell Loaders Use In-Memory Execution to Evade Disk-Based Detection

A recent threat hunting session has revealed a sophisticated PowerShell script, named y1.ps1, hosted in an open directory on a Chinese server (IP: 123.207.215.76).

First detected on June 1, 2025, this script operates as a shellcode loader, employing advanced in-memory execution techniques to bypass traditional disk-based detection mechanisms.

The discovery, attributed to Shenzhen Tencent Computer Systems Company Ltd., highlights a growing trend of stealthy post-exploitation tools leveraging cloud infrastructure and reflective loading to remain undetected.

Stealthy Malware Deployment

Detailed analysis shows the script dynamically resolves Windows API functions, decrypts embedded shellcode using XOR operations with a key of 35, and executes malicious payloads directly in memory via VirtualAlloc, rendering it nearly invisible to conventional antivirus solutions.

API hashing technique used by shellcode

Further investigation into the script’s behavior uncovered connections to a second-stage command-and-control (C2) server hosted on Baidu Cloud Function Compute (y2n273y10j[.]cfc-execute[.]bj.baidubce[.]com).

The shellcode employs API hashing to obfuscate function calls, crafting unique hashes for Windows APIs like LoadLibraryA and InternetOpenA, and uses forged User-Agent strings mimicking legitimate browser traffic to evade network monitoring.

Cobalt Strike Infrastructure

The final payload communicates with a Cobalt Strike Beacon at IP 46.173.27.142, tied to Beget LLC in Russia, with SSL metadata explicitly referencing “Major Cobalt Strike” as the certificate subject.

This infrastructure, combined with reflective DLL injection for in-memory execution, aligns with known Cobalt Strike deployment patterns often exploited in post-exploitation phases by threat actors using cracked versions of the framework.

Open directory hosting the PowerShell code

Beyond China and Russia, additional indicators of compromise (IOCs) point to servers in the United States, Singapore, and Hong Kong, suggesting a distributed network leveraging global cloud platforms for resilience and anonymity.

The use of short-lived IPs and ephemeral C2 nodes further complicates attribution and mitigation efforts.

According to the Report, This finding underscores the quiet yet effective combination of evasion techniques.

The PowerShell loader, discovered via tools like Attack Capture File Manager and code searches for reflective execution functions such as “func_get_delegate_type,” represents a broader trend of financially motivated threat campaigns.

Mitigation requires stringent PowerShell execution policies, robust endpoint detection and response (EDR) solutions to detect in-memory attacks, and vigilant monitoring of SSL certificates bearing hallmarks like “cobaltstrike.”

Blocking known malicious IPs and domains, alongside restricting internet access from sensitive systems, is critical to countering such threats.

Indicators of Compromise (IOCs)

TypeValue
PowerShell Script SHA-256 Hashcdd757e92092b9a72dec0a7529219dd790226b82c69925c90e5d832955351b52
C2 Server Domainy2n273y10j[.]cfc-execute[.]bj.baidubce[.]com
C2 Server IP46.173.27.142
Host IP (Open Directory)123.207.215.76

Find this News Interesting! Follow us on Google News, LinkedIn, and X to Get Instant Updates

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