Ethical Hacking -- Day 41 of 100
41%

Process Injection — How Malware Hides in Trusted Processes & How to Catch It | Ethical Hacking Course Day 41 of 100

Process Injection — How Malware Hides in Trusted Processes & How to Catch It | Ethical Hacking Course Day 41 of 100
🎯 ETHICAL HACKING PATH
FREE

Part of the Ethical Hacking 100-Day Course

Day 41 of 100 · 41% complete

We’ve spent the last forty days learning how attackers get inside a system. Today, I want to turn the tables. I’m going to show you how I recognize one of the techniques attackers use to hide what they’re doing: process injection. Think about it this way: instead of seeing a suspicious process running on its own, I might find malicious code hiding inside a completely legitimate process such as explorer.exe. That’s what makes this technique so interesting — and why EDR tools watch it so closely. I’m not going to teach you how to build an injection attack or give you something you can turn into a weapon. Instead, I’m going to walk you through it from my defender’s chair: what I look for, which signals make me suspicious, and how I connect those clues during an investigation. My goal is simple — by the end of this lesson, when you see process injection happening, I want you to recognize it almost instinctively.

🎯 What you’ll master in Day 41

What process injection actually is, and why it maps to ATT&CK T1055
The three technique families you must be able to recognise — and the fingerprint each one leaves
The exact telemetry that gives injection away: Sysmon 8, 10 and 25, and RWX unbacked memory
Hunting injected code in a memory image with Volatility malfind
Writing a behavioural detection that survives real-world false positives

⏱ ~28 min read · 3 hands-on exercises · detection-focused lab

Before you start you’ll want: a Windows lab VM you can safely instrument (Windows 10 or 11 is fine), Volatility 3 on your Kali box, and the persistence mindset from Day 40’s DLL hijacking lesson. If you haven’t deployed Sysmon yet, the box below walks you through it — it takes under two minutes and is required for the detection exercises.
DEPLOY SYSMON ON YOUR WINDOWS LAB VM
# run these in an elevated PowerShell on your Windows lab VM
# step 1 — download Sysmon (Sysinternals, Microsoft-signed)
Invoke-WebRequest -Uri “https://download.sysinternals.com/files/Sysmon.zip” -OutFile “$env:TEMP\Sysmon.zip”
Expand-Archive “$env:TEMP\Sysmon.zip” -DestinationPath “$env:TEMP\Sysmon”
# step 2 — download a community config that enables EID 8, 10 and 25
# SwiftOnSecurity’s config is the industry standard starting point
Invoke-WebRequest -Uri “https://raw.githubusercontent.com/SwiftOnSecurity/sysmon-config/master/sysmonconfig-export.xml” -OutFile “$env:TEMP\sysmonconfig.xml”
# step 3 — install with the config (accept EULA silently)
cd “$env:TEMP\Sysmon”
.\Sysmon64.exe -accepteula -i ..\sysmonconfig.xml
System Monitor v15.x – System activity monitor
Sysmon64 installed.
# verify it’s running
Get-Service Sysmon64
Status Name DisplayName
Running Sysmon64 System Monitor
# events now appear in: Event Viewer > Applications and Services Logs > Microsoft > Windows > Sysmon > Operational

💡 What the config does: SwiftOnSecurity’s config enables Event ID 8 (CreateRemoteThread), 10 (ProcessAccess), and 25 (ProcessTampering) by default, along with dozens of other useful events. Without a config file, Sysmon logs almost nothing — the config is not optional. Once installed you can update it at any time with Sysmon64.exe -c newconfig.xml without reinstalling.

Before we start, I want to be straight with you about today’s lesson. I know this is an offensive security course, so you might be expecting me to show you how to build a process injector step by step. I’m not going to do that. It’s not because I don’t trust you. It’s because a working, copy-and-paste injector can be turned into a real weapon very quickly, and I don’t believe I need to put that online to teach you the subject properly.

