Skip to content
network-securityintermediate#living-off-the-land#lolbins#detection-engineering#fileless#blue-team#malware

Living Off the Land: LOLBins, Detection, and Defense

Living off the land turns a system's own trusted tools into the attack. How LOLBins like rundll32, mshta and certutil get abused, and how to detect the misuse.

The quietest intrusions bring almost nothing with them. Instead of smuggling a payload past your defenses, the attacker uses the tools already sitting on your systems: the scripting engine, the remote administration protocol, the certificate utility, the package installer. The most effective malware on a modern Windows network is often rundll32.exe, mshta.exe and certutil.exe, tools Microsoft ships, signs, and trusts, bent to do the attacker's work.

This is living off the land. The binaries at the center of it are called LOLBins, and the strategy has become the default posture for capable adversaries because it strips away most of what signature-based defense was built to catch.

What living off the land means

Living off the land, often shortened to LOTL, is a strategy. The goal is to accomplish the attacker's objectives (execution, movement, persistence, exfiltration) using capabilities that are already present and trusted on the target, so that little or no attacker-supplied malware ever touches the system.

The logic is straightforward. Endpoint defenses rest heavily on the assumption that malicious code looks different from legitimate code. Antivirus matches known-bad signatures. Application allowlisting blocks unknown executables. A LOTL attacker sidesteps both by never introducing unknown or malicious-looking code. A signed operating system tool doing the attacker's work looks exactly like a signed operating system tool, because that is what it is. The attacker never has to smuggle a payload past your defenses if the payload is already installed.

CISA and allied agencies have highlighted LOTL as a hallmark of sophisticated intrusions precisely because it can persist for long periods without triggering the alerts defenders expect. Their guidance on identifying and mitigating LOTL techniques frames it as one of the harder problems in modern detection.

What makes a binary a LOLBin

A LOLBin is a legitimate, pre-installed binary that carries a secondary capability an attacker can abuse. The abuse capabilities that matter are:

  • Executing code, often through a signed proxy so the real logic runs under a trusted process.
  • Downloading files from a remote server, turning a system tool into a delivery mechanism.
  • Bypassing application control, because the trusted binary is on every allowlist.
  • Persistence, credential access, or evasion, using the tool's normal features for abnormal ends.

The community-maintained LOLBAS project (Living Off the Land Binaries and Scripts) catalogues these binaries, scripts and libraries along with the exact functions that get abused. On the ATT&CK matrix, most of this activity sits under System Binary Proxy Execution (T1218) and Command and Scripting Interpreter (T1059).

The most abused Windows LOLBins

This is a defensive reference, framed at the detection level. The point is to recognize the abuse.

BinaryLegitimate jobHow it gets abusedATT&CK
rundll32.exeRun functions exported by a DLLExecute a malicious DLL or proxy a scriptT1218.011
mshta.exeRun HTML ApplicationsExecute inline or remote script with no browser sandboxT1218.005
regsvr32.exeRegister COM DLLsFetch and run a remote scriptlet (Squiblydoo)T1218.010
certutil.exeCertificate managementDownload files and decode base64 payloadsT1105, T1140
msbuild.exeCompile projectsRun inline C# tasks from a crafted project fileT1127.001
wmic.exeWMI command lineExecute a remote XSL stylesheet (Squiblytwo)T1220
msiexec.exeInstall MSI packagesInstall and run code from a remote URLT1218.007
mmc.exeManagement consolesRun script via a crafted console file (GrimResource)T1218.014
bitsadmin.exeBackground transfersDownload payloads quietly over BITST1197

None of these tools is suspicious on its own. Your admins use several of them daily. That is precisely why the technique works and why static blocklists fail.

LOTL is broader than LOLBins

The terms get used loosely, so it is worth being precise. LOLBins are one important category within a wider strategy. Living off the land spans several kinds of built-in capability:

CategoryExamples of what is abusedATT&CK area
Scripting enginesBuilt-in command shells and scripting interpretersT1059
Signed system binaries (LOLBins)Trusted utilities with a proxy-execution capabilityT1218
Remote administration protocolsWMI, WinRM, remote service and task mechanismsT1021, T1047
Native OS featuresRegistry, scheduled tasks, built-in transfer utilitiesT1053, T1112
Legitimate installed toolsRemote-access and IT management software already deployedT1219

