Securitylab•October 12, 2026•🇷🇺Translated from Russian

Reflective DLL Injection: How Malware Executes DLLs Directly in Memory Without Disk Files

Reflective DLL Injection enables attackers to execute code without placing a suspicious library on disk or registering it through normal Windows module lists. The technique prepares a full working copy of a Portable Executable image directly in process memory, skipping the standard LoadLibrary path.

In a classic reflective scheme, a small loader embedded inside the DLL performs the work normally handled by the Windows loader. It parses its own headers, maps sections, applies base relocations, resolves imports, initializes Thread Local Storage, registers exception tables, and calls entry points. The approach is named after this self-contained preparation step.

What Makes Loading Reflective

Three distinct concepts must be separated: reflective loading prepares the library, manual mapping uses an external loader, and process injection delivers code into another address space. Only the first two affect how the image itself becomes executable; injection adds separate requirements for cross-process access rights.

  • Ordinary LoadLibrary – Windows loader maps the file and resolves dependencies.
  • Reflective loading – Code inside the DLL prepares its own working copy from a memory buffer.
  • Manual mapping – External code performs mapping and relocation instead of the system loader.

Why Raw DLL Bytes Are Not Yet a Working Library

PE images store sections at file offsets that differ from their final RVA locations. A loader must translate between file offsets, relative virtual addresses, and actual virtual addresses while respecting SizeOfRawData versus VirtualSize. Incorrect arithmetic or failure to process relocation records of type HIGHLOW or DIR64 produces corrupted code that may crash later.

Where Simplified Implementations Usually Fail

Common omissions include proper handling of delayed imports, correct OriginalFirstThunk versus FirstThunk tables, full TLS directory processing, and registration of x64 exception unwind data. A function that returns a constant value often succeeds while the first exception or thread-local access triggers an immediate crash.

Memory Artifacts and Detection

Reflective modules frequently appear in MEM_PRIVATE executable regions without corresponding ImageLoad events. Analysts should combine memory-region provenance, thread start addresses, preserved PE headers, and surrounding process behavior. Volatility 3 plugins such as malfind help locate candidate regions, while Sysmon events 7, 8, and 10 provide timeline context when collection is enabled.

Limitations and Protections

The technique respects DEP and can be blocked by Arbitrary Code Guard when the process policy forbids converting memory to executable. It also requires appropriate access rights for cross-process injection and does not grant privileges by itself.

Related articles

Habr•Malware & Botnets

Leaked DarkSword iOS Exploit Chain 'P7' Now Steals Crypto Wallet Seeds and Keystores

A third build of the P7 variant of the leaked DarkSword iOS exploit chain has been identified, featuring a new lure site themed around Chinese online casinos and a fresh command server. The chain exploits six vulnerabilities, including three zero-days, to deploy an implant that decrypts the keychain directly on the device and extracts seed phrases from wallets such as imToken, Trust Wallet, and Phantom. Unlike the original GHOSTBLADE, P7 rewrites the C2 agent to focus exclusively on wallet data while retaining the core TaskRop and MIG-filter bypass modules. Passive analysis of public sources also uncovered the long-running 'qqtime' delivery cluster that pairs DarkSword with the older Coruna chain for broader iOS coverage. The operator uses channel codes to support multiple affiliate distributors and employs an AppleKeyStore oracle to decrypt keychain items locally before exfiltration.

BoletimSec•Malware & Botnets

Censys Exposes DarkSword iOS Exploit Platform and Coruna Crypto Wallet Stealer

Censys has disclosed the inner workings of DarkSword, a commercial platform that sells remote access to iOS devices, along with its associated malware Coruna that targets cryptocurrency wallet recovery keys. The infrastructure was exposed between September 15 and 17, allowing researchers to analyze the full attack chain starting from a WebKit and JavaScriptCore exploit delivered through the browser. After escaping the Safari sandbox and reaching the kernel, the platform deploys three layers including a flag, controller, and main implant. Coruna then scans the device for BIP39-compliant seed phrases stored in photos and Apple Notes across 19 targeted wallet applications such as MetaMask, Phantom, Trust Wallet, Coinbase, Exodus, imToken, Bitpie, and BitKeep. The exposed server contained 11 victim recovery keys, 179 directories of extracted data, and 75 operator accounts, indicating a structured commercial operation with agent accounts, commissions, and device quotas. Confirmed infections affect devices running iOS 16.1 and 16.3.1, while Apple has extended patches to additional iOS 18 devices. Maintaining updated iOS versions remains the primary defense against this threat.

Securitylab•Malware & Botnets

How Malware Evades Sandboxes: Detection Techniques and Defense Strategies

Sandboxes have become a standard tool for analyzing suspicious files delivered via email, websites, messengers, and cloud storage. Modern malware often avoids detection by identifying virtual environments rather than directly attacking the sandbox. Techniques include checking for virtualization artifacts, system parameters, hardware signatures, network indicators, user activity, and timing delays. Reports such as Picus Red Report 2026 show technique T1497 returning to the top five most common MITRE ATT&CK methods. Examples like Blitz, GootLoader, and LummaC2 demonstrate environment checks and behavioral evasion. Effective defense requires combining multiple analysis methods, realistic sandbox profiles, pre-delivery inspection, and integration with other security controls.

BoletimSec•Malware & Botnets

Realtek Jungle SDK Flaw CVE-2021-35394 Fuels Cling Botnet Spread Across Routers

Researchers at Nozomi Networks have observed a sharp rise in exploitation attempts against CVE-2021-35394, a critical remote code execution vulnerability in the Realtek Jungle SDK. The flaw, rated 9.8 on the CVSS scale and disclosed five years ago, is being used to deploy the Cling botnet on routers and video recorders. The affected SDK is embedded in products from multiple vendors, leaving large numbers of devices exposed because firmware updates are rarely applied. Cling carries exploits for seven distinct vulnerabilities targeting Realtek, Linksys, MVPower, TBK, LB-LINK, FiberHome and China Mobile hardware. Once installed, the malware performs recursive scanning, spreads like a worm, manipulates TCP tunnels and proxies, and participates in DDoS attacks. Its command-and-control channel hides instructions inside STUN protocol transaction IDs, impersonating legitimate responses from Google public STUN servers. FortiGuard Labs has confirmed the findings and tracks the variant as ClingSTUN.