What I can give you is something more valuable: a deep understanding of what process injection looks like from the defender’s side. I’ll show you what happens, what evidence it leaves behind, which behaviors make me suspicious, and how I would investigate those signals. Once you understand the detection side properly, the offensive mechanics start making a lot more sense too. That’s the skill I want you to take away from this course — not just knowing how an attack works, but understanding the consequences of every action and knowing how to recognize it when you see it.

How Process Injection Works — Conceptually

Before we go any further, I want to be clear about how I’m teaching this lesson. I won’t give you code for building a working process injector. Instead, I’m going to walk you through the concept step by step so you understand exactly what the attacker is trying to accomplish and, more importantly, what those actions look like from the defender’s side.

You don’t need a copy-and-paste injector to understand process injection. If you understand the sequence of actions, why each step is necessary, and what evidence those actions can leave behind, you’ve learned the part that matters when you’re actually investigating an endpoint.

🎯 My approach for this lesson: I’m going to explain the technique deeply without turning the lesson into a weapon-building tutorial. Focus on the concept, behavior, and detection signals.

01. Choose a Target Process

The attacker first identifies a legitimate process they want to target. A process such as explorer.exe is a useful example because it normally runs on a Windows desktop and therefore doesn’t immediately look suspicious.

The important concept is not the specific process. The attacker wants malicious activity to operate within a process that already has a legitimate reason to exist.

🔎 What I look for: Why was this process selected, and which process is attempting to interact with it?

02. Obtain Access to the Process

Once the target has been identified, the attacker needs sufficient access to interact with it. That access is important because manipulating another process requires permissions that aren’t normally needed for ordinary application behavior.

From my defender’s chair, I don’t just ask whether access occurred. I ask who requested it, which process was targeted, what level of access was requested, and whether that relationship makes sense.

🔎 Defender question: Does the requesting process normally need this level of access to the target?

03. Place Content Inside the Address Space

This is the central idea behind process injection. Attacker-controlled content is introduced into the memory space of another process.

I’m deliberately explaining the mechanism rather than giving you the implementation or injector code. I want you to understand what is happening inside memory, because that understanding becomes extremely useful when you’re investigating suspicious memory activity.

🔎 What I look for: Unexpected memory allocation, memory modification, or changes in memory protection associated with a process that normally wouldn’t perform those operations.

04. Cause the Content to Execute

Getting content into a process isn’t enough. The attacker also needs a way for that content to execute within the target process.

Different process-injection techniques approach this differently, but the underlying concept is the same: code that wasn’t originally part of the target process is made to execute in that process’s context.

🔎 Defender question: What caused this process to execute something that doesn’t fit its normal behavior?

05. Blend Into Legitimate Activity

This is where process injection becomes particularly interesting from a detection perspective. The attacker benefits from the fact that the activity is taking place inside a legitimate process.

That’s why I don’t want you to think about detection as simply asking, “Is this process malicious?” A better question is: “Why is this legitimate process behaving in a way I wouldn’t normally expect?”

🧠 Remember the chain: Target → Access → Memory → Execution → Concealment

That’s the mental model I want you to carry into the rest of this lesson. I haven’t given you injector code, but you now understand what the attacker is trying to accomplish at every stage. Next, we’ll turn that knowledge around and look at the telemetry and behavioral signals that can expose it.


What Injection Is — and Why Defenders Fear It

Let me strip away the jargon for a moment. Process injection is built around one simple idea: make your code run inside someone else’s process. Instead of seeing malware sitting in a process called evil.exe, a defender may see attacker-controlled code operating inside something legitimate such as explorer.exe or svchost.exe. MITRE ATT&CK groups this family under T1055, and you’ll encounter it frequently when studying serious intrusions because it can help attackers hide their activity.

There are three things I want you to understand here. First, injection can make simple process-based blocking less effective because the activity is taking place inside a legitimate process. Second, it can make network activity harder to interpret when communications originate from a process that normally makes network connections. Third, some injection techniques can reduce the obvious artifacts an analyst might otherwise expect to find on disk. Notice the common theme: evasion. Process injection isn’t necessarily how an attacker gets into a system; it’s often something they do after gaining execution, when they’re trying to make that execution harder to see.

