Injection, Process Hollowing, and Living off the Land

An authorized assessment shows that a built-in Windows utility started an unusual child process. Is that enough to report malware on the host? No. This episode explains how library injection, process hollowing or injection, unquoted service paths, Windows utilities, and living-o…

An authorized assessment shows that a built-in Windows utility started an unusual child process. Is that enough to report malware on the host? No.

It’s a reason to investigate, but the utility’s name doesn’t establish intent. An administrator, an automation platform, a penetration tester, and an attacker might all use the same legitimate binary. The meaningful questions are what started it, what it did, which security context it used, and whether the behavior matched an approved purpose.

That distinction matters throughout this lesson. PenTest+ objective 4.4 includes library injection, process hollowing and injection, unquoted service path injection, named Windows tools, and living off the land binaries. Recognizing those terms is useful, but the practical skill is matching an observation to the mechanism that could have produced it. You also need to decide what evidence would support that interpretation and what authorized validation is safe enough to perform.

Start with library injection. A running program commonly loads libraries containing code that the program can use. On Windows, one familiar form is a dynamic-link library, often shortened to DLL.

Library injection manipulates that loading behavior so code supplied through a library executes in connection with a target program. The important weakness is not simply that a library exists. It’s that an attacker can influence which code is loaded, where it comes from, or how the target process uses it.

Evidence of a loaded library also isn’t automatically proof of injection. Programs legitimately load many libraries. A defensible finding needs more context, such as an unexpected library in a process, an unusual origin or loading relationship, behavior that follows the load, and a mismatch with the system’s expected configuration. The assessment should distinguish an observation from the conclusion it might eventually support.

Process injection is the broader idea of executing code within the address space or context of another process. Instead of running all malicious behavior under an obvious new program, the activity occurs through an existing process. That can affect how the behavior appears to monitoring tools and how an analyst attributes subsequent actions. The target process might be legitimate even though code operating inside it isn’t.

Process hollowing is a more specific pattern within this area. A process is created so it initially appears associated with an expected program. Its original executable content is then replaced or displaced by different code before execution continues.

The visible process identity and the code actually running no longer tell the same story. That’s why a process name alone is weak evidence. Validation has to examine relationships and behavior rather than trusting the label attached to the process.

Unquoted service path injection relies on a different weakness. Here, the issue is path resolution rather than code being placed inside another process. Imagine a Windows service configured to launch an executable from a path containing spaces, but the complete path isn’t enclosed in quotation marks. The system may interpret portions of that path as possible executable names instead of treating the entire string as one unambiguous location.

That ambiguity doesn’t make every unquoted service path exploitable. A tester would also need evidence that a relevant alternate location can be influenced under the tested security context and that the service would resolve the path in the vulnerable way. Service privileges and operational impact matter too. If those conditions aren’t established, the accurate statement is that the configuration warrants validation, not that privilege escalation has already been proven.

These mechanisms can lead to similar consequences, including execution under an unexpected context, persistence, privilege escalation, impairment of defenses, or access to credentials. They still aren’t interchangeable. Library injection concerns manipulated library loading. Process injection concerns code executing within another process.

Process hollowing creates a mismatch between an apparently expected process and the code it ultimately runs. An unquoted service path concerns ambiguous path interpretation and an attacker-influenced executable location. Naming the mechanism correctly guides both evidence collection and remediation.

Before validating any of them, return to the engagement boundaries. Confirm the authorized target, the permitted technique, the testing window, and the operational constraints. Process manipulation or restarting a service can disrupt applications. On a sensitive host, especially one supporting operational technology or another safety-critical function, even a technically valid test could create an unacceptable consequence. If configuration review, existing telemetry, or another lower-impact method can establish the evidence, use that method before requesting permission for something more intrusive.

A repeatable decision process begins with the requirement. Suppose the engagement permits you to assess whether a Windows server is exposed to host-based execution weaknesses, but it doesn’t automatically authorize disruptive exploitation. Your first task is to define the expected result. For an unquoted service path, you might predict that a vulnerable configuration would contain an ambiguous executable path and a location that the relevant user can influence. For suspected process injection, you’d predict evidence showing that code or execution behavior doesn’t match the process’s ordinary role.