The scripting-engine layer, Command and Scripting Interpreter (T1059), and the signed-binary layer, System Binary Proxy Execution (T1218), are the two most heavily used, and the strategy reaches into every corner of the operating system's own functionality.

Each layer contributes something different, which explains why the strategy is so hard to fence off.

Scripting engines are the most flexible layer. A built-in interpreter can decode content, reach the network, manipulate the registry, and load code into memory from a single command line. Automation and administration depend on scripting, so these engines cannot be removed from most environments. The counter is to run them in constrained modes and log every script block, so the borrowed engine leaves a record even when it drops no file.

Signed system binaries contribute proxy execution. A utility whose documented job is to install a component, apply a configuration, or manage certificates can be coaxed into running attacker-chosen code or fetching a remote file under a signed image name. Vendor-maintained block lists for those specific binaries are the practical control, applied on endpoint classes that never legitimately need them.

Remote administration protocols contribute movement. Management frameworks, remote task and service mechanisms, and remote shells exist so administrators can operate machines they are not sitting at, and an attacker rides the same channels laterally while the traffic looks like ordinary internal administration. Restricting which accounts may use these protocols, and to which destinations, shrinks the space the abuse hides in.

Native OS features contribute persistence and staging. Scheduled tasks, registry run keys, services, and built-in transfer utilities let an attacker survive a reboot and stage data without introducing anything foreign. Baseline these structures so a new scheduled task or service is an investigable event.

Legitimate installed software contributes cover. Remote-access and IT-management products already deployed for support can be repurposed for command and control, and because the organization installed them deliberately they are trusted by reputation. Inventory which remote-access tools are sanctioned and alert on any others.

There is no signature for a trusted tool, and nothing to patch

LOLBins are not vulnerabilities. certutil downloading a file is working exactly as designed. There is no malicious file to hash, no unknown binary to block, no CVE to fix and usually no update to install. Defenses built to answer the question "is this file malicious" have nothing to grab onto. The useful question becomes "is this trusted tool doing something it never normally does".

Why the technique works so well

Three properties make the strategy durable. Trust: the tools are signed and expected, so they pass allowlists and raise no reputation alarms. Ubiquity: the tools are everywhere, so removing them is often impractical because your own administrators depend on them. Noise: legitimate use of the same tools happens constantly, so malicious use hides in a large volume of benign activity.

Underneath those properties sit four defensive assumptions that LOTL defeats, each a common pillar of an endpoint strategy.

The first is that malicious code looks different from legitimate code. A LOLBin defeats it by definition: the binary doing the work is a genuine, current, Microsoft-signed component with a spotless reputation, already on the disk and trusted before the attacker arrived.

The second is that application allowlisting stops unapproved software. Allowlisting decides what may run by identity, and a signed system binary is on every sensible allowlist because blocking it would break the operating system. The attacker exploits the gap between "this binary is allowed to run" and "this binary is allowed to do anything it is capable of", which allowlisting on its own does not close.

The third is that a payload has to be delivered. Traditional detection watches for something arriving: a dropped executable, a written file, a new service binary. The malicious logic here lives in a command line, a registry value, a script block held in memory, or a remote resource fetched at runtime, so the "new file appeared" tripwires never fire.

The fourth is that trust is a property of the process. Many tools treat a signed, well-known process as inherently safe and reduce their scrutiny of it. Proxy execution weaponizes that trust: the attacker's code runs inside or through the trusted process, inheriting its reputation and often its network and filesystem latitude.

Trust is transitive, and attackers know it

The core move in every proxy-execution technique is to make attacker logic run under the identity of a binary the defender already trusts. Once the malicious action is attributed to a signed Microsoft process, controls that key off process reputation stop helping. This is why detection has to key off behavior and lineage, since the identity of the running process has been deliberately borrowed.

Together these mean that presence-based detection fails. The tool being present, and even running, is normal. Only the specific way it is being used reveals the attack.

Fileless malware and weaponized files: the two neighbors

Living off the land sits close to fileless malware, and the two often appear together. A fileless technique keeps its malicious logic in memory, in scripts, or in the registry rather than as an executable on disk, specifically to avoid file-based scanning. LOTL supplies the trusted execution vehicles that fileless techniques ride on: a built-in scripting engine loads and runs code that never lands as a file, and a signed binary proxies execution so the malicious logic runs under a trusted process. Our fileless malware guide covers that overlap in more detail.