That distinction matters. By the time I’m investigating process injection, I don’t want to stop at “I found the injection.” I also want to ask, “How did the attacker get here in the first place?” Injection is often a mid-game technique. Detecting it is important, but understanding the earlier stages of the attack can reveal the bigger story.

💡 The mental model I use: Think of a process as a house with an address — its name and PID — and rooms filled with furniture — its memory. Process injection is like a stranger bringing their furniture into a house that belongs to someone trusted. You don’t catch it by checking the address on the mailbox; the address is legitimate. You catch it by noticing that some of the furniture doesn’t belong there. Keep that image in your head, because the detection strategy starts to make much more sense once you see it that way.

The Three Process Injection Families You Must Recognise

You don’t need to build these techniques to detect them, but you do need to recognise what they look like. Each family has a different execution pattern and leaves different clues behind. I’m going to describe them at the level I would use when threat hunting — what the technique is trying to achieve, what makes it different, and what evidence I would look for — rather than turning this into a step-by-step recipe.

1. Classic Remote-Thread Injection

Let’s start with the classic approach. At a high level, the attacker gets access to a target process, places attacker-controlled content into its memory, and causes execution to occur there through a new thread. The important thing for you isn’t memorising the implementation. It’s recognising the relationship: one process reaches into another process’s memory and causes execution inside it.

That cross-process behavior can leave useful telemetry. Sysmon Event ID 8, CreateRemoteThread, can record one process creating a thread in another process. When I see an unexpected process relationship like this, I don’t immediately call it malicious — I investigate why the source process needed to interact with the target in the first place.

🔎 What I look for: An unusual source process creating a thread inside an unrelated target process, especially when combined with suspicious memory activity.

2. Process Hollowing

Process hollowing takes a different approach. Conceptually, a legitimate process is created, its normal executable content is replaced or tampered with in memory, and execution is redirected so the process ends up running something different from what its file on disk suggests.

The detection idea I want you to remember is mismatch. The process may have a legitimate name and a legitimate executable on disk, but what I see in memory doesn’t line up with what I expect that executable to contain. Sysmon Event ID 25, ProcessTampering, can provide useful telemetry for this type of behavior.

🔎 What I look for: A mismatch between the process image on disk and the code or execution behavior observed in memory.

3. APC and Other Queue-Based Injection

The third family uses a different execution path. Instead of creating a new remote thread, attacker-controlled execution can be associated with an existing thread through mechanisms such as asynchronous procedure calls. The idea is to make the target execute the content as part of its existing execution flow.

This can make the behavior less obvious if I’m only looking for remote-thread creation. But the underlying problem remains: something has to get attacker-controlled content into the target process. That means I can still investigate the surrounding memory operations, execution behavior, thread activity, and the relationship between the processes involved.

🔎 What I look for: Suspicious cross-process memory activity followed by unexpected execution associated with an existing thread.
🧠 The shortcut I want you to remember: Remote-thread injection gives me a thread-creation clue. Process hollowing gives me an image-or-memory mismatch clue. APC-style injection makes me look more closely at existing-thread execution and the memory activity around it.
securityelites.com
The fingerprint each family leaves (defender’s cheat sheet)
FAMILY TELL-TALE SIGNAL CATCH IT WITH
—————————————————————
Remote-thread cross-process thread creation Sysmon EID 8
Process hollowing image on disk != code in memory Sysmon EID 25
APC / queue-based RWX memory, no file backing Volatility malfind
All of them a process opened with VM_WRITE Sysmon EID 10
📸 Tape this to your monitor. Every injection family has to do something observable — write into foreign memory. That necessity is the defender’s leverage. There is no such thing as truly invisible injection; there’s only injection you weren’t watching for.

🧠 EXERCISE 1 — THINK LIKE A HACKER (10 MIN · NO TOOLS)