Next, choose a bounded action. Review the applicable configuration or collected telemetry before manipulating the host. Check that the evidence actually belongs to the authorized target and testing period. If stronger validation would require a service restart, code execution, or interference with a running process, compare that action with the rules of engagement. An unclear boundary calls for clarification, not a silent expansion of the test.

Then compare the result with the prediction. If a service path is unquoted but no relevant alternate location can be influenced, you haven’t demonstrated the complete attack condition. If a built-in utility creates an unusual child process but an approved management task explains the relationship, you haven’t established malicious use. Record the evidence that supports the interpretation, the evidence that weakens it, and anything you couldn’t determine. Uncertainty described precisely is more useful than certainty manufactured from an incomplete result.

Consider the built-in utility and unusual child process again. The observation could fit living-off-the-land behavior. Living off the land binaries, commonly called lol bins, are legitimate system binaries that can be abused to accomplish attacker objectives. Their trusted or expected presence may make them attractive for execution, persistence, defense impairment, or other activity. But their ordinary administrative uses don’t disappear just because abuse is possible.

Your initial hypothesis might be that the utility was used to launch unauthorized code. Before reporting that, identify what should be present if the hypothesis is right. Useful context includes the parent and child relationship, the command or script context when available, the account involved, timing, the destination or resource contacted, and the resulting host behavior. No single item always proves intent. Together, however, the artifacts can show whether the event aligns with approved administration or with the behavior being assessed.

Now add a constraint. The server supports a production function, and the engagement allows evidence review but not arbitrary process termination or payload execution. Launching a more aggressive test just to see what happens would be the wrong decision. You can preserve the relevant records, compare the event with authorized management activity, and ask the system owner or engagement contact about the expected task. If the evidence remains incomplete, request a controlled validation window or report the condition with an explicit limitation.

The weaker alternative is to label the utility itself as malicious. That conclusion confuses a binary’s identity with how it was used. It also produces poor remediation. Removing or blocking a legitimate administrative component without understanding its role could disrupt normal operations while leaving the underlying behavior unaddressed. A better report describes the execution chain, the suspicious or unauthorized behavior, the affected security context, and the evidence connecting those facts.

Several Windows tools named within this objective reinforce the same lesson. Mimikatz is broadly associated with credential access and credential-related security testing. Rubeus focuses on interactions with Kerberos, the authentication system commonly used in Windows domains.

Certify is associated with examining and testing Active Directory Certificate Services. Seatbelt collects host information useful for situational awareness and security assessment. These names can help you recognize a tool’s broad purpose, but finding a name in a file, log entry, or alert still isn’t the same as validating what occurred.

PowerShell is Microsoft’s scripting and automation environment. Administrators use it for legitimate management, and testers can use it within an authorized engagement. Attackers can abuse the same capabilities.

PsExec is commonly associated with executing processes on remote Windows systems, including legitimate remote administration as well as lateral movement when misused. Evil-WinRM provides a shell-oriented way to interact through Windows Remote Management in security-testing contexts. Authorization, credentials, destination, command behavior, and resulting changes determine how those activities should be interpreted.

Don’t turn those tool descriptions into rigid one-tool, one-technique pairings. A tool can support more than one action, and similar behavior may be produced without that particular tool. A renamed file can also make name-based identification unreliable. Start from the observed behavior and mechanism. Tool attribution may be useful supporting context, but it shouldn’t replace the evidence chain.

Suppose an alert says PowerShell launched a process that made an unexpected connection. One analyst calls it malicious because PowerShell appears in the event. Another dismisses it because PowerShell is a standard Windows capability. Both conclusions go beyond the evidence. The event deserves investigation because the behavior is unusual, not because the binary is inherently good or bad.

Check whether the activity coincides with an approved automation job or administrative session. Confirm that the records came from the correct host and time period. Determine which account initiated the activity and whether the account’s role explains it. Compare the child process and resulting behavior with what the approved task should produce. If records are delayed, incomplete, or drawn from a stale data source, say so before treating the mismatch as a finding.

Troubleshooting also means separating a failed observation method from the absence of a weakness. A collection tool may lack sufficient privileges. Logging may not capture the required event. A process might have ended before collection began.

