- Home
- SIEM use cases
- How to detect living-off-the-land binary (LOLBin) abuse
How to detect living-off-the-land binary (LOLBin) abuse
In this page
Threat snapshot
Living-off-the-land binaries are the attacker's answer to application whitelisting. When an endpoint security control blocks unknown executables, attackers pivot to trusted Windows system binaries that are already present on every host, signed by Microsoft, and permitted by default application control policies. These binaries were built for legitimate administrative purposes: certutil.exe for certificate management, mshta.exe for running HTML applications, rundll32.exe for loading DLL functions, msiexec.exe for installing software. Their legitimate use gives attackers cover. Their ubiquity means no additional tooling needs to be dropped on the host.
The detection challenge is distinguishing the legitimate administrative use of these tools from their abuse. certutil.exe decoding a Base64-encoded certificate is normal. certutil.exe decoding a Base64-encoded PE file dropped in a temp directory is not. mshta.exe rendering a local HTA file during a software installation is normal. mshta.exe loading a remote HTA file from an attacker-controlled web server is not. The difference is in the arguments, the parent process, and the context of execution, all of which are visible in process creation logs.
Log360 maps 174 detection rules to LOLBin abuse across a wide range of system utilities. The coverage spans the most commonly abused binaries: mshta.exe, rundll32.exe, certutil.exe, msiexec.exe, regsvr32.exe, cmstp.exe, installutil.exe, and many lesser-known utilities that have been documented as LOLBins in public threat intelligence. This page covers the primary abuse techniques, the specific rules that detect them, and how to investigate when they fire.
LOLBin detection, at a glance
| Severity | Attention |
| Category | Endpoint & Malware |
| MITRE ATT&CK tactic | TA0005 Defense Evasion, TA0002 Execution, TA0011 Command and Control |
| MITRE techniques | T1218 System Binary Proxy Execution, T1218.003 CMSTP, T1218.005 Mshta, T1218.010 Regsvcs/Regasm, T1218.011 Rundll32 |
| Binaries covered | mshta.exe, rundll32.exe, certutil.exe, msiexec.exe, regsvr32.exe, cmstp.exe, installutil.exe, desktopimgdownldr.exe, findstr.exe, extrac32.exe, squirrel.exe, and 100+ others |
| Platforms covered | Windows |
| Log360 detection rules | 174 rules |
| SOC maturity level | Level 2 - Investigation |
| Compliance mapping | NIST CSF DE.CM-1, PCI-DSS 10.6, HIPAA Section 164.312(b), ISO 27001 A.12.4.1 |
How LOLBin abuse works
Certutil: certificate tool repurposed for file download and decoding
Certutil.exe is designed for certificate store management, but its -urlcache and -decode flags make it a capable file downloader and Base64 decoder. Attackers use certutil -urlcache -split -f [URL] to download files from attacker-controlled servers using a trusted Microsoft binary, bypassing download reputation controls that block unknown executables. They also use certutil -decode to decode Base64-encoded payloads that were dropped to disk, avoiding the need to drop a decoded binary directly. Log360 detects these through Uncommon Network Connection Initiated By Certutil.EXE, File Decoded From Base64/Hex Via Certutil.EXE, File Encoded To Base64 Via Certutil.EXE, and File In Suspicious Location Encoded To Base64 Via Certutil.EXE.
Rundll32: DLL loader abused for arbitrary code execution
Rundll32.exe loads and executes DLL functions, which makes it useful for running arbitrary code contained in a DLL without creating a new process for the DLL itself. Attackers use it to execute Cobalt Strike beacons packaged as DLLs, load malicious DLLs from unusual paths, and invoke DLL functions by ordinal number rather than name to obscure what is being loaded. The CobaltStrike Load by Rundll32 and DLL Call by Ordinal Via Rundll32.EXE rules target these specific patterns. The HackTool - F-Secure C3 Load by Rundll32 rule catches the F-Secure C3 framework, which is used by red teamers and has been observed in real-world attacks.
MSHTA: HTML application host used to execute scripts
Mshta.exe is the Windows host for HTML Application (.hta) files, which can contain VBScript or JScript with full Windows API access. Attackers use mshta.exe to execute remote HTA files containing malicious scripts, bypassing script file execution controls because mshta.exe is trusted. The most damaging variant is Office applications spawning mshta.exe, which indicates a malicious Office document macro or exploit delivered the mshta execution. Office Product Spawning MSHTA (Critical) targets this parent-child relationship specifically.
CMSTP: connection manager profile installer used for UAC bypass and code execution
CMSTP.exe installs Connection Manager service profiles and can be coerced into auto-elevating and executing arbitrary INF scripts, making it a UAC bypass mechanism. It was used in several high-profile campaigns including by MuddyWater. Log360 detects CMSTP execution through CMSTP Execution Process Creation, CMSTP Execution Registry Event, DLL Loaded From Suspicious Location Via Cmspt.EXE, and Bypass UAC via CMSTP.
Regasm and Regsvcs: .NET registration tools for code execution
Regasm.exe and Regsvcs.exe register .NET assemblies for COM interoperability but will execute code in a [ComRegisterFunction] annotated method within the assembly during registration. Attackers package malicious .NET code in an assembly and register it via Regasm or Regsvcs to execute it with potential privilege escalation. Detect Regasm Spawning a Process (Critical) and Possible DLL Injection by Regasm activity (Critical) target this pattern.
Less common LOLBins: desktopimgdownldr, squirrel, extrac32, findstr
A long tail of less commonly known Windows binaries have been documented as LOLBins. Desktopimgdownldr.exe, normally used to download desktop images for lock screens, can download arbitrary files. Squirrel.exe, part of the Electron application update framework, can download and execute arbitrary payloads. Extrac32.exe, a cabinet extraction tool, can extract arbitrary files from CAB archives including downloaded ones. Findstr.exe can download remote files from UNC paths. Log360 has dedicated rules for each of these less common LOLBin download vectors.
Real-world campaigns
MuddyWater: CMSTP for UAC bypass and persistence
MuddyWater, an Iranian APT group, used CMSTP.exe extensively for UAC bypass and to execute malicious INF scripts as part of their initial access and persistence chain. Their operations generated the specific CMSTP process creation and registry event patterns that Log360's CMSTP rules target.
APT32: Rundll32 for beacon loading
APT32 (OceanLotus) used Rundll32.exe to load their custom backdoor DLLs, packaging their implants as DLLs and invoking them through Rundll32 to avoid creating additional suspicious process names. The DLL Call by Ordinal Via Rundll32.EXE rule catches their ordinal-based invocation pattern.
IcedID and Gootloader: LOLBin for payload delivery
IcedID and Gootloader malware families use LOLBins extensively in their delivery chains. IcedID has been specifically observed using Rundll32 with single-digit DLL ordinals (e.g., rundll32.exe malware.dll,#1), which is detected by the IcedID Malware Suspicious Single Digit DLL Execution Via Rundll32 rule. Gootloader uses mshta.exe in its execution chain to bypass script execution controls.
Business impact
- Application whitelisting provides no protection against LOLBin abuse. All LOLBins are trusted system binaries: Standard application control policies that block unknown executables specifically permit these tools. SIEM-based behavioral detection is the primary control layer that remains effective.
- LOLBin abuse leaves a lighter footprint than dropper-based attacks: Because no additional executable is introduced to the host, traditional forensic artifacts like new file creation in suspicious directories are absent. The entire attack chain may run through existing system binaries.
- The long tail of less common LOLBins makes manual awareness impractical: Security teams cannot realistically memorize the hundreds of documented LOLBins and their abuse patterns. Rule-based detection that covers the full documented library is the only scalable approach.
Detecting LOLBin abuse with Log360
LOLBin detection relies entirely on process creation event logging. Windows Security Event 4688 must be enabled with full command-line capture. Sysmon Event 1 with command-line logging provides equivalent coverage and is preferred in environments where Sysmon is deployed. Without command-line capture, most LOLBin abuse rules cannot fire because the binary name alone is insufficient to distinguish legitimate from malicious use.
| Rule name | Severity | Platform | MITRE technique | What it detects |
|---|---|---|---|---|
| Uncommon Network Connection Initiated By Certutil.EXE | Trouble | Windows | T1105 | Certutil.exe making an outbound network connection, indicating the -urlcache download flag is being used to pull files from a remote source. |
| File Decoded From Base64/Hex Via Certutil.EXE | Trouble | Windows | T1027 | Certutil.exe with -decode flag, used to convert a Base64 or hex-encoded file to its binary form after downloading it as encoded text to evade content inspection. |
| File In Suspicious Location Encoded To Base64 Via Certutil.EXE | Trouble | Windows | T1027 | Certutil.exe encoding a file located in a temp, AppData, or other suspicious path, indicating the encoded output will be used for exfiltration or further staging. |
| CobaltStrike Load by Rundll32 | Trouble | Windows | T1218.011 | Rundll32.exe loading a DLL matching Cobalt Strike beacon packaging patterns, one of the most common delivery mechanisms for Cobalt Strike in enterprise incidents. |
| DLL Call by Ordinal Via Rundll32.EXE | Trouble | Windows | T1218.011 | Rundll32.exe invoking a DLL function by ordinal number rather than exported function name, used to obscure what DLL function is being called and to invoke unexported functions. |
| HackTool - F-Secure C3 Load by Rundll32 | Critical | Windows | T1218.011 | F-Secure C3 C2 framework component loaded via Rundll32, a red team framework that has been observed in real-world threat actor operations. |
| IcedID Malware Suspicious Single Digit DLL Execution Via Rundll32 | Trouble | Windows | T1218.011 | Rundll32 invocation with a single-digit ordinal (e.g., #1), the specific IcedID malware delivery pattern. |
| Office Product Spawning MSHTA | Critical | Windows | T1218 | An Office application (Word, Excel, PowerPoint, Outlook) spawning mshta.exe as a child process, indicating a malicious document macro or exploit executed an HTA payload. |
| HH.EXE Initiated HTTP Network Connection | Trouble | Windows | T1218.001 | Windows Help (hh.exe) making an HTTP network connection, used to download and display malicious CHM (Compiled HTML Help) files containing executable content. |
| HTML Help HH.EXE Suspicious Child Process | Trouble | Windows | T1218 | hh.exe spawning a child process such as cmd.exe or PowerShell, indicating a malicious CHM file executed shell commands through the Windows Help engine. |
| CMSTP Execution Process Creation | Trouble | Windows | T1218.003 | CMSTP.exe execution with arguments indicating profile installation, the first event in a CMSTP-based UAC bypass or arbitrary code execution chain. |
| Bypass UAC via CMSTP | Trouble | Windows | T1548.002 | CMSTP.exe used specifically to auto-elevate and execute code as a UAC bypass, combining the CMSTP execution with registry changes that trigger auto-elevation. |
| Detect Regasm Spawning a Process | Critical | Windows | T1218.009 | Regasm.exe spawning a child process, indicating the [ComRegisterFunction] code execution path was triggered during assembly registration. |
| Possible DLL Injection by Regasm activity | Critical | Windows | T1055 | Regasm.exe activity consistent with DLL injection into a running process, used to inject code into trusted processes after the registration execution step. |
| Remote File Download Via Desktopimgdownldr Utility | Trouble | Windows | T1105 | Desktopimgdownldr.exe used with parameters that download a file from a remote URL rather than a Microsoft lock screen image endpoint. |
| Arbitrary File Download Via Squirrel.EXE | Trouble | Windows | T1218 | Squirrel.exe (Electron updater) invoked with parameters that download and execute an arbitrary payload rather than a legitimate application update. |
| Suspicious Extrac32 Execution | Trouble | Windows | T1105 | Extrac32.exe extracting content from a file that was downloaded or dropped in a suspicious location, used to unpack encoded payloads from CAB archives. |
| Remote File Download Via Findstr.EXE | Trouble | Windows | T1218 | Findstr.exe used to download a file from a UNC path, exploiting the tool's ability to read from network paths. |
| Dynamic .NET Compilation Via Csc.EXE - Hunting | Trouble | Windows | T1027.004 | C# compiler (csc.exe) compiling code from a temp or suspicious location, used to compile malicious C# code at runtime without dropping a pre-compiled binary. |
| Arbitrary Command Execution Using WSL | Trouble | Windows | T1218 | Windows Subsystem for Linux binary used to execute commands that bypass Windows security controls operating on Win32 processes, since WSL processes have a different process heritage. |
Investigation playbook
Step 1: Identify the abuse pattern and the payload
- For every LOLBin alert, examine the full command line from the process creation event. The arguments tell you what the LOLBin is actually doing. A certutil -urlcache event should be followed immediately by examining the downloaded file path and checking whether that file was subsequently executed.
- Identify the parent process that launched the LOLBin. LOLBins launched by Office applications (Office Product Spawning MSHTA), script hosts (wscript.exe, cscript.exe), or other LOLBins create a chained execution pattern that is a strong indicator of an automated attack rather than an administrator action.
- For download-related LOLBins, correlate with network logs to identify the download source IP and domain. Block the destination immediately and query network logs for other internal hosts that have connected to the same destination.
Step 2: Check for subsequent execution
- Query process creation events on the same host for 30 minutes following the LOLBin event. If the LOLBin was used to download or decode a payload, the payload execution should appear as a subsequent process creation event. Identify the spawned process and determine whether it matches known malware patterns.
- Check whether any persistence mechanisms (scheduled tasks, registry run keys, service installations) were created in the period following the LOLBin event. LOLBin abuse is often part of a delivery and persistence chain rather than a standalone event.
Response and remediation
Immediate actions
- For Critical severity LOLBin alerts (Office Product Spawning MSHTA, Detect Regasm Spawning a Process), isolate the host immediately: These combinations represent high-confidence active compromise. The time between a malicious macro spawning mshta.exe and a C2 beacon establishing persistence can be under 60 seconds.
- Block LOLBin network access at the host firewall level where legitimate business use does not require internet connectivity: Certutil.exe, mshta.exe, and several other LOLBins have no legitimate reason to initiate outbound internet connections in most enterprise environments. Host-based firewall rules blocking outbound connections from these binaries eliminate the download cradle abuse vector while preserving their local administrative functionality.
| False positive source | Rules affected | Tuning strategy |
|---|---|---|
| Software deployment using certutil for certificate operations | Uncommon Network Connection Initiated By Certutil.EXE | Allowlist the specific SCCM or deployment service account. Alert on certutil network connections from any user account or from any host where certutil should not be making network connections. |
| Legitimate HTA-based administrative tools | Office Product Spawning MSHTA | This rule has a low false positive rate; Office applications rarely have legitimate reasons to spawn mshta.exe. If a specific business application genuinely requires this, document it, create a very narrow exception scoped to the specific application and mshta invocation path, and review the exception quarterly. |
| Developer workstations using csc.exe for build operations | Dynamic .NET Compilation Via Csc.EXE - Hunting | Allowlist developer workstations and CI/CD build agents. Alert on csc.exe execution from any non-developer host or from any host where it executes outside of normal build hours. |