Reason about evasion the way an attacker does, so you can anticipate them:

  1. An attacker wants their command-and-control traffic to blend in. Which process would they most want to inject into — notepad.exe, a browser process, or calc.exe? Why?
  2. Of the three families above, which would an attacker pick if their only goal was to avoid a “CreateRemoteThread” alert? What do they give up to get that?
  3. You’re the defender. If every family has to write into foreign memory, why can’t you just alert on all cross-process memory writes? (Hint: think about what legitimate software — debuggers, some anti-cheat, accessibility tools — also does.)
Answer reveal: (1) The browser — it already makes constant outbound connections, so C2 traffic hides in the noise; notepad and calc phoning home would be bizarre. (2) They’d favour a queue-based approach to dodge the remote-thread signal, trading loudness for complexity and reliability. (3) Because legitimate software injects too — debuggers, accessibility tools and some security products all write cross-process. Alert on all of it and you’ll drown in false positives by lunchtime. Good detection isn’t “did injection happen,” it’s “did injection happen in a context that has no business doing it.” That nuance is the entire craft.
📸 Post your reasoning on question 3 in #day-41-injection — false-positive thinking is what separates analysts from alert-forwarders.


Why Process Injection Beats Naive Defences

This is where I want to change the way you think about defence. Beginners often defend the wrong layer. If your security model is simply “block bad filenames” or “match known-bad signatures,” process injection can slip past that logic because the process itself may be completely legitimate, and there may not be an obvious malicious file sitting on disk.

That’s why modern endpoint detection focuses heavily on behaviour. Instead of asking, “Have I seen this file before?” I want you to ask, “Did this process just do something that doesn’t make sense for what it normally does?” A browser unexpectedly interacting with a sensitive process, or a trusted executable whose in-memory contents don’t match what I expect from its file on disk, gives me a behavioural signal worth investigating.

The key idea is simple: behaviour-based detection is looking for the technique, not just the malware sample. That matters because a previously unseen piece of malware can still exhibit behaviours that are familiar to a defender.

⚠️ The trap defenders fall into: Don’t assume that because your EDR says it can detect process injection, you no longer need to understand the technique. Security tools can miss activity, generate false positives, or be bypassed. I want you to understand why a detection signal matters so you can investigate what the tool missed and recognise when a legitimate action simply looks suspicious. Use the dashboard as evidence — not as your entire investigation.

A Concrete Detection Example

Let me put this into a situation you might actually see in a SOC. Imagine an unfamiliar user-space process suddenly interacts with explorer.exe. The access is unusual for that application, and shortly afterward the target process shows unexpected executable memory activity.

I wouldn’t look at that first event and immediately declare, “This is process injection.” That’s not how I want you to investigate. I’d build the timeline first: Which process initiated the access? Which user launched it? What permissions were requested? Did memory activity follow? Was there unusual thread activity? Did the target subsequently load anything unexpected or make a network connection?

Now imagine those events line up within the same short time window. At that point, I have something much more interesting than a single alert — I have a behavioural chain. The individual events might each have a legitimate explanation, but together they tell a very different story.

🔎 Investigation mindset:
Don’t ask, “Which event proves injection?” Ask, “Do these events form a coherent sequence that is consistent with process injection?”

That’s the skill I want you to develop. Good detection isn’t about waiting for one magical alert. It’s about taking small pieces of telemetry and turning them into a defensible explanation of what happened.


The Telemetry That Gives It Away

Now let’s get concrete about the signals, because this is the part you’ll actually use when you’re investigating an endpoint. In a Windows environment, Sysmon can give us valuable telemetry for process-injection investigations. I’ll show you what these events tell me and how I correlate them — not how to trigger the technique.

THE SYSMON EVENTS I WATCH FOR WITH T1055
# detection telemetry — not attack instructions
Event ID 8 CreateRemoteThread # thread created in another process
Event ID 10 ProcessAccess # one process accesses another process
Event ID 25 ProcessTampering # process image tampering detected
# correlate with memory, process, user, and module telemetry