The tester might have examined the wrong service, host, or configuration. Those are data-quality problems, not proof that the suspected behavior did or didn’t occur. Recheck target selection, prerequisites, permissions, configuration, and data freshness before escalating.

Corroboration should match the proposed mechanism. For library injection, ask whether the library relationship and subsequent behavior are unexpected for that process. For process hollowing or another form of process injection, look for a mismatch between the expected process and the code or activity attributed to it. For an unquoted service path, confirm the path ambiguity and whether an alternate executable location could actually be influenced. For a lol bin, document the execution context and outcome rather than treating legitimate provenance as proof of innocence or guilt.

When evidence conflicts, preserve both sides. Perhaps the process chain appears suspicious, but the change record shows an approved software deployment at the same time. That doesn’t mean you discard the alert or automatically accept the change record. Compare the claimed task with the specific commands, account, target, and outcome. The result may be expected administration, unauthorized use hidden among normal activity, or an unresolved condition requiring more evidence.

Reporting language should reflect that level of confidence. An observation might say that a legitimate Windows utility launched an unexpected child process under a particular account during the assessment window. A validated finding would go further by connecting the event to unauthorized behavior or a demonstrated weakness. If validation was restricted, explain which condition wasn’t tested and why. Don’t report successful code execution or privilege escalation when you’ve only identified a potentially vulnerable configuration.

Remediation should also follow the mechanism. An ambiguous service path calls for correcting the service configuration and addressing the permissions that make alternate resolution dangerous. Suspected injected execution calls for investigating how untrusted code entered the process context and which controls or configurations permitted it. Abuse of an administrative utility may call for tighter authorization, monitoring, or restrictions around the harmful behavior. Simply declaring the binary malicious misses the distinction the evidence established.

Cleanup belongs to the same professional process. If an authorized validation created a file, process, account artifact, service change, or other modification, handle it according to the agreed cleanup procedure. Preserve the evidence required for the report without retaining sensitive credentials or unnecessary operational data. The goal isn’t only to demonstrate a condition. It’s to leave the environment in the agreed state and give the owner enough reliable information to respond.

Now consider two plausible choices in a hypothetical engagement. You discover an unquoted service path on a production server. One option is to place an executable in a candidate location and restart the service immediately. The other is to review the path, relevant permissions, service context, and existing evidence, then seek approval if active validation is still necessary. Without explicit authorization for a potentially disruptive restart and code execution, the second choice is stronger.

That answer would change if the rules of engagement expressly authorized the technique on that target during the current window, the operational owner accepted the impact, and the active step was necessary to establish the agreed objective. Even then, you’d predict the expected result, use the least-impactful valid action, collect evidence, and verify cleanup. Technical possibility doesn’t erase the engagement decision.

Apply the same reasoning when a security alert names PsExec, PowerShell, or another legitimate utility. Don’t ask only, “Is this an attacker tool?” Ask whether the observed use was authorized, whether its behavior matches the expected administrative purpose, and whether independent evidence supports the suspected attack mechanism. That produces an answer another analyst, system owner, or report reader can evaluate.

The useful artifact from this work is more than a screenshot or tool output. It’s a traceable decision: what was observed, which mechanism could explain it, what you predicted, what validation was permitted, what the evidence showed, and which uncertainty remains. That chain turns a suspicious name or configuration into a technically meaningful assessment result without claiming more than the evidence supports.

Library injection, process injection, process hollowing, and unquoted service paths involve different execution or path-resolution weaknesses, so each one calls for evidence that matches its mechanism. The same discipline applies to PowerShell, PsExec, and other legitimate utilities. Their names can guide an investigation, but behavior, context, authorization, and consequences determine what the evidence means. A defensible assessment predicts the expected condition, chooses the least-disruptive authorized validation, and documents both the supported conclusion and any remaining uncertainty. That’s how you distinguish a tool from its misuse and a suspicious observation from a validated host finding.

Carry this question into practice: Is that enough to report malware on the host? Review the matching episode reference for exact terminology, named tools or standards, source-derived evidence checkpoints, and review material for Process Injection, Unquoted Service Paths, and Living-off-the-Land Tools. This lesson was produced by Bare Metal Cyber dot com.

Injection, Process Hollowing, and Living off the Land

headphones Listen Anywhere

More Options »
Broadcast by