DLL Injection
Also called Process injection.
Forcing a target process to load an attacker-supplied library.
What it is
An injection technique that makes a remote process load a malicious DLL, classically by writing the library path into the target and invoking the library-loading API in a new thread. The DLL's entry point then runs inside the host process under its identity.
Why it matters
It is a simple, durable way to execute code under a legitimate process and inherit its privileges, so it appears constantly in tooling and malware alike. A module loaded from an unusual path, or with no matching disk file, is a common detection lead.
In practice
A remote thread created in a browser process to load a DLL dropped in a temp folder, hijacking the browser's network trust.
What to look for
- LoadLibrary called through CreateRemoteThread in another process.
- DLLs loaded from unusual paths into trusted processes.
- Sysmon event 8 or event 7 image loads that do not fit.
Common mistake
Trusting the host process. The injected DLL borrows its name and permissions.
Practice it nearby
CyberKit has no tool for this term itself. These are the closest places to practice it.
- File Triage
Drop any file. It names the format from its first bytes, hashes it, and opens the parser that reads it: PE, ELF, Mach-O, Office, PDF, plist, or entropy and strings.
- Rule Range
Write a regex, a Sigma rule, a YARA rule and a query pipeline, each graded live against samples, some of which you never see.
In the field
Well-known tools where this shows up on the job. They are listed to show the landscape, not as a recommendation.
-
Volatility 3 Open source
A widely used open source framework for analyzing memory images with plugins. Our notes.
-
Velociraptor Open source
Can collect memory and query live process memory across many hosts. Our notes.
-
CrowdStrike Falcon Commercial
EDR agents watch memory activity on the host, such as injection and unbacked code.
Read next
- Reflective DLL Loading: Loading a DLL from memory while bypassing the OS loader and its lists.
- Shellcode: Compact, self-contained machine code that runs from an injected buffer.
- Userland Hooking: Redirecting an API by patching its code or pointer in user space.