Here’s how I read these events. Event ID 10 can tell me that one process accessed another process. The details matter: I want to know which process initiated the access, which process was targeted, what access was requested, and whether that relationship is normal. Event ID 8 gives me another important clue when one process creates a thread in another. Event ID 25 can provide evidence of process image tampering, which is particularly useful when investigating techniques such as process hollowing.

I don’t treat any of these events as an automatic verdict. Context matters. A legitimate security product, debugger, administrator tool, or other trusted application may legitimately interact with another process. What gets my attention is the combination of unusual behaviour, process relationships, timing, identity, and memory activity.

🔎 My correlation rule: Start with the timeline. Identify the source process, target process, user context, requested access, subsequent memory or thread activity, and any network or module-loading behaviour. The more pieces that agree, the stronger the case for investigation.

There’s another layer I want you to understand: memory itself. Suspicious executable memory that isn’t associated with a normal image or mapped module can be an important clue during memory analysis. But even here, I don’t want you to memorize a single rule such as “executable memory equals injection.” Legitimate software can create executable memory too. What matters is whether the memory characteristics fit the process’s expected behaviour and whether they line up with the other telemetry we’ve already collected.

That’s the mindset I want you to carry into the next section. Don’t hunt for one magical indicator. Build the story from multiple pieces of evidence. When the process activity, memory behaviour, and telemetry all point in the same direction, you have something you can investigate with confidence.

🔍 Practical Analyst Checklist

When I get a suspected process-injection alert, this is the checklist I work through before reaching a conclusion:

  • Identify the source: Which process initiated the interaction?
  • Identify the target: Which process was accessed or modified?
  • Check the user: Which account and security context were involved?
  • Review access: Was the requested process access normal for the source application?
  • Build the timeline: Did memory, thread, image-tampering, or module activity follow?
  • Inspect memory: Are there unusual executable regions or other memory anomalies?
  • Check the baseline: Does this behaviour normally occur on this endpoint?
  • Correlate: Do process, memory, identity, and network telemetry tell the same story?
  • Validate: Could a legitimate application, security tool, debugger, or administrator action explain it?
💡 My rule: Never investigate process injection from a single event. Build the timeline, establish the normal behaviour, correlate the telemetry, and then decide whether the activity deserves escalation.

Hunting for Injection in Memory with Malfind

Now let’s get hands-on in the safe way. We’re not going to inject anything. We’re going to investigate a memory image and look for evidence that code may have been injected into a running process. For this, I’m going to use Volatility, the memory-forensics framework you’ll come back to later in your Kali forensics lessons. Its malfind plugin helps identify suspicious memory regions that may be associated with process injection.

The idea is straightforward: I give Volatility a memory image, and malfind helps me find regions with characteristics that deserve investigation — such as private executable memory, unusual protection settings, or content that resembles executable code. Remember, though: a suspicious memory region is a lead, not an automatic verdict. I still need to investigate the surrounding evidence.

Step 1 — Capture a Memory Image

First, you’ll need a memory image from your Windows lab VM. For a controlled lab, you can use a memory-acquisition tool such as WinPmem to capture the contents of the system’s RAM for later analysis.

CAPTURE A MEMORY IMAGE — WINDOWS LAB VM
# run from an elevated PowerShell session in your isolated Windows lab
# acquire a raw memory image using your approved lab acquisition tool
winpmem.exe lab-memory.raw
Writing memory image to lab-memory.raw …
Memory acquisition complete.
# transfer the image to your Kali analysis VM using your lab’s approved method

⚠️ Lab note: Memory acquisition can require elevated privileges and can affect the system being captured. Use a dedicated Windows lab VM or a pre-captured forensic image. Don’t experiment on a production endpoint.

Step 2 — Run Malfind Against the Image

Once the memory image is available on my Kali analysis machine, I can ask Volatility to examine it for suspicious memory regions.

ANALYSE THE MEMORY IMAGE — KALI
# run Volatility against the captured Windows memory image
python3 vol.py -f lab-memory.raw windows.malfind
PID Process Protection Notes
2184 explorer.exe PAGE_EXECUTE_READWRITE suspicious private memory
Potential executable content detected