At the other end of the chain sit weaponized file formats. A LOLBin rarely acts alone. In a typical intrusion the delivery is a file: a .lnk shortcut, an .hta, a scriptlet, a macro document. That file's only real job is to invoke a LOLBin, which then does the downloading and executing. The file is the trigger and the LOLBin is the engine.

File-format defense and LOLBin defense are therefore the same problem viewed from two ends. Our File-Format Abuse Atlas maps which formats wrap which LOLBin techniques, from LNK targets that call PowerShell to .sct scriptlets loaded by regsvr32. Read the two together and the delivery chain becomes obvious.

A worked example: the delivery chain

Following one representative chain end to end shows how the pieces fit, without needing any working payload. Picture a phishing email carrying an archive. Inside is a file that looks like a document but is a shortcut, a .lnk. The victim double-clicks it expecting a document to open.

The shortcut's target is a command line that invokes a script host, passing arguments that reach out to a remote server and pull down a small stage. No executable has arrived that antivirus could scan, because the shortcut is a tiny text-like artifact and the script host is a trusted system component.

That first stage then reaches for a second LOLBin to do the heavier lifting. It might call a certificate utility to download a larger encoded payload and decode it in one step, or a registration utility to fetch and execute a remote scriptlet so the logic runs under a signed process. Each hop uses a different trusted binary for a different capability: one to execute, one to download, one to decode, one to proxy the final run past application control.

What gives it away is the shape of the whole chain: a document handler spawning a script host, a script host spawning a certificate tool, a certificate tool making an outbound connection to an unfamiliar host. Read as a sequence, the story is unmistakable, and that sequence is what modern detection is built to catch.

The same chain, extended to a full intrusion

Zooming out from that one shortcut, the rest of the intrusion follows the same borrowing logic.

Delivery. The shortcut is one entry vector among several. The same opening move works when a user opens a document or clicks a link and the initial code runs inside an application already trusted to run, such as an office suite or a browser helper. Nothing has been installed; the document simply asks a built-in scripting engine to execute a short command. Because the office application spawning a scripting host is a legitimate capability used by macros and automation, no file-based scanner has a target, and the parent-child relationship is the only artifact produced.

Discovery and credential access. Built-in administrative commands enumerate users, groups, shares, and running services. These are the commands administrators run every day, so their appearance is not inherently suspicious. Credential material is read from memory or local stores using native features rather than a dropped tool.

Lateral movement. Rather than deploying a new remote-access tool, the attacker rides a remote administration protocol the environment already permits, mapping to Windows Management Instrumentation (T1047) and Remote Services (T1021). To the network it looks like routine administration between two internal hosts.

Persistence and objective. A scheduled task, registry entry, or service is created using native features (T1053, T1112), so the attacker returns without redeploying anything, and data leaves over an allowed channel. At no point does a novel executable appear on disk, which is the entire reason the strategy is chosen.

Every individual step is a legitimate action. The intrusion becomes visible when the steps are read as a sequence: the transitions and the timing between them are anomalous even though every component is benign. The MITRE ATT&CK framework is the vocabulary teams use to map that sequence onto coverage.

Detection signals in depth

Because the tools are legitimate, detection focuses on abnormal behavior rather than on the binary's presence. Four sources carry almost all of the signal.

Process lineage is the richest. A LOLBin is suspicious mainly because of who launched it and what it launches in turn. winword.exe spawning mshta.exe, or mshta.exe spawning powershell.exe, is almost never legitimate. Office applications, PDF readers, browsers, and mail clients spawning script hosts or system utilities is a chain that rarely occurs in real work, and a script host spawning a compiler, a certificate tool, or another script host is equally strong. Capture the full parent and grandparent chain rather than just the immediate parent, which catches attackers who insert a benign-looking intermediary to break the obvious link.

Command-line content is the second source. The abused capabilities show up as recognizable argument patterns: regsvr32 or msiexec invoked with an http URL, certutil with decode or url-fetch verbs, rundll32 pointed at an export from a DLL in a user-writable path, a compiler asked to build a project from a temporary folder. Logging full command lines is the single most important prerequisite here, since a bare process name with no arguments hides exactly the detail that separates abuse from routine use.

