Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is Reflective DLL Injection?

Reflective DLL injection loads a library into a process using the library’s own loader code, so the DLL never touches disk and never appears in the operating system’s module list.

Illustration for the cybersecurity term Reflective DLL Injection
Home / Blog / Cybersecurity Terms / What Is Reflective DLL Injection?
17 November 2026

What Is Reflective DLL Injection?

What Is Reflective DLL Injection?

Reflective DLL injection is a technique for loading a dynamic link library into a process without using the Windows loader. The library contains its own loading routine, so it maps itself into memory, resolves its own imports, applies its own relocations, and calls its own entry point. Because LoadLibrary is never invoked, the DLL is never registered in the process module list and never needs to exist as a file on disk.

Stephen Fewer of Harmony Security published the technique in 2008, and it has been a standard component of offensive tooling ever since—Meterpreter and Cobalt Strike’s Beacon both rely on it.

What the Normal Loader Does

Calling LoadLibrary with a path makes Windows read the file, map its sections into memory with appropriate page protections, walk the import table and resolve every function the DLL depends on, apply base relocations if the preferred address is unavailable, and finally call DllMain. It also adds an entry to the loaded module list in the Process Environment Block.

That last step is the problem for an attacker, and the file requirement is the other. A DLL loaded this way is visible to any tool that enumerates modules, and the file on disk can be collected, hashed, and submitted for analysis.

The Reflective Approach

A reflective DLL is compiled with an extra exported function, conventionally called ReflectiveLoader, which performs the loader’s job from inside the DLL itself. The injection sequence is:

  1. The payload DLL is written into the target process’s memory as raw bytes, typically with VirtualAllocEx and WriteProcessMemory, or delivered by shellcode already running there.
  2. Execution is directed to ReflectiveLoader, usually through CreateRemoteThread.
  3. That function first locates the base address of kernel32.dll by walking the PEB’s module list and hashing export names, since it cannot call any API until it has resolved one.
  4. It allocates a new region, copies the PE headers and each section into place, processes the relocation table, and resolves the import table by name hash.
  5. It calls the DLL’s real entry point. The library is now running, with no file involved and no module entry created.

Everything after step two happens inside the target process, which is why the technique is also the standard way to stage a payload that arrived over the network without ever writing it down.

Why It Matters to Defenders

Reflective injection breaks several common assumptions at once. There is no file for antivirus to scan or for a responder to collect. Module enumeration—the basis of many integrity checks—shows nothing unusual. Application allow-listing is unaffected, because the host process is a legitimate program. And since the code can be delivered directly from a command and control channel, it may never exist outside memory at all.

This places it firmly in the fileless attack category, alongside process hollowing and process doppelganging, although it differs from both: hollowing replaces a process image before it runs, while reflective injection adds code to a process that continues doing its own work.

Finding It

Memory is where the evidence lives, and it is quite distinctive once you look:

The practical point for a security team is that detection for this class has to include memory inspection, not only file scanning and process listing. Validating that your deployed tooling actually catches it is part of what our Red Team Services assess, since the answer depends far more on configuration than on the product name.

FAQ – Frequently Asked Questions

How Is Reflective DLL Injection Different from Classic DLL Injection?

Classic injection writes a file path into the target process and calls LoadLibrary, so Windows performs the load and records the module. That leaves a file on disk and a visible module entry. Reflective injection carries its own loader inside the DLL, mapping the image manually from memory, so no file is required and the operating system never registers the library.

Can Antivirus Detect a Reflectively Loaded DLL?

File-based scanning cannot, because there is no file. Memory scanning can, and most modern endpoint products now scan process memory for PE headers in private regions and for threads with unbacked start addresses. Detection quality varies considerably with configuration, so it is worth testing against your own deployment rather than assuming the capability is enabled.

Is This the Same as a Fileless Attack?

It is one implementation of the idea. Fileless describes any technique that avoids writing a payload to disk, which also covers script-based execution, WMI subscriptions, and registry-stored payloads. Reflective DLL injection is the compiled-code version, and it is commonly combined with the others—a PowerShell script, for example, that reflectively loads a DLL held in a variable.

What Should a SOC Prioritise for Detecting This?

Enable Sysmon events 8 and 10 for remote thread creation and process access, alert on cross-process memory allocation with execute permissions, and schedule periodic memory scans with a tool such as pe-sieve on high-value hosts. Then focus on post-execution behaviour—unexpected outbound connections and anomalous process lineage—which remains observable regardless of how the code was loaded.

Related Terms

You May Be Interested In These

What Is AES Encryption?

Cybersecurity Terms

17 November 2026

What Is AES Encryption?

Read More
What Is WMI Persistence?

Cybersecurity Terms

17 November 2026

What Is WMI Persistence?

Read More
How Do You Audit OAuth App Consents?

Cybersecurity Terms

17 November 2026

How Do You Audit OAuth App Consents?

Read More