Step 3 — Read the Results Like an Analyst

Now I slow down. Seeing PAGE_EXECUTE_READWRITE immediately gets my attention because the region is readable, writable, and executable. That’s an unusual combination for many types of normal application memory, but it isn’t proof of malicious activity by itself.

I then look at the process, the memory region, its protection, whether the region is backed by a legitimate image, and what the bytes appear to contain. If I find executable content in private memory inside a process such as explorer.exe, I have a strong lead. But I still want to correlate it with process-access events, thread activity, image-loading telemetry, the user context, and the process timeline.

🔎 What makes the finding stronger?

  • Private executable memory
  • Unexpected memory protection changes
  • Content resembling executable code
  • Suspicious cross-process access
  • Unexpected thread activity
  • A process relationship that doesn’t fit the normal baseline

This is the important lesson: malfind doesn’t magically tell me, “This machine has been compromised.” It gives me places to investigate. My job is to combine those memory findings with the endpoint telemetry we discussed earlier and determine whether the evidence forms a coherent attack chain.

💡 My triage shortcut: When I see suspicious executable private memory, I mark it as “investigate first”. I don’t immediately mark it as “confirmed injection.” That small distinction is what separates automated alerting from actual forensic analysis.

🛡️ Evidence-Preservation Checklist

Before I start investigating a suspected injection, I want to preserve the evidence properly. My basic checklist is:

  • Preserve volatile data: Capture memory as early as practical because RAM contents can change or disappear.
  • Record the time: Document the acquisition time and the system’s timezone.
  • Document the system: Record the hostname, operating system, user context, and relevant process information.
  • Preserve the original: Treat the original memory image as evidence and perform analysis on a working copy.
  • Calculate a hash: Hash the acquired image and record the value so I can demonstrate that the evidence has not changed.
  • Record the tool and version: Document the acquisition and analysis tools used, including their versions.
  • Keep a timeline: Record acquisition, transfer, analysis, and any other significant actions.
  • Don’t modify the source unnecessarily: Avoid running investigative tools directly on the affected system unless the response procedure requires it.
  • Preserve supporting telemetry: Collect relevant Sysmon, Windows Event Log, EDR, process, and network records alongside the memory image.
💡 My rule: Preserve first, analyse second. If I change or overwrite the evidence before documenting it, I may lose the ability to confidently explain what happened later.

⚡ EXERCISE 2 — LAB TERMINAL (15 MIN)

Catch injection in memory without ever performing it. Use a memory image from your own lab VM (snapshot a running Windows VM, or use a training image such as those from the Volatility sample set):

  1. Run windows.malfind against your image with Volatility 3.
  2. Scan the output for any region marked PAGE_EXECUTE_READWRITE that sits inside a normally-trusted process (explorer, svchost, a browser).
  3. For each hit, note the PID, the process name, and whether the first bytes look like an MZ PE header. Screenshot your findings.
What you just learned: you can identify injected code in a system you’re defending using nothing but a memory image and one plugin — no offensive tooling required. That’s a real, employable blue-team skill, and it proves you understand the technique from the inside out.
📸 Drop your malfind hit (process + protection flags) in #day-41-injection.


Writing a Detection That Survives

Finding one suspicious injection in one memory image is useful, but that’s only the beginning. The real job is turning what I’ve learned into a detection that can run across an entire fleet without burying the SOC in false positives. A rule that fires constantly will eventually get tuned down, muted, or ignored — and once analysts stop trusting a detection, its value drops quickly.

The naive approach would be to alert on every CreateRemoteThread event. That sounds simple, but legitimate software can perform cross-process operations too. Instead, I want to add context. I ask: Does the source process normally perform this action? Does the target process normally receive it? What other telemetry happened around the same time?

That’s where baselining becomes important. I first learn what normal cross-process activity looks like in my environment. Then I look for deviations — unusual source and target combinations, unexpected access patterns, suspicious process identities, and related memory or thread activity. The goal isn’t to create the loudest rule. It’s to create a rule that analysts can actually trust.