Network behavior is the third. Several LOLBins make outbound connections only in the rarest legitimate circumstances. mshta, regsvr32 and msbuild reaching the internet deserve a hard look, especially when the destination has no reputation or history in your environment. Pairing the network event with the process that made it turns a vague connection alert into a specific "this signed utility just called home" finding.

Execution context is the fourth. Where the invocation was launched from matters. LOLBins driven by content in a downloads folder, a temporary directory, a freshly mounted archive or image, or a user profile path are far more likely to be abuse than the same tools run from an administrative script in a controlled location.

A fifth signal sits above all of these: rare-tool usage. Baselining which administrative tools each host normally runs turns any first-time use of a rarely-seen built-in capability into an investigable event.

Chain the weak signals, then write them as rules

No single indicator here is conclusive, and each one alone produces noise. The reliable detections combine them: a script host launched by an Office process, running a command line that fetches a remote resource, then making an outbound connection. Build detections as chains of conditions rather than single triggers and the false-positive problem largely dissolves. Detection rule formats express exactly these parent-child and command-line conditions in a portable form.

Baseline before you hunt

The reason behavioral detection produces manageable noise is that most environments have a stable, learnable pattern of legitimate LOLBin use. A given fleet tends to run the same handful of system utilities from the same management tooling, the same scheduled jobs, and the same software installers, day after day. Spending time up front to record that normal pattern pays back every time a rule fires.

Build a baseline by collecting, over a representative period, which LOLBins run, what parents launch them, and what command-line shapes they use. Most of that activity resolves into a short list of benign sources: a patch-management agent invoking an installer utility, a monitoring tool calling a script host with a fixed set of arguments, an imaging process using a certificate tool during provisioning. Once those known-good chains are documented, a detection can suppress them explicitly and alert only on the residue, which is where the genuinely unusual invocations live. Our threat hunting guide covers running that loop as a repeatable program.

Baselining also surfaces binaries you do not need at all. Many fleets discover that entire categories of endpoints never legitimately run certain script hosts or legacy utilities, and removing or restricting a handler your users never invoke costs almost nothing while closing a technique outright. The baseline turns an abstract catalogue of abusable tools into a concrete map of what your environment uses, tolerates, and can safely lock down.

Raising the cost

Detection tells you it happened. Control makes it harder in the first place.

  1. Application control with LOLBin awareness. WDAC and AppLocker can block or constrain specific abused binaries, and Microsoft's recommended block rules already cover many known LOLBins. The rules have to constrain the abusable capability itself. See Windows event IDs for security for the logging that supports this.
  2. Enable rich logging. Command-line process auditing, script-block logging for scripting engines, and script execution auditing are what make behavioral detection possible. Without them, LOTL is nearly invisible.
  3. Constrain PowerShell and other scripting engines. Constrained Language Mode, script-block logging, and the AMSI anti-malware scan interface enabled together limit what a borrowed engine can do.
  4. Remove or restrict what you do not need. If your endpoints never legitimately run mshta or wscript, changing the default handler or blocking them outright is cheap and effective.
  5. Least privilege and egress control. Many LOTL steps need elevated rights or outbound network access. Restricting outbound connections from workstations breaks the download step, and a trusted tool running under a constrained account can accomplish far less even when it runs.
  6. Study adversary tradecraft. Different threat groups favor different built-in tools. Tuning detection to the ones your likely adversaries use is more efficient than trying to watch everything. Our Threat Group Directory maps those preferences.
Log the command line, then hunt the chains

The prerequisite for catching living-off-the-land activity is capturing full command lines and script blocks; most of the technique is invisible without them. Once that telemetry exists, the highest-value hunts are process chains: office or browser to scripting engine, scripting engine to system binary, system binary to network. Start with those three transitions and you catch a large share of commodity and advanced intrusions alike, well before any objective is reached.

LOTL compared to bringing your own malware

Setting the strategy against classic custom tooling clarifies why so many familiar controls lose their grip.

PropertyBringing custom malwareLiving off the land (LOLBins)
Artifact on diskA dropped binary, dropper, or driverOften nothing new; existing signed tools
Signature detectionEffective once a sample is knownNo malicious file to sign
Application allowlistingBlocks the unknown binaryBypassed via already-allowlisted binaries
Primary telemetryFile hashes, quarantine eventsProcess lineage, command lines, network shape
Attribution difficultyEasier, custom code carries traitsHarder, tools are shared and generic
Primary defensive answerFile and reputation detectionBehavior and lineage detection
RemovalDelete or quarantine the fileReconstruct and reverse the actions taken
Cost to the attackerHigher, must build and deliver codeLow, the tools are already present

Every column that a file-centric defense relies on is neutralized, and every column that survives is behavioral. That is why detection engineering for LOTL is a telemetry and baselining discipline first.

The trade for the attacker is real. Custom tooling can do more and be more tailored, and it leaves more behind for defenders and threat intel to find. Living off the land does less on its own and leans on chaining several borrowed tools, and in exchange it leaves almost nothing for signature-based defense and reputation systems to catch. For commodity intrusions the low cost and low visibility usually decide it, which is why the technique has become a default.

Where defenders go wrong

Teams that struggle with this technique tend to make the same handful of errors.

Trying to block the binaries outright. It is tempting to forbid a much-abused tool, but many LOLBins are load-bearing parts of Windows or of common software, and blanket blocking breaks legitimate functionality and generates enough pain that the block gets rolled back. The workable path is targeted: constrain the specific abused invocations, remove handlers your fleet never legitimately uses, and lean on curated block rules rather than banning core components. Removal is a partial control across a strategy that spans dozens of built-in capabilities.

Logging process names without command lines. A detection strategy that records that a certificate utility ran, but not the arguments it ran with, has thrown away the exact evidence that distinguishes a routine certificate operation from a payload download. Full command-line logging is the foundation the rest of the strategy stands on. This is also why "our EDR would alert" is optimistic: EDR catches LOTL only when it captures full command lines and lineage, and only when the environment has enough baseline that a rare chain stands out.

Treating a signed binary as automatically safe. Some environments carve out trusted system processes from monitoring to reduce noise, which is precisely the gap proxy execution is designed to slip through. Signed and trusted describes the binary; the behavior is what needs watching.

Ignoring the delivery side. A program that hunts hard for anomalous process behavior but never examines the shortcuts, script files, and documents that trigger it is watching only the second act. Instrumenting the delivery formats gives you an earlier and often cleaner detection point.

Assuming antivirus will catch the script. File-based scanning has little to grab when the logic lives in a command line, a memory buffer, or a script block that never lands as a file. Script-block logging and in-memory scanning interfaces give scanners visibility here, and they have to be enabled.

Assuming only advanced actors use it. Nation-state operators popularized the discipline, and commodity intrusions now use the same built-in tools routinely because the same evasion benefits apply to everyone.

How the technique evolved

Repurposing built-in tools is an old idea. Administrators have always used system utilities to move files, run scripts, and automate tasks, and attackers have always noticed that those utilities make excellent cover. What changed is that defense caught up with dropped malware. Early antivirus matched file signatures, which worked against attackers who reused the same binaries. As signature evasion became a chore, defenders added behavioral engines, reputation scoring, and application allowlisting that judged a program by whether it was known and trusted. Those controls worked against unknown executables, so attackers stopped bringing unknown executables and shifted the malicious behavior into tools the allowlist already trusted.

The rise of endpoint detection and response pushed the same evolution further. EDR made it far easier to record process creation, command lines, and network connections, which is exactly the telemetry that catches LOTL. In response, attackers began favoring the most common built-in tools, whose legitimate use is highest, so their activity would drown in the largest possible volume of benign events. The contest has settled into a baseline problem: the defender who knows precisely what normal looks like on each host can spot the deviation, and the one who does not cannot.

The community response was to catalogue the abuse systematically. The LOLBAS project turned scattered tradecraft into a structured, public reference that lists each binary, script, and library alongside the exact functions that get misused and the ATT&CK techniques they map to. That catalogue cuts both ways: attackers use it as a menu, and defenders use it as a coverage checklist. For a blue team, walking the list and asking "would we see this, and do we need this binary enabled at all" is one of the most direct ways to turn the technique's own documentation into a hardening plan.

Frequently asked questions