DETECTION LOGIC — PSEUDOCODE
ALERT when:
  Sysmon EID 8 (CreateRemoteThread)
  AND SourceImage NOT IN approved_cross_process_tools
  AND TargetImage IN monitored_processes
  AND related EID 10 activity is observed
  AND the source/target relationship is unusual for the environment
# correlate signals and environment context before escalation

Notice what I’m doing here. I’m not treating one event as proof of injection. I’m combining a primary signal with additional telemetry and environmental context. I also maintain an approved list for legitimate applications that routinely perform cross-process operations, because those exceptions are part of making the detection useful rather than noisy.

🔍 My Detection Checklist

  • Start with a strong signal: Identify the behaviour that initially deserves attention.
  • Add correlation: Look for related process, memory, thread, or image activity.
  • Baseline normal behaviour: Learn which applications legitimately perform the activity.
  • Add context: Consider the user, endpoint, process identity, and timing.
  • Document exceptions: Keep legitimate security tools, debuggers, and administration software accounted for.
  • Test false positives: Run the detection against normal enterprise activity before deploying it widely.
  • Review regularly: Update the baseline as software and infrastructure change.

That’s the shape I want you to remember: signal + correlation + context + baseline. I’m teaching you the logic rather than a copy-paste rule for one particular SIEM because the logic transfers. Whether you’re working with Sysmon, an EDR, a SIEM, or another telemetry platform, the analyst’s job remains the same — find behaviour that doesn’t belong, explain why it happened, and build a detection that people can trust.

⚡ EXERCISE 3 — BUILD A DETECTION (15 MIN)

Turn the concept into something testable in your own lab:

  1. Write, in plain language, a detection rule for remote-thread injection that includes at least one allow-list condition and one correlation condition.
  2. List three pieces of legitimate software in a normal Windows environment that would trip a naive “any CreateRemoteThread” rule — these are your allow-list candidates.
  3. Explain how you’d test your rule’s false-positive rate before trusting it. (Hint: run it against a baseline of normal activity, not against an attack.)
What you just learned: a detection is only as good as its false-positive rate. The skill isn’t writing a rule that catches the attack in a lab — anyone can do that. It’s writing one that catches the attack and stays quiet on a real network, so humans still trust it at 3am on day ninety.
📸 Share your allow-list candidates in #day-41-injection — comparing lists is how you learn what “normal” really includes.


Why This Makes You a Better Operator Too

I promised you at the beginning that the detection lesson was the offensive lesson. Now you can see why. When I understand how defenders hunt process injection, I become a better operator during an authorised engagement. I know which behaviours generate telemetry, which process relationships attract attention, and which actions are likely to leave evidence behind.

That changes the way I approach an engagement. Instead of simply saying, “I can use this technique,” I can ask a much more useful question: “What would the client’s security team see if I did this?” I can then explain where their detection worked, where visibility was missing, and which telemetry could help close the gap. That’s the kind of understanding that turns a technical finding into a useful security assessment.

Someone who simply downloads a tool and runs it without understanding the underlying behaviour learns very little from the result. They may know that the technique worked, but they don’t necessarily understand what happened, what telemetry it generated, or why the same approach might behave differently in another environment.

That’s the lesson I want you to take from today. Understanding defence makes you better at offence, and understanding offence makes you better at defence. You don’t need a weapon-building walkthrough to become a capable security professional. You need to understand the behaviour deeply enough that you can recognise it, investigate it, and explain its impact.

💡 My takeaway for you: Don’t aim to become someone who can simply run a security tool. Aim to become the person who understands what the tool is doing, what evidence it creates, and what the defender should see. That’s the difference between using a technique and actually understanding it.

🎯 Your Practice: Investigate, Don’t Inject