What does living off the land mean? It describes an attacker operating with tools already present on the target system instead of bringing their own. The binaries are the land, and the attacker lives off them, borrowing trusted software rather than smuggling in malware.

What is the difference between LOTL and LOLBins? Living off the land is the overall strategy of using trusted, built-in capabilities to accomplish attacker goals. LOLBins, meaning Living Off the Land Binaries and Scripts, are one catalogued category within that strategy: signed system binaries that carry a secondary, abusable function. The strategy also covers scripting engines, remote administration protocols, and native operating system features that are not binaries in the LOLBin sense.

Are LOLBins vulnerabilities that can be patched? No. A LOLBin is a legitimate tool used within its designed capabilities, so there is usually no flaw to fix and no update that removes the behavior. The defense is control and detection, applied to how and when the tool runs.

What is the LOLBAS project? It is a community-maintained catalogue of Windows binaries, scripts, and libraries that can be abused, documenting the specific functions attackers use and the ATT&CK techniques they correspond to. It serves as both a reference for defenders building detections and a checklist for hardening.

Is PowerShell a LOLBin? PowerShell is a scripting environment that is frequently abused in the same way, and it sits alongside the classic LOLBins in most discussions. It is worth hardening specifically with Constrained Language Mode, script-block logging, and AMSI enabled, since its power and ubiquity make it a favorite.

Do LOLBins only exist on Windows? The term is most associated with Windows because of its rich set of signed system utilities, and the same idea applies elsewhere. Unix-like systems have their own catalogue of built-in binaries that can be repurposed, and the defensive principle of watching behavior rather than presence carries across platforms.

Is living off the land the same as fileless malware? They are closely related and often appear together, and they are distinct ideas. Fileless describes where the malicious logic resides, in memory or scripts rather than on disk. Living off the land describes what the attacker uses to execute, the trusted tools already present. A fileless technique usually rides a living-off-the-land execution vehicle, which is why the two are discussed side by side.

Can antivirus alone stop LOLBin abuse? Signature-based antivirus alone is weak against it, because the binaries are trusted and there is frequently no malicious file to match. Behavior-based endpoint tools that record process creation, command lines, and network activity are far more capable, and application control raises the cost further.

Why can defenders not simply block the tools? Many of the abused tools are essential to administration and to legitimate software, so blocking them outright would break the environment. Some can be restricted on endpoint classes that never need them, and vendor-recommended block rules for specific abusable binaries help, and wholesale removal is rarely feasible.

What telemetry matters most for catching it? Full command-line capture on process creation is the single most valuable source, followed by script-block logging for scripting engines and network connection records tied to the initiating process. Without command lines, most living-off-the-land activity cannot be reconstructed. See Windows event IDs for security for the specific logs.

Does least privilege help against a strategy that uses trusted tools? Yes. Many stages of a LOTL chain require elevated rights or outbound network access. A trusted tool running under a constrained, low-privilege account can do far less, and egress control breaks the stages that need to reach the internet. Least privilege limits what the tool can accomplish once it runs.

How is LOTL detected differently from ordinary malware hunting? Ordinary malware hunting often starts from a file hash or a quarantine event. LOTL hunting starts from behavior: rare process chains, trusted tools invoked with unusual arguments, and built-in utilities reaching the network. The unit of analysis is the sequence of actions rather than a single artifact.

Which process chains are the highest-value to hunt first? Three transitions catch a large share of activity. The first is an office application or browser spawning a scripting engine. The second is a scripting engine spawning a signed system binary. The third is a system binary that rarely touches the network making an outbound connection. Alerting on those three chains gives strong coverage before an attacker reaches their objective.

Does encryption or full-disk encryption affect LOTL detection? No. The strategy operates through legitimate running processes and command lines, which are visible to endpoint telemetry regardless of disk or transport encryption. What blinds detection is missing telemetry, chiefly the absence of command-line auditing and script-block logging.

The bottom line

Living off the land wins by refusing to look like an attack. It borrows the defender's own trusted tools, leaves almost nothing on disk, and hides in the constant background noise of legitimate administration. You cannot patch it away, because the tools are working as designed. The path forward is to change the question your defenses ask, from what is this file to what is this trusted tool doing, and to build the logging, application control, baselining and least privilege that let you answer it. A signed, built-in tool doing something it has never done before is one of the clearest signals you will get.

Sources & further reading