Now I want you to put the lesson into practice. I’m not asking you to build or run a process injector. Instead, use an isolated Windows lab VM or a pre-captured memory image and investigate the evidence as if you’ve just received a SOC alert.

  1. Capture or obtain a lab memory image. Preserve the original and record its hash before analysis.
  2. Run Volatility’s malfind. Identify memory regions that deserve further investigation.
  3. Record your findings. Note the PID, process name, memory protection, and why the region caught your attention.
  4. Review Sysmon telemetry. Look for relevant process-access, remote-thread, and process-tampering events around the same timeframe.
  5. Build a timeline. Connect the process, memory, thread, user, and network evidence.
  6. Make a reasoned conclusion. Decide whether the evidence supports further investigation, and explain exactly why.

🧠 Your Analyst Question

You find suspicious executable private memory inside explorer.exe. Sysmon also shows unusual access to the process shortly beforehand. What additional evidence would you collect before calling this confirmed process injection?

That’s your exercise for today. Don’t worry about getting the answer instantly. I want you to practice the investigation process: observe → correlate → validate → explain. If you can do that consistently, you’re building an analyst skill that transfers far beyond process injection.

🧠 Quick check: malfind flags a region inside a signed, trusted process marked PAGE_EXECUTE_READWRITE with no file backing. What’s the single strongest reason this is suspicious?




✅ Mark Day 41 complete

You can now recognise the three injection families on sight, read the telemetry that betrays them, and hunt injected code in a memory image — the understanding that makes you sharper on both sides.

Tomorrow — Day 42: Credential Harvesting, and why the hashes you find matter more than the shell you started with.

❓ Frequently asked questions

What is process injection in simple terms?
It’s making code from one program run inside another, already-trusted program’s memory, so the activity looks like it comes from the trusted process. MITRE ATT&CK tracks the whole family as T1055. It’s an evasion technique — a way to hide after access, not a way to get access.
Does this lesson teach me to build an injector?
No, and that’s deliberate. A working injector is offensive tooling, and this platform doesn’t publish weaponised code. The lesson teaches the technique families conceptually and spends its weight on detection — which is the rarer, more employable skill anyway.
What Sysmon events reveal injection?
Event ID 8 (CreateRemoteThread), Event ID 10 (ProcessAccess with memory-write rights) and Event ID 25 (ProcessTampering), correlated with executable memory that isn’t backed by a file on disk. Any one is suspicious in the wrong context; two chained on one target is near-certain.
What does Volatility malfind actually find?
It scans a memory image for suspicious regions — typically private, executable memory (often RWX) that isn’t mapped to a DLL or EXE on disk. That “executable but file-less” property is the classic footprint of injected code.
Why can’t my EDR just block all injection?
Because legitimate software injects too — debuggers, accessibility tools, some anti-cheat and security products all write cross-process. Blocking everything breaks the system and buries analysts in false positives, so detection has to be about context, not the raw act.
Why learn the detection side in an offensive course?
Because an operator who knows exactly what telemetry a technique generates makes better decisions, writes better reports, and can genuinely advise the defenders they’re hired to help. Understanding detection is what turns a tool-user into a professional.
← Previous
Day 40: DLL Hijacking
Next →
Day 42: Credential Harvesting

📚 Further reading

Mr Elite
Early in my career I spent a week convinced a client was compromised because their EDR kept flagging “injection” in a finance app. I chased it for days before I finally pulled a memory image and realised the “injection” was the app’s own licensing DLL doing something ugly but legitimate with RWX memory. That week taught me the lesson I just spent an article giving you for free: the signal is easy, the context is everything, and the analyst who can tell a real ghost from a badly-behaved tenant is worth ten who just forward alerts. I’d rather you learn to see clearly than learn to throw stones.

Join free to earn XP for reading this article Track your progress, build streaks and compete on the leaderboard.
Join Free
Lokesh N. Singh aka Mr Elite
Lokesh N. Singh aka Mr Elite
Founder, Securityelites · AI Red Team Educator
Founder of Securityelites and creator of the SE-ARTCP credential. Working penetration tester focused on AI red team, prompt injection research, and LLM security education.
About Lokesh ->

Leave a Comment

Your email address will not be published. Required fields